ad-astra/space_game/SpaceGame/src/hardware_access/timing/timing.h
schmelczerandras 26a0fd884f Copy project
2020-04-19 12:48:06 +02:00

13 lines
256 B
C

#ifndef TIMING_H
#define TIMING_H
#include <avr/io.h>
#include "bitwise.h"
inline void initializeTiming() {
TCCR0B = BV(CS02); // CLK / 256
TCCR1 = BV(CS13); // CLK / 128
TIMSK = BV(OCIE0A) | BV(OCIE1A); // enable compare interrupts
}
#endif