#include "system.h"

void pins_setup();

void system_setup(){
	// No prescaler -> 8MHz
	CLKPR = 0x80;
	CLKPR = 0x00;
	
	pins_setup();
	timer_setup();
	adc_setup();
}


void pins_setup(){
	DDRB |= 0b11111111;
	DDRC |= 0b00000000;
	DDRD |= 0b11111110;
	PORTB = 0x00;
	PORTC = 0x20; //Enable Mode pullup
	PORTD = 0xF0;
	
	MCUCR &= ~(1<<PUD); //Global enable pullup
}

