Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_timer.h
1 #ifndef _BC_TIMER_H
2 #define _BC_TIMER_H
3 
4 #include <bc_system.h>
5 #include <stm32l0xx.h>
6 
10 
11 extern const uint16_t _bc_timer_prescaler_lut[3];
12 
14 
15 void bc_timer_init(void);
16 
18 
19 void bc_timer_start(void);
20 
23 
24 uint16_t bc_timer_get_microseconds(void);
25 
28 
29 void bc_timer_delay(uint16_t microseconds);
30 
32 
33 void bc_timer_clear(void);
34 
36 
37 void bc_timer_stop(void);
38 
43 
44 bool bc_timer_set_irq_handler(TIM_TypeDef *tim, void (*irq_handler)(void *), void *irq_param);
45 
48 
49 void bc_timer_clear_irq_handler(TIM_TypeDef *tim);
50 
52 
53 #endif // _BC_TIMER_H
void bc_timer_start(void)
Start timer.
Definition: bc_timer.c:24
void bc_timer_delay(uint16_t microseconds)
Relative delay.
Definition: bc_timer.c:40
void bc_timer_stop(void)
Stop timer.
Definition: bc_timer.c:55
void bc_timer_clear(void)
Clear timer counter.
Definition: bc_timer.c:50
uint16_t bc_timer_get_microseconds(void)
Get actual tick of timer.
Definition: bc_timer.c:35
bool bc_timer_set_irq_handler(TIM_TypeDef *tim, void(*irq_handler)(void *), void *irq_param)
Register timer IRQ handler.
Definition: bc_timer.c:68
void bc_timer_clear_irq_handler(TIM_TypeDef *tim)
Unregister timer IRQ handler.
Definition: bc_timer.c:60
void bc_timer_init(void)
Initialize timer.
Definition: bc_timer.c:18