libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
timer.c File Reference
Include dependency graph for timer.c:

Go to the source code of this file.

Functions

uint32_t timer_get_ticks (uint32_t timer)
 Get timer ticks. More...
 
void timer_set_mode (uint32_t timer, enum timer_mode mode)
 Set timer mode (counter/timer) More...
 
void timer_set_bitmode (uint32_t timer, enum timer_bitmode bitmode)
 Set timer bit mode (width) More...
 
void timer_start (uint32_t timer)
 Start the timer. More...
 
void timer_stop (uint32_t timer)
 Stop the timer. More...
 
void timer_clear (uint32_t timer)
 Clear the timer. More...
 
void timer_set_prescaler (uint32_t timer, uint8_t presc)
 Set prescaler value. More...
 
void timer_set_compare (uint32_t timer, uint8_t compare_num, uint32_t compare_val)
 Set compare register. More...
 
uint32_t timer_get_freq (uint32_t timer)
 Get the timer tick frequency. More...
 
uint32_t timer_get_cc (uint32_t timer, uint8_t compare_num)
 Get compare register. More...