![]() |
Xyris
0.5
|
Go to the source code of this file.
Macros | |
#define | MAX_CALLBACKS 8 |
Typedefs | |
typedef void(* | voidfunc_t) () |
Functions | |
void | timer_init (uint32_t freq) |
void | sleep (uint32_t ms) |
void | timer_register_callback (void(*func)()) |
Variables | |
volatile uint32_t | timer_tick |
Programmable Interrupt Timer driver functions.
Definition in file timer.cpp.
void sleep | ( | uint32_t | ms | ) |
void timer_init | ( | uint32_t | freq | ) |
Initialize the CPU timer with the given frequency.
Sleep Timer Non-Busy Waiting Idea: Create a struct that contains the end time and the callback function pointer that should be called when timer_tick = end After each timer_tick we check our end time and call the function if we're equal.
Definition at line 31 of file timer.cpp.