benchmark demo cleanup
This commit is contained in:
parent
10ddfd26fc
commit
a7eb91ace8
1 changed files with 13 additions and 23 deletions
|
@ -1,15 +1,15 @@
|
||||||
/*
|
/*
|
||||||
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
|
ChibiOS/GFX - Copyright (C) 2012
|
||||||
2011,2012 Giovanni Di Sirio.
|
Joel Bodenmann aka Tectu <joel@unormal.org>
|
||||||
|
|
||||||
This file is part of ChibiOS/RT.
|
This file is part of ChibiOS/GFX.
|
||||||
|
|
||||||
ChibiOS/RT is free software; you can redistribute it and/or modify
|
ChibiOS/GFX is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 3 of the License, or
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
ChibiOS/RT is distributed in the hope that it will be useful,
|
ChibiOS/GFX is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
@ -80,13 +80,11 @@ int uitoa(unsigned int value, char * buf, int max) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static WORKING_AREA(waThread2, 2048);
|
static WORKING_AREA(waThread2, 2048);
|
||||||
__attribute__ ((__noreturn__))
|
|
||||||
static msg_t Thread2(void *arg) {
|
static msg_t Thread2(void *arg) {
|
||||||
(void)arg;
|
(void)arg;
|
||||||
font_t font1;
|
font_t font1;
|
||||||
chRegSetThreadName("lcd");
|
chRegSetThreadName("lcd");
|
||||||
|
|
||||||
gdispInit();
|
|
||||||
gdispSetOrientation(GDISP_ROTATE_90);
|
gdispSetOrientation(GDISP_ROTATE_90);
|
||||||
gdispClear(Black);
|
gdispClear(Black);
|
||||||
|
|
||||||
|
@ -140,28 +138,20 @@ static msg_t Thread2(void *arg) {
|
||||||
gdispDrawString(100, height/2, pps_str, font1, White);
|
gdispDrawString(100, height/2, pps_str, font1, White);
|
||||||
chThdSleepMilliseconds(3000);
|
chThdSleepMilliseconds(3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Application entry point.
|
|
||||||
*/
|
|
||||||
__attribute__ ((__noreturn__))
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
|
|
||||||
/*
|
|
||||||
* System initializations.
|
|
||||||
* - HAL initialization, this also initializes the configured device drivers
|
|
||||||
* and performs the board-specific initializations.
|
|
||||||
* - Kernel initialization, the main() function becomes a thread and the
|
|
||||||
* RTOS is active.
|
|
||||||
*/
|
|
||||||
halInit();
|
halInit();
|
||||||
chSysInit();
|
chSysInit();
|
||||||
|
gdispInit();
|
||||||
|
|
||||||
/*
|
|
||||||
* Creates the example thread.
|
|
||||||
*/
|
|
||||||
chThdCreateStatic(waThread2, sizeof(waThread2), NORMALPRIO, Thread2, NULL);
|
chThdCreateStatic(waThread2, sizeof(waThread2), NORMALPRIO, Thread2, NULL);
|
||||||
while(TRUE)
|
|
||||||
|
while(TRUE) {
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue