summaryrefslogtreecommitdiffstats
path: root/hardware.cpp
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2007-04-04 14:08:03 +0200
committerneoraider <devnull@localhost>2007-04-04 14:08:03 +0200
commite26a1dc73313098cef235918d237f9b1a6e4cb5f (patch)
tree0dfc7f873db2f228b39509daed9b1e01cb5739dd /hardware.cpp
parentdc1306244e3a7853c31cd94c5ac3d97aa6e6c0d5 (diff)
downloadrc2007-rescue-e26a1dc73313098cef235918d237f9b1a6e4cb5f.tar
rc2007-rescue-e26a1dc73313098cef235918d237f9b1a6e4cb5f.zip
Rescue: Weitere Grundfunktionen implementiert
Diffstat (limited to 'hardware.cpp')
-rw-r--r--hardware.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/hardware.cpp b/hardware.cpp
new file mode 100644
index 0000000..41c7ea2
--- /dev/null
+++ b/hardware.cpp
@@ -0,0 +1,28 @@
+#include "hardware.h"
+#include "adc.h"
+#include "i2c.h"
+
+
+void initHardware() {
+ DDRA = 0x00;
+ PORTA = 0xFF;
+
+ DDRB = 0xFF;
+ PORTB = 0x00;
+
+ DDRC = 0x7C;
+ PORTC = 0x83;
+
+ DDRD = 0xFF;
+ PORTC = 0x00;
+
+ TCCR0 = 0x62;
+ TCCR1A = 0xA1;
+ TCCR1B = 0x82;
+ OCR0 = 0;
+ OCR1A = 0;
+ OCR1B = 0;
+
+ initADC();
+ initI2C();
+}