summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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