diff options
author | neoraider <devnull@localhost> | 2007-04-19 01:00:05 +0200 |
---|---|---|
committer | neoraider <devnull@localhost> | 2007-04-19 01:00:05 +0200 |
commit | e7eeeb0d4e825a175c67cd1c0256c91362517ebb (patch) | |
tree | 32cd6997837c9decb909dc36824ea7abc896c88e /hardware.cpp | |
parent | 847645b3cc8dd32b51f9c0a42d0b4308fa40e4a5 (diff) | |
download | rc2007-rescue-e7eeeb0d4e825a175c67cd1c0256c91362517ebb.tar rc2007-rescue-e7eeeb0d4e825a175c67cd1c0256c91362517ebb.zip |
Entfernungssensoren in Ordnung gebracht, Hindernisumfahrung implementiert.
Diffstat (limited to 'hardware.cpp')
-rw-r--r-- | hardware.cpp | 16 |
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(); } |