VSF Documented
|
#include "hal/driver/driver.h"
Macros | |
#define | VSF_PWM_CFG_FUNCTION_RENAME DISABLED |
Functions | |
vsf_err_t | vsf_pwm_init (vsf_pwm_t *pwm_ptr, vsf_pwm_cfg_t *cfg_ptr) |
initialize a pwm instance. | |
void | vsf_pwm_fini (vsf_pwm_t *pwm_ptr) |
finalize a pwm instance. | |
fsm_rt_t | vsf_pwm_enable (vsf_pwm_t *pwm_ptr) |
enable interrupt masks of pwm instance. | |
fsm_rt_t | vsf_pwm_disable (vsf_pwm_t *pwm_ptr) |
disable interrupt masks of pwm instance. | |
vsf_pwm_capability_t | vsf_pwm_capability (vsf_pwm_t *pwm_ptr) |
get the capability of pwm instance. | |
vsf_err_t | vsf_pwm_set (vsf_pwm_t *pwm_ptr, uint8_t channel, uint32_t period, uint32_t pulse) |
pwm set the period width and pulse width for a channel | |
uint32_t | vsf_pwm_get_freq (vsf_pwm_t *pwm_ptr) |
pwm get clock frequency | |
vsf_err_t | vsf_pwm_set_ns (vsf_pwm_t *pwm_ptr, uint8_t channel, uint32_t period_ns, uint32_t pulse_ns) |
pwm set the period width and pulse width for a channel | |
vsf_err_t | vsf_pwm_set_us (vsf_pwm_t *pwm_ptr, uint8_t channel, uint32_t period_us, uint32_t pulse_us) |
pwm set the period width and pulse width for a channel | |
vsf_err_t | vsf_pwm_set_ms (vsf_pwm_t *pwm_ptr, uint8_t channel, uint32_t period_ms, uint32_t pulse_ms) |
pwm set the period width and pulse width for a channel | |
#define VSF_PWM_CFG_FUNCTION_RENAME DISABLED |
vsf_err_t vsf_pwm_init | ( | vsf_pwm_t * | pwm_ptr, |
vsf_pwm_cfg_t * | cfg_ptr | ||
) |
initialize a pwm instance.
[in] | pwm_ptr | a pointer to structure vsf_pwm_t |
[in] | cfg_ptr | a pointer to structure vsf_pwm_cfg_t |
void vsf_pwm_fini | ( | vsf_pwm_t * | pwm_ptr | ) |
enable interrupt masks of pwm instance.
[in] | pwm_ptr | a pointer to structure vsf_pwm_t |
[in] | irq_mask | one or more value of enum vsf_pwm_irq_mask_t |
disable interrupt masks of pwm instance.
[in] | pwm_ptr | a pointer to structure vsf_pwm_t |
[in] | irq_mask | one or more value of enum vsf_pwm_irq_mask_t, vsf_pwm_irq_mask_t |
vsf_pwm_capability_t vsf_pwm_capability | ( | vsf_pwm_t * | pwm_ptr | ) |
get the capability of pwm instance.
[in] | pwm_ptr | a pointer to structure vsf_pwm_t |
pwm set the period width and pulse width for a channel
[in] | pwm_ptr | a pointer to structure vsf_pwm_t |
[in] | channel | pwm channel |
[in] | period | pwm period width (in clock counter) |
[in] | pulse | pwm pulse width (in clock counter) |
pwm get clock frequency
Get clock frequency
[in] | pwm_ptr | pwm instance |
[in] | pwm_ptr | a pointer to structure vsf_pwm_t |
pwm set the period width and pulse width for a channel
[in] | pwm_ptr | a pointer to structure vsf_pwm_t |
[in] | channel | pwm channel |
[in] | period | pwm period width (in nano-second) |
[in] | pulse | pwm pulse width (in nano-second) |
pwm set the period width and pulse width for a channel
[in] | pwm_ptr | a pointer to structure vsf_pwm_t |
[in] | channel | pwm channel |
[in] | period | pwm period width (in micro-second) |
[in] | pulse | pwm pulse width (in micro-second) |
pwm set the period width and pulse width for a channel
[in] | pwm_ptr | a pointer to structure vsf_pwm_t |
[in] | channel | pwm channel |
[in] | period | pwm period width (in milli-second) |
[in] | pulse | pwm pulse width (in milli-second) |