diff options
Diffstat (limited to 'hardware.cpp')
-rw-r--r-- | hardware.cpp | 28 |
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(); +} |