From e26a1dc73313098cef235918d237f9b1a6e4cb5f Mon Sep 17 00:00:00 2001 From: neoraider Date: Wed, 4 Apr 2007 12:08:03 +0000 Subject: Rescue: Weitere Grundfunktionen implementiert --- hardware.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 hardware.cpp (limited to 'hardware.cpp') 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(); +} -- cgit v1.2.3