summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@no.no.james.local>2014-12-08 19:19:41 +0000
committerroot <root@no.no.james.local>2014-12-08 19:19:41 +0000
commit10afd895d14e0d5c8a929dc1b5b7067b968a2ace (patch)
treec8aa0e2aba7df61d93c861b97c39580e9effb00e
parent77ab1e6832361fd87899fe21a546f508567918d8 (diff)
downloadrgb_ring-10afd895d14e0d5c8a929dc1b5b7067b968a2ace.zip
rgb_ring-10afd895d14e0d5c8a929dc1b5b7067b968a2ace.tar.gz
rgb_ring-10afd895d14e0d5c8a929dc1b5b7067b968a2ace.tar.bz2
fish
-rw-r--r--blinky.c2
-rw-r--r--lib_ws2812.c2
-rw-r--r--project.h10
3 files changed, 7 insertions, 7 deletions
diff --git a/blinky.c b/blinky.c
index 43cc88a..49e39a9 100644
--- a/blinky.c
+++ b/blinky.c
@@ -90,7 +90,7 @@ main (void)
}
ws2812_setleds (led, N_LEDS);
- delay_ms (5); // wait for 500ms.
+ _delay_ms (5); // wait for 500ms.
i++;
diff --git a/lib_ws2812.c b/lib_ws2812.c
index ac00b62..7f29425 100644
--- a/lib_ws2812.c
+++ b/lib_ws2812.c
@@ -22,7 +22,7 @@ ws2812_setleds_pin (struct RGB *ledarray, uint16_t leds, uint8_t pinmask)
{
WS2812_DDRREG |= pinmask; // Enable DDR
ws2812_sendarray_mask ((uint8_t *) ledarray, leds + leds + leds, pinmask);
- delay_us (50);
+ _delay_us (50);
}
void
diff --git a/project.h b/project.h
index 3d27931..949acb4 100644
--- a/project.h
+++ b/project.h
@@ -18,14 +18,14 @@
#include <avr/pgmspace.h>
#ifdef PROTOTYPING
-#define _delay_ms void _delay_ms
-#define _delay_us void _delay_us
-#define _delay_loop_1 void _delay_loop_1
-#define _delay_loop_2 void _delay_loop_2
+#define _delay_ms static _delay_ms
+#define _delay_us static _delay_us
+#define _delay_loop_1 static _delay_loop_1
+#define _delay_loop_2 static _delay_loop_2
#define __DELAY_BACKWARD_COMPATIBLE__
#endif
-#include <delay.h>
+#include <util/delay.h>
#ifdef PROTOTYPING