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 PWM instance. | |
fsm_rt_t | vsf_pwm_disable (vsf_pwm_t *pwm_ptr) |
Disable a 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) |
Set PWM period in nanoseconds. | |
vsf_err_t | vsf_pwm_set_us (vsf_pwm_t *pwm_ptr, uint8_t channel, uint32_t period_us, uint32_t pulse_us) |
Set PWM period in microseconds. | |
vsf_err_t | vsf_pwm_set_ms (vsf_pwm_t *pwm_ptr, uint8_t channel, uint32_t period_ms, uint32_t pulse_ms) |
Set PWM period in milliseconds. | |
#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 | pointer to structure vsf_pwm_t |
[in] | cfg_ptr | pointer to configuration structure vsf_pwm_cfg_t |
void vsf_pwm_fini | ( | vsf_pwm_t * | pwm_ptr | ) |
Enable PWM instance.
[in] | pwm_ptr | pointer to structure vsf_pwm_t |
Disable a PWM instance.
[in] | pwm_ptr | a pointer to structure vsf_pwm_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.
[in] | pwm_ptr | a pointer to structure vsf_pwm_t |
Set PWM period in nanoseconds.
[in] | pwm_ptr | a pointer to structure vsf_pwm_t |
[in] | channel | PWM channel |
[in] | period | PWM period width (in nanoseconds) |
[in] | pulse | PWM pulse width (in nanoseconds) |
Set PWM period in microseconds.
[in] | pwm_ptr | a pointer to structure vsf_pwm_t |
[in] | channel | PWM channel |
[in] | period | PWM period width (in microseconds) |
[in] | pulse | PWM pulse width (in microseconds) |
Set PWM period in milliseconds.
[in] | pwm_ptr | a pointer to structure vsf_pwm_t |
[in] | channel | PWM channel |
[in] | period | PWM period width (in milliseconds) |
[in] | pulse | PWM pulse width (in milliseconds) |