summaryrefslogtreecommitdiffstats
path: root/hardware.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'hardware.cpp')
-rw-r--r--hardware.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/hardware.cpp b/hardware.cpp
index 51ae18e..e652dda 100644
--- a/hardware.cpp
+++ b/hardware.cpp
@@ -4,6 +4,7 @@
#include "i2c.h"
#include <avr/io.h>
+#include <avr/interrupt.h>
void initHardware() {
@@ -19,18 +20,15 @@ void initHardware() {
DDRD = 0xFF;
PORTD = 0x00;
- TCCR0 = 0x62;
- OCR0 = 0;
-
- TCCR1A = 0xA1;
- OCR1A = 0;
-
+ TCCR0 = 0x62;
+ TCCR1A = 0xA1;
TCCR1B = 0x82;
- OCR1B = 0;
-
TCCR2 = 0x18;
- OCR2 = 0;
+
+ TIMSK = 0x01;
initADC();
initI2C();
+
+ sei();
}