aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/stubbed/avr/fuse.h12
-rw-r--r--test/stubbed/avr/io.h42
-rw-r--r--test/stubbed/util/delay.h6
3 files changed, 40 insertions, 20 deletions
diff --git a/test/stubbed/avr/fuse.h b/test/stubbed/avr/fuse.h
new file mode 100644
index 0000000..be579d3
--- /dev/null
+++ b/test/stubbed/avr/fuse.h
@@ -0,0 +1,12 @@
+#ifndef STUB_AVR_FUSE
+#define STUB_AVR_FUSE
+
+struct __fuses_t {
+ int high;
+ int low;
+ int extended;
+};
+
+#define FUSES const struct __fuses_t _watch_mcu_fuses_configuration
+
+#endif
diff --git a/test/stubbed/avr/io.h b/test/stubbed/avr/io.h
index cd4a7bc..cfbdef3 100644
--- a/test/stubbed/avr/io.h
+++ b/test/stubbed/avr/io.h
@@ -1,24 +1,28 @@
+#ifndef STUB_AVR_IO
+#define STUB_AVR_IO
#include <stdio.h>
-int DDRA = 0;
-int DDRB = 0;
+static int DDRA = 0;
+static int DDRB = 0;
-int PORTA = 0;
-int PORTB = 0;
+static int PORTA = 0;
+static int PORTB = 0;
+static int PINA = 0;
+static int PINB = 0;
-int PA1 = 1;
-int PA2 = 2;
-int PA3 = 3;
-int PA4 = 4;
-int PA5 = 5;
-int PA6 = 6;
-int PA7 = 7;
-
-int PB1 = 1;
-int PB2 = 2;
-int PB3 = 3;
-int PB4 = 4;
-int PB5 = 5;
-int PB6 = 6;
-int PB7 = 7;
+#define PA1 1
+#define PA2 2
+#define PA3 3
+#define PA4 4
+#define PA5 5
+#define PA6 6
+#define PA7 7
+#define PB1 1
+#define PB2 2
+#define PB3 3
+#define PB4 4
+#define PB5 5
+#define PB6 6
+#define PB7 7
+#endif
diff --git a/test/stubbed/util/delay.h b/test/stubbed/util/delay.h
index ce4323e..db61690 100644
--- a/test/stubbed/util/delay.h
+++ b/test/stubbed/util/delay.h
@@ -1,5 +1,9 @@
+#ifndef STUB_UTIL_DELAY
+#define STUB_UTIL_DELAY
+
#include <unistd.h>
-void _delay_ms(int ms) {
+static void _delay_ms(int ms) {
usleep(ms * 1000);
}
+#endif