This repository has been archived on 2025-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
rc2007-rescue/hardware.cpp

34 lines
395 B
C++

#include "hardware.h"
#include "adc.h"
#include "i2c.h"
#include <avr/io.h>
#include <avr/interrupt.h>
void initHardware() {
DDRA = 0x00;
PORTA = 0xFF;
DDRB = 0xFF;
PORTB = 0x00;
DDRC = 0x7C;
PORTC = 0x83;
DDRD = 0xFF;
PORTD = 0x00;
TCCR0 = 0x62;
TCCR1A = 0xA1;
TCCR1B = 0x82;
TCCR2 = 0x18;
TIMSK = 0x01;
initADC();
initI2C();
sei();
}