From: Matt Mullins Date: Sun, 23 Dec 2012 04:07:06 +0000 (-0800) Subject: Add some empty asm("") blocks to spin() to thwart optimizations X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=e55b62cd1735d3a636c1d8a06c8c51f39b3b60f3;p=stellaris%2Fled_blink.git Add some empty asm("") blocks to spin() to thwart optimizations --- diff --git a/led_blink.c b/led_blink.c index 7d25e4e..14ee0d1 100644 --- a/led_blink.c +++ b/led_blink.c @@ -32,5 +32,9 @@ void main_isr() { } void spin(int cycles) { - while (cycles) { cycles -= 1; } + asm(""); + while (cycles) { + cycles -= 1; + asm(""); + } }