libdragon
Macros | Functions
timer.c File Reference

Timer Subsystem. More...

Macros

#define TF_CONTEXT   0x20
 Timer callback expects a context parameter.
 
#define TF_OVERFLOW   0x40
 Timer is the special overflow timer.
 
#define TF_CALLED   0x80
 Timer has been called once in this interrupt.
 

Functions

void timer_init (void)
 Initialize the timer subsystem. More...
 
timer_link_tnew_timer (int ticks, int flags, timer_callback1_t callback)
 Create a new timer and add to list. More...
 
timer_link_tnew_timer_context (int ticks, int flags, timer_callback2_t callback, void *ctx)
 Create a new timer with context and add to list. More...
 
void start_timer (timer_link_t *timer, int ticks, int flags, timer_callback1_t callback)
 Start a timer (not currently in the list) More...
 
void start_timer_context (timer_link_t *timer, int ticks, int flags, timer_callback2_t callback, void *ctx)
 Start a timer (not currently in the list) with context. More...
 
void restart_timer (timer_link_t *timer)
 Reset a timer and add to list. More...
 
void stop_timer (timer_link_t *timer)
 Stop a timer and remove it from the list. More...
 
void delete_timer (timer_link_t *timer)
 Remove a timer from the list and delete it. More...
 
void timer_close (void)
 Free and close the timer subsystem. More...
 
long long timer_ticks (void)
 Return total ticks since timer was initialized, as a 64-bit counter. More...
 

Detailed Description

Timer Subsystem.