VSF Documented
|
#include "hal/driver/driver.h"
Macros | |
#define | VSF_TIMER_CFG_FUNCTION_RENAME DISABLED |
Functions | |
vsf_err_t | vsf_timer_init (vsf_timer_t *timer_ptr, vsf_timer_cfg_t *cfg_ptr) |
initialize a timer instance. | |
void | vsf_timer_fini (vsf_timer_t *timer_ptr) |
finalize a timer instance. | |
fsm_rt_t | vsf_timer_enable (vsf_timer_t *timer_ptr) |
enable interrupt masks of timer instance. | |
fsm_rt_t | vsf_timer_disable (vsf_timer_t *timer_ptr) |
disable interrupt masks of timer instance. | |
void | vsf_timer_irq_enable (vsf_timer_t *timer_ptr, vsf_timer_irq_mask_t irq_mask) |
enable interrupt masks of timer instance. | |
void | vsf_timer_irq_disable (vsf_timer_t *timer_ptr, vsf_timer_irq_mask_t irq_mask) |
disable interrupt masks of timer instance. | |
vsf_timer_capability_t | vsf_timer_capability (vsf_timer_t *timer_ptr) |
get the capability of timer instance. | |
vsf_err_t | vsf_timer_set_period (vsf_timer_t *timer_ptr, uint32_t period) |
timer set period (maximum count) | |
vsf_err_t | vsf_timer_pwm_set (vsf_timer_t *timer_ptr, uint8_t channel, uint32_t period, uint32_t pulse) |
timer pwm set the period width and pulse width for a channel | |
#define VSF_TIMER_CFG_FUNCTION_RENAME DISABLED |
vsf_err_t vsf_timer_init | ( | vsf_timer_t * | timer_ptr, |
vsf_timer_cfg_t * | cfg_ptr | ||
) |
initialize a timer instance.
[in] | timer_ptr | a pointer to structure vsf_timer_t |
[in] | cfg_ptr | a pointer to structure vsf_timer_cfg_t |
void vsf_timer_fini | ( | vsf_timer_t * | timer_ptr | ) |
fsm_rt_t vsf_timer_enable | ( | vsf_timer_t * | timer_ptr | ) |
enable interrupt masks of timer instance.
[in] | timer_ptr | a pointer to structure vsf_timer_t |
[in] | irq_mask | one or more value of enum vsf_timer_irq_mask_t |
fsm_rt_t vsf_timer_disable | ( | vsf_timer_t * | timer_ptr | ) |
disable interrupt masks of timer instance.
[in] | timer_ptr | a pointer to structure vsf_timer_t |
[in] | irq_mask | one or more value of enum vsf_timer_irq_mask_t, vsf_timer_irq_mask_t |
void vsf_timer_irq_enable | ( | vsf_timer_t * | timer_ptr, |
vsf_timer_irq_mask_t | irq_mask | ||
) |
enable interrupt masks of timer instance.
[in] | timer_ptr | a pointer to structure vsf_timer_t |
[in] | irq_mask | one or more value of enum vsf_timer_irq_mask_t |
void vsf_timer_irq_disable | ( | vsf_timer_t * | timer_ptr, |
vsf_timer_irq_mask_t | irq_mask | ||
) |
disable interrupt masks of timer instance.
[in] | timer_ptr | a pointer to structure vsf_timer_t |
[in] | irq_mask | one or more value of enum vsf_timer_irq_mask_t, vsf_timer_irq_mask_t |
vsf_timer_capability_t vsf_timer_capability | ( | vsf_timer_t * | timer_ptr | ) |
get the capability of timer instance.
[in] | timer_ptr | a pointer to structure vsf_timer_t |
vsf_err_t vsf_timer_set_period | ( | vsf_timer_t * | timer_ptr, |
uint32_t | period | ||
) |
timer set period (maximum count)
[in] | timer_ptr | a pointer to structure vsf_timer_t |
[in] | period | timer period width (in clock counter) |
vsf_err_t vsf_timer_pwm_set | ( | vsf_timer_t * | timer_ptr, |
uint8_t | channel, | ||
uint32_t | period, | ||
uint32_t | pulse | ||
) |
timer pwm set the period width and pulse width for a channel
[in] | timer_ptr | a pointer to structure vsf_timer_t |
[in] | channel | timer pwm channel |
[in] | period | timer pwm period width (in clock counter) |
[in] | pulse | timer pwm pulse width (in clock counter) |