Copy project
This commit is contained in:
parent
ce7a467af7
commit
26a0fd884f
173 changed files with 157458 additions and 1 deletions
13
space_game/SpaceGame/src/hardware_access/timing/timing.h
Normal file
13
space_game/SpaceGame/src/hardware_access/timing/timing.h
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#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
|
||||
Loading…
Add table
Add a link
Reference in a new issue