summaryrefslogtreecommitdiffstats
path: root/hardware.cpp
blob: 505cc9a0ed40fe701ca80cf8f65ef2df21e6eb40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "hardware.h"

#include "adc.h"
#include "i2c.h"
#include "stdlib.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;
  OCR0 = 0;
  OCR1A = 0;
  OCR1B = 0;
  
  initADC();
  initI2C();
}