diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-04-13 17:03:56 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-04-13 17:03:56 +0000 |
commit | 97ec157b500badfd14f4387ebb8e8a6bf3ac929e (patch) | |
tree | 3536a0c3cd7cc1633e4a9ee20ce9264dea80ed61 /demos/ARMCM3-STM32F103-GCC/main.c | |
parent | 9e2c8595c8c07d14a2238019a33e00bc08928c92 (diff) | |
download | ChibiOS-97ec157b500badfd14f4387ebb8e8a6bf3ac929e.tar.gz ChibiOS-97ec157b500badfd14f4387ebb8e8a6bf3ac929e.tar.bz2 ChibiOS-97ec157b500badfd14f4387ebb8e8a6bf3ac929e.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@263 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/ARMCM3-STM32F103-GCC/main.c')
-rw-r--r-- | demos/ARMCM3-STM32F103-GCC/main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/demos/ARMCM3-STM32F103-GCC/main.c b/demos/ARMCM3-STM32F103-GCC/main.c index a5b766de5..234878b7b 100644 --- a/demos/ARMCM3-STM32F103-GCC/main.c +++ b/demos/ARMCM3-STM32F103-GCC/main.c @@ -18,8 +18,10 @@ */
#include <ch.h>
+#include <test.h>
#include "board.h"
+#include "stm32_serial.h"
/*
* Red LEDs blinker thread, times are in milliseconds.
@@ -56,7 +58,10 @@ int main(int argc, char **argv) { * Normal main() thread activity, in this demo it does nothing except
* sleeping in a loop.
*/
- while (TRUE)
- chThdSleep(1000);
+ while (TRUE) {
+ if (GPIOA->IDR & GPIOA_BUTTON)
+ TestThread(&COM2);
+ chThdSleep(500);
+ }
return 0;
}
|