aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32/obldc/led/led.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stm32/obldc/led/led.c')
-rw-r--r--examples/stm32/obldc/led/led.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/examples/stm32/obldc/led/led.c b/examples/stm32/obldc/led/led.c
index aad055b..09ae89d 100644
--- a/examples/stm32/obldc/led/led.c
+++ b/examples/stm32/obldc/led/led.c
@@ -54,13 +54,17 @@ int main(void)
/* Blink the LEDs on the board. */
while (1) {
gpio_toggle(GPIOA, GPIO6); /* LED on/off */
- for (i = 0; i < 800000; i++); /* Wait (needs -O0 CFLAGS). */
+ for (i = 0; i < 8000000; i++) /* Wait a bit. */
+ __asm__("nop");
gpio_toggle(GPIOA, GPIO7); /* LED on/off */
- for (i = 0; i < 800000; i++); /* Wait (needs -O0 CFLAGS). */
+ for (i = 0; i < 8000000; i++) /* Wait a bit. */
+ __asm__("nop");
gpio_toggle(GPIOB, GPIO0); /* LED on/off */
- for (i = 0; i < 800000; i++); /* Wait (needs -O0 CFLAGS). */
+ for (i = 0; i < 8000000; i++) /* Wait a bit. */
+ __asm__("nop");
gpio_toggle(GPIOB, GPIO1); /* LED on/off */
- for (i = 0; i < 800000; i++); /* Wait (needs -O0 CFLAGS). */
+ for (i = 0; i < 8000000; i++) /* Wait a bit. */
+ __asm__("nop");
}
return 0;