Created
December 3, 2012 05:38
-
-
Save WickedDevice/4192982 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* timebase.h | |
* | |
* Created on: Dec 3, 2012 | |
* Author: vic | |
*/ | |
#ifndef TIMEBASE_H_ | |
#define TIMEBASE_H_ | |
// timer 0 is set up as a 1ms time base | |
#define TIMER0_1MS_OVERFOW_PRESCALER 3 // 8MHz / 64 = 125 kHz | |
#define TIMER0_1MS_OVERFLOW_TCNT 131 // 255 - 131 + 1 = 125 ticks | |
void timebase_init(); | |
uint32_t timebase_now(); | |
#endif /* TIMEBASE_H_ */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment