aboutsummaryrefslogtreecommitdiffstats
path: root/demos/ARMCM3-STM32F103-GCC/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'demos/ARMCM3-STM32F103-GCC/main.c')
-rw-r--r--demos/ARMCM3-STM32F103-GCC/main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/demos/ARMCM3-STM32F103-GCC/main.c b/demos/ARMCM3-STM32F103-GCC/main.c
index 99a1c085e..a5b766de5 100644
--- a/demos/ARMCM3-STM32F103-GCC/main.c
+++ b/demos/ARMCM3-STM32F103-GCC/main.c
@@ -28,7 +28,10 @@ static WorkingArea(waThread1, 64);
static msg_t Thread1(void *arg) {
while (TRUE) {
- chThdSleep(1000);
+ GPIOC->BRR = GPIOC_LED;
+ chThdSleep(500);
+ GPIOC->BSRR = GPIOC_LED;
+ chThdSleep(500);
}
return 0;
}
@@ -38,10 +41,6 @@ static msg_t Thread1(void *arg) {
*/
int main(int argc, char **argv) {
- GPIOC->BRR = GPIOC_LED;
- while(1)
- ;
-
/*
* The main() function becomes a thread here then the interrupts are
* enabled and ChibiOS/RT goes live.