40 #include "periph_cpu.h" 
   41 #include "periph_conf.h" 
   53 #define TIMER_DEV(x)        (x) 
   60 #define TIMER_UNDEF         (UINT_FAST8_MAX) 
   78 #ifndef TIM_FLAG_RESET_ON_SET 
   79 #define TIM_FLAG_RESET_ON_SET   (0x01) 
   89 #ifndef TIM_FLAG_RESET_ON_MATCH 
   90 #define TIM_FLAG_RESET_ON_MATCH (0x02) 
   99 #ifndef TIM_FLAG_SET_STOPPED 
  100 #define TIM_FLAG_SET_STOPPED    (0x04) 
  114 #ifndef HAVE_TIMER_ISR_CTX_T 
  249 __attribute__((pure))
 
  263 __attribute__((pure))
 
  345 #if defined(MODULE_PERIPH_TIMER_POLL) 
Platform-independent access to architecture details.
 
uword_t timer_query_freqs_numof(tim_t dev)
Get the number of different frequencies supported by the given timer.
 
unsigned int timer_read(tim_t dev)
Read the current value of the given timer device.
 
bool timer_poll_channel(tim_t dev, int channel)
Check whether a compare channel has matched.
 
void(* timer_cb_t)(void *arg, int channel)
Signature of event callback functions triggered from interrupts.
 
int timer_set_absolute(tim_t dev, int channel, unsigned int value)
Set an absolute timeout value for the given channel of the given timer.
 
uint32_t timer_get_closest_freq(tim_t dev, uint32_t target)
Search the frequency supported by the timer that is closest to a given target frequency,...
 
int timer_clear(tim_t dev, int channel)
Clear the given channel of the given timer device.
 
uint_fast8_t tim_t
Default timer type.
 
int timer_init(tim_t dev, uint32_t freq, timer_cb_t cb, void *arg)
Initialize the given timer.
 
uint32_t timer_query_freqs(tim_t dev, uword_t index)
Iterate over supported frequencies.
 
int timer_set_periodic(tim_t dev, int channel, unsigned int value, uint8_t flags)
Set an absolute timeout value for the given channel of the given timer.
 
void timer_stop(tim_t dev)
Stop the given timer.
 
uword_t timer_query_channel_numof(tim_t dev)
Get the number of timer channels for the given timer.
 
int timer_set(tim_t dev, int channel, unsigned int timeout)
Set a given timer channel for the given timer device.
 
void timer_start(tim_t dev)
Start the given timer.
 
uint< NUM > _t uword_t
Word sized unsigned integer.
 
Default interrupt context entry holding callback and argument.
 
void * arg
optional argument given to that callback
 
timer_cb_t cb
callback executed from timer interrupt
 
CPU specific part of the timer API.