Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_timer

Driver for timer. More...

Functions

void bc_timer_init (void)
 Initialize timer.
 
void bc_timer_start (void)
 Start timer.
 
uint16_t bc_timer_get_microseconds (void)
 Get actual tick of timer. More...
 
void bc_timer_delay (uint16_t microseconds)
 Relative delay. More...
 
void bc_timer_clear (void)
 Clear timer counter.
 
void bc_timer_stop (void)
 Stop timer.
 
bool bc_timer_set_irq_handler (TIM_TypeDef *tim, void(*irq_handler)(void *), void *irq_param)
 Register timer IRQ handler. More...
 
void bc_timer_clear_irq_handler (TIM_TypeDef *tim)
 Unregister timer IRQ handler. More...
 

Variables

const uint16_t _bc_timer_prescaler_lut [3]
 

Detailed Description

Driver for timer.

Function Documentation

void bc_timer_clear_irq_handler ( TIM_TypeDef *  tim)

Unregister timer IRQ handler.

Parameters
[in]timTimer, e.g. TIM3

Definition at line 60 of file bc_timer.c.

void bc_timer_delay ( uint16_t  microseconds)
inline

Relative delay.

Parameters
[in]ticktick to delay in us

Definition at line 40 of file bc_timer.c.

Referenced by bc_hc_sr04_measure(), bc_spi_transfer(), bc_tag_nfc_init(), bc_tag_nfc_memory_write(), bc_zssc3123_eeprom_read(), and bc_zssc3123_eeprom_write().

Here is the call graph for this function:

Here is the caller graph for this function:

uint16_t bc_timer_get_microseconds ( void  )
inline

Get actual tick of timer.

Returns
Actual state of timer counter (microseconds from start)

Definition at line 35 of file bc_timer.c.

Referenced by bc_timer_delay().

Here is the caller graph for this function:

bool bc_timer_set_irq_handler ( TIM_TypeDef *  tim,
void(*)(void *)  irq_handler,
void *  irq_param 
)

Register timer IRQ handler.

Parameters
[in]timTimer, e.g. TIM3
[in]irq_handlerpointer to IRQ handler function
[in]irq_paramparameter

Definition at line 68 of file bc_timer.c.

Referenced by bc_rf_ook_send().

Here is the caller graph for this function: