VSF Documented
|
Go to the source code of this file.
Data Structures | |
struct | vsf_pwm_cfg_t |
struct | vsf_pwm_capability_t |
struct | vsf_pwm_op_t |
struct | vsf_pwm_t |
Typedefs | |
typedef struct vsf_pwm_cfg_t | vsf_pwm_cfg_t |
typedef struct vsf_pwm_capability_t | vsf_pwm_capability_t |
typedef struct vsf_pwm_t | vsf_pwm_t |
typedef struct vsf_pwm_op_t | vsf_pwm_op_t |
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_ms (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 | |
vsf_err_t | vsf_pwm_set_us (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 | |
vsf_err_t | vsf_pwm_set_ns (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 | |
#define VSF_PWM_CFG_MULTI_CLASS ENABLED |
#define VSF_PWM_CFG_PREFIX vsf |
#define VSF_PWM_CFG_FUNCTION_RENAME ENABLED |
#define VSF_PWM_CFG_REIMPLEMENT_TYPE_CFG DISABLED |
Redefine struct vsf_pwm_cfg_t. The vsf_pwm_isr_handler_t type also needs to be redefined For compatibility, members should not be deleted when struct vsf_pwm_cfg_t redefining.
#define VSF_PWM_CFG_REIMPLEMENT_TYPE_CAPABILITY DISABLED |
Redefine struct vsf_pwm_capability_t. For compatibility, members should not be deleted when struct vsf_pwm_capability_t redefining.
#define VSF_PWM_CFG_INHERT_HAL_CAPABILITY ENABLED |
#define VSF_PWM_APIS | ( | __prefix_name | ) |
#define __VSF_HAL_TEMPLATE_API VSF_HAL_TEMPLATE_API_FP |
#define __vsf_pwm_t VSF_MCONNECT(VSF_PWM_CFG_PREFIX, _pwm_t) |
#define vsf_pwm_init | ( | __PM, | |
... | |||
) | VSF_MCONNECT(VSF_PWM_CFG_PREFIX, _pwm_init) ((__vsf_pwm_t *)(__PM), ##__VA_ARGS__) |
#define vsf_pwm_fini | ( | __PM | ) | VSF_MCONNECT(VSF_PWM_CFG_PREFIX, _pwm_fini) ((__vsf_pwm_t *)(__PM)) |
#define vsf_pwm_enable | ( | __PM | ) | VSF_MCONNECT(VSF_PWM_CFG_PREFIX, _pwm_enable) ((__vsf_pwm_t *)(__PM)) |
#define vsf_pwm_disable | ( | __PM | ) | VSF_MCONNECT(VSF_PWM_CFG_PREFIX, _pwm_disable) ((__vsf_pwm_t *)(__PM)) |
#define vsf_pwm_capability | ( | __PM | ) | VSF_MCONNECT(VSF_PWM_CFG_PREFIX, _pwm_capability) ((__vsf_pwm_t *)(__PM)) |
#define vsf_pwm_set | ( | __PM, | |
... | |||
) | VSF_MCONNECT(VSF_PWM_CFG_PREFIX, _pwm_set) ((__vsf_pwm_t *)(__PM), ##__VA_ARGS__) |
#define vsf_pwm_get_freq | ( | __PM | ) | VSF_MCONNECT(VSF_PWM_CFG_PREFIX, _pwm_get_freq) ((__vsf_pwm_t *)(__PM)) |
typedef struct vsf_pwm_cfg_t vsf_pwm_cfg_t |
typedef struct vsf_pwm_capability_t vsf_pwm_capability_t |
typedef struct vsf_pwm_op_t vsf_pwm_op_t |
|
extern |
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 |
|
extern |
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 |
|
extern |
get the capability of pwm instance.
[in] | pwm_ptr | a pointer to structure vsf_pwm_t |
|
extern |
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 |
|
extern |
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) |
|
extern |
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) |
|
extern |
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) |