|
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 a TIMER instance. | |
| fsm_rt_t | vsf_timer_disable (vsf_timer_t *timer_ptr) |
| Disable a 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_status_t | vsf_timer_status (vsf_timer_t *timer_ptr) |
| Get the status 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), used for change the period of TIMER dynamically. | |
| vsf_err_t | vsf_timer_ctrl (vsf_timer_t *timer_ptr, vsf_timer_ctrl_t ctrl, void *param) |
| Execute a control command on the TIMER instance. | |
| vsf_err_t | vsf_timer_channel_config (vsf_timer_t *timer_ptr, uint8_t channel, vsf_timer_channel_cfg_t *channel_ptr) |
| TIMER set the period width and pulse width for a channel. | |
| vsf_err_t | vsf_timer_channel_start (vsf_timer_t *timer_ptr, uint8_t channel) |
| start a TIMER channel | |
| vsf_err_t | vsf_timer_channel_stop (vsf_timer_t *timer_ptr, uint8_t channel) |
| stop a TIMER channel | |
| vsf_err_t | vsf_timer_channel_ctrl (vsf_timer_t *timer_ptr, uint8_t channel, vsf_timer_channel_ctrl_t ctrl, void *param) |
| Execute a control command on the TIMER channel. | |
| vsf_err_t | vsf_timer_get_configuration (vsf_timer_t *timer_ptr, vsf_timer_cfg_t *cfg_ptr) |
| Get the current configuration of a TIMER instance. | |
| #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 | pointer to Timer instance |
| [in] | cfg_ptr | pointer to configuration structure |
| void vsf_timer_fini | ( | vsf_timer_t * | timer_ptr | ) |
| fsm_rt_t vsf_timer_enable | ( | vsf_timer_t * | timer_ptr | ) |
Enable a TIMER instance.
| [in] | timer_ptr | a pointer to structure vsf_timer_t |
| fsm_rt_t vsf_timer_disable | ( | vsf_timer_t * | timer_ptr | ) |
Disable a TIMER instance.
| [in] | timer_ptr | a pointer to structure vsf_timer_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_status_t vsf_timer_status | ( | vsf_timer_t * | timer_ptr | ) |
Get the status of TIMER instance.
| [in] | timer_ptr | a pointer to structure vsf_timer_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), used for change the period of TIMER dynamically.
| [in] | timer_ptr | a pointer to structure vsf_timer_t |
| [in] | period | timer period width (in clock counter) |
| vsf_err_t vsf_timer_ctrl | ( | vsf_timer_t * | timer_ptr, |
| vsf_timer_ctrl_t | ctrl, | ||
| void * | param | ||
| ) |
Execute a control command on the TIMER instance.
| [in,out] | timer_ptr | Pointer to TIMER instance structure vsf_timer_t |
| [in] | ctrl | Control command from vsf_timer_ctrl_t enumeration |
| [in] | param | Command-specific parameter (can be NULL depending on command) |
| vsf_err_t vsf_timer_channel_config | ( | vsf_timer_t * | timer_ptr, |
| uint8_t | channel, | ||
| vsf_timer_channel_cfg_t * | channel_cfg_ptr | ||
| ) |
TIMER set the period width and pulse width for a channel.
| [in] | timer_ptr | a pointer to structure vsf_timer_t |
| [in] | channel | timer channel |
| [in] | channel_cfg_ptr | a pointer to structure vsf_timer_channel_cfg_t |
| vsf_err_t vsf_timer_channel_start | ( | vsf_timer_t * | timer_ptr, |
| uint8_t | channel | ||
| ) |
start a TIMER channel
| [in] | timer_ptr | a pointer to structure vsf_timer_t |
| [in] | channel | timer channel |
| vsf_err_t vsf_timer_channel_stop | ( | vsf_timer_t * | timer_ptr, |
| uint8_t | channel | ||
| ) |
stop a TIMER channel
| [in] | timer_ptr | a pointer to structure vsf_timer_t |
| [in] | channel | timer channel |
| vsf_err_t vsf_timer_channel_ctrl | ( | vsf_timer_t * | timer_ptr, |
| uint8_t | channel, | ||
| vsf_timer_channel_ctrl_t | ctrl, | ||
| void * | param | ||
| ) |
Execute a control command on the TIMER channel.
| [in,out] | timer_ptr | Pointer to TIMER instance structure vsf_timer_t |
| [in] | channel | timer channel |
| [in] | ctrl | Control command from vsf_timer_channel_ctrl_t enumeration |
| [in] | param | Command-specific parameter (can be NULL depending on command) |
| vsf_err_t vsf_timer_get_configuration | ( | vsf_timer_t * | timer_ptr, |
| vsf_timer_cfg_t * | cfg_ptr | ||
| ) |
Get the current configuration of a TIMER instance.
| [in] | timer_ptr | pointer to structure vsf_timer_t |
| [out] | cfg_ptr | pointer to configuration structure vsf_timer_cfg_t to store the current configuration |