summaryrefslogtreecommitdiffstats
path: root/project.h
diff options
context:
space:
mode:
authorroot <root@no.no.james.local>2014-12-08 18:54:00 +0000
committerroot <root@no.no.james.local>2014-12-08 18:54:00 +0000
commit2b3926b72620d145f3eac4141601981a14017e6c (patch)
treecf927f17c2c239e4d55e61251f7f8e5335fc7bfa /project.h
parent889a8618729f90335db2f0f3caa01b664d416a01 (diff)
downloadrgb_ring-2b3926b72620d145f3eac4141601981a14017e6c.tar.gz
rgb_ring-2b3926b72620d145f3eac4141601981a14017e6c.tar.bz2
rgb_ring-2b3926b72620d145f3eac4141601981a14017e6c.zip
clean_up_prototypes
Diffstat (limited to 'project.h')
-rw-r--r--project.h33
1 files changed, 26 insertions, 7 deletions
diff --git a/project.h b/project.h
index d75338b..2d542fc 100644
--- a/project.h
+++ b/project.h
@@ -1,12 +1,38 @@
#define F_CPU 16000000
+
+#ifdef PROTOTYPING
+#define NOPROTO static
+#define inline
+//delay.h is broken we need to look after it
+#define __OPTIMIZE__
+#else
+#define NOPROTO
+#endif
+
+
#include <stdio.h>
#include <stdint.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
+
+#ifdef PROTOTYPING
+#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
+#endif
+
#include <util/delay.h>
+#ifdef PROTOTYPING
+#undef _delay_loop_2
+#undef _delay_loop_1
+#undef _delay_us
+#undef _delay_ms
+#endif
+
#include "uart.h"
#define UART_BAUD_RATE 115200
@@ -16,13 +42,6 @@
#define WS2812_PIN 1
#include "lib_ws2812.h"
-
-#ifdef PROTOTYPING
-#define NOPROTO static
-#else
-#define NOPROTO
-#endif
-
#define NOUNUSED __attribute__((unused))
#include "prototypes.h"