aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2012-12-22 20:03:41 +0100
committerJoel Bodenmann <joel@unormal.org>2012-12-22 20:03:41 +0100
commita7eb91ace882ee5fbb23641017162bd8fe335a7d (patch)
tree66ba3637009bd2b0aeee5a2465369dc7710ea613 /demos
parent10ddfd26fcfd577abb3c2e3fd8bcd929875b99ee (diff)
downloaduGFX-a7eb91ace882ee5fbb23641017162bd8fe335a7d.tar.gz
uGFX-a7eb91ace882ee5fbb23641017162bd8fe335a7d.tar.bz2
uGFX-a7eb91ace882ee5fbb23641017162bd8fe335a7d.zip
benchmark demo cleanup
Diffstat (limited to 'demos')
-rw-r--r--demos/applications/benchmarks/main.c36
1 files changed, 13 insertions, 23 deletions
diff --git a/demos/applications/benchmarks/main.c b/demos/applications/benchmarks/main.c
index 734231da..a6f6d134 100644
--- a/demos/applications/benchmarks/main.c
+++ b/demos/applications/benchmarks/main.c
@@ -1,15 +1,15 @@
/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
- 2011,2012 Giovanni Di Sirio.
+ ChibiOS/GFX - Copyright (C) 2012
+ 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
the Free Software Foundation; either version 3 of the License, or
(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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
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);
-__attribute__ ((__noreturn__))
static msg_t Thread2(void *arg) {
(void)arg;
font_t font1;
chRegSetThreadName("lcd");
- gdispInit();
gdispSetOrientation(GDISP_ROTATE_90);
gdispClear(Black);
@@ -140,28 +138,20 @@ static msg_t Thread2(void *arg) {
gdispDrawString(100, height/2, pps_str, font1, White);
chThdSleepMilliseconds(3000);
}
+
+ return 0;
}
-/*
- * Application entry point.
- */
-__attribute__ ((__noreturn__))
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();
chSysInit();
+ gdispInit();
- /*
- * Creates the example thread.
- */
chThdCreateStatic(waThread2, sizeof(waThread2), NORMALPRIO, Thread2, NULL);
- while(TRUE)
+
+ while(TRUE) {
chThdSleepMilliseconds(500);
+ }
+
+ return 0;
}