Bouffalo SDK
1.0
Bouffalolab Software Development Kit
|
![]() |
Modules | |
timer clock source definition | |
timer counter mode definition | |
timer compare id definition | |
timer capture polarity definition | |
Data Structures | |
struct | bflb_timer_config_s |
TIMER configuration structure. More... | |
struct | bflb_timer_capture_config_s |
TIMER capture configuration structure. More... | |
Functions | |
void | bflb_timer_init (struct bflb_device_s *dev, const struct bflb_timer_config_s *config) |
Initialize timer. More... | |
void | bflb_timer_deinit (struct bflb_device_s *dev) |
Deinitialize timer. More... | |
void | bflb_timer_start (struct bflb_device_s *dev) |
Start timer. More... | |
void | bflb_timer_stop (struct bflb_device_s *dev) |
Stop timer. More... | |
void | bflb_timer_set_preloadvalue (struct bflb_device_s *dev, uint32_t val) |
Set timer preload value. More... | |
void | bflb_timer_set_compvalue (struct bflb_device_s *dev, uint8_t cmp_no, uint32_t val) |
Set compare value of corresponding compare id. More... | |
uint32_t | bflb_timer_get_compvalue (struct bflb_device_s *dev, uint8_t cmp_no) |
Get compare value of corresponding compare id. More... | |
uint32_t | bflb_timer_get_countervalue (struct bflb_device_s *dev) |
Get timer counter value. More... | |
void | bflb_timer_compint_mask (struct bflb_device_s *dev, uint8_t cmp_no, bool mask) |
Enable or disable timer interrupt of corresponding compare id. More... | |
bool | bflb_timer_get_compint_status (struct bflb_device_s *dev, uint8_t cmp_no) |
Get timer interrupt status of corresponding compare id. More... | |
void | bflb_timer_compint_clear (struct bflb_device_s *dev, uint8_t cmp_no) |
Clear timer interrupt status of corresponding compare id. More... | |
void | bflb_timer_capture_init (struct bflb_device_s *dev, const struct bflb_timer_capture_config_s *config) |
uint32_t | bflb_timer_capture_get_pulsewidth (struct bflb_device_s *dev) |
uint32_t bflb_timer_capture_get_pulsewidth | ( | struct bflb_device_s * | dev | ) |
void bflb_timer_capture_init | ( | struct bflb_device_s * | dev, |
const struct bflb_timer_capture_config_s * | config | ||
) |
void bflb_timer_compint_clear | ( | struct bflb_device_s * | dev, |
uint8_t | cmp_no | ||
) |
Clear timer interrupt status of corresponding compare id.
[in] | dev | device handle |
[in] | cmp_no | compare id, use timer compare id definition |
void bflb_timer_compint_mask | ( | struct bflb_device_s * | dev, |
uint8_t | cmp_no, | ||
bool | mask | ||
) |
Enable or disable timer interrupt of corresponding compare id.
[in] | dev | device handle |
[in] | cmp_no | compare id, use timer compare id definition |
[in] | mask | true means disable, false means enable |
void bflb_timer_deinit | ( | struct bflb_device_s * | dev | ) |
Deinitialize timer.
[in] | dev | device handle |
bool bflb_timer_get_compint_status | ( | struct bflb_device_s * | dev, |
uint8_t | cmp_no | ||
) |
Get timer interrupt status of corresponding compare id.
[in] | dev | device handle |
[in] | cmp_no | compare id, use timer compare id definition |
uint32_t bflb_timer_get_compvalue | ( | struct bflb_device_s * | dev, |
uint8_t | cmp_no | ||
) |
Get compare value of corresponding compare id.
[in] | dev | device handle |
[in] | cmp_no | compare id, use timer compare id definition |
uint32_t bflb_timer_get_countervalue | ( | struct bflb_device_s * | dev | ) |
Get timer counter value.
[in] | dev | device handle |
void bflb_timer_init | ( | struct bflb_device_s * | dev, |
const struct bflb_timer_config_s * | config | ||
) |
Initialize timer.
[in] | dev | device handle |
[in] | config | pointer to save timer config |
void bflb_timer_set_compvalue | ( | struct bflb_device_s * | dev, |
uint8_t | cmp_no, | ||
uint32_t | val | ||
) |
Set compare value of corresponding compare id.
[in] | dev | device handle |
[in] | cmp_no | compare id, use timer compare id definition |
[in] | val | compare value |
void bflb_timer_set_preloadvalue | ( | struct bflb_device_s * | dev, |
uint32_t | val | ||
) |
Set timer preload value.
[in] | dev | device handle |
[in] | val | preload value |
void bflb_timer_start | ( | struct bflb_device_s * | dev | ) |
Start timer.
[in] | dev | device handle |
void bflb_timer_stop | ( | struct bflb_device_s * | dev | ) |
Stop timer.
[in] | dev | device handle |