VSF Documented
|
#include "hal/driver/driver.h"
Macros | |
#define | VSF_USART_CFG_FUNCTION_RENAME DISABLED |
Functions | |
vsf_err_t | vsf_usart_init (vsf_usart_t *usart_ptr, vsf_usart_cfg_t *cfg_ptr) |
Initialize a USART instance. | |
void | vsf_usart_fini (vsf_usart_t *usart_ptr) |
Finalize a USART instance. | |
fsm_rt_t | vsf_usart_enable (vsf_usart_t *usart_ptr) |
Enable a USART instance. | |
fsm_rt_t | vsf_usart_disable (vsf_usart_t *usart_ptr) |
Disable a USART instance. | |
void | vsf_usart_irq_enable (vsf_usart_t *usart_ptr, vsf_usart_irq_mask_t irq_mask) |
Enable interrupt masks of USART instance. | |
void | vsf_usart_irq_disable (vsf_usart_t *usart_ptr, vsf_usart_irq_mask_t irq_mask) |
Disable interrupt masks of USART instance. | |
vsf_usart_status_t | vsf_usart_status (vsf_usart_t *usart_ptr) |
Get the status of USART instance. | |
vsf_usart_capability_t | vsf_usart_capability (vsf_usart_t *usart_ptr) |
Get the capability of USART instance. | |
uint_fast16_t | vsf_usart_rxfifo_get_data_count (vsf_usart_t *usart_ptr) |
Get the number of data currently received in the USART receive FIFO. | |
uint_fast16_t | vsf_usart_rxfifo_read (vsf_usart_t *usart_ptr, void *buffer_ptr, uint_fast16_t count) |
uint_fast16_t | vsf_usart_txfifo_get_free_count (vsf_usart_t *usart_ptr) |
Get the maximum number of data that can be sent through the USART send FIFO. | |
uint_fast16_t | vsf_usart_txfifo_write (vsf_usart_t *usart_ptr, void *buffer_ptr, uint_fast16_t count) |
vsf_err_t | vsf_usart_request_rx (vsf_usart_t *usart_ptr, void *buffer_ptr, uint_fast32_t count) |
Request a DMA receive operation through the USART. | |
vsf_err_t | vsf_usart_request_tx (vsf_usart_t *usart_ptr, void *buffer_ptr, uint_fast32_t count) |
Request a DMA transmit operation through the USART. | |
vsf_err_t | vsf_usart_cancel_rx (vsf_usart_t *usart_ptr) |
Cancel an ongoing USART receive operation. | |
vsf_err_t | vsf_usart_cancel_tx (vsf_usart_t *usart_ptr) |
Cancel an ongoing USART transmit operation. | |
int_fast32_t | vsf_usart_get_rx_count (vsf_usart_t *usart_ptr) |
Get the number of bytes received in the current or last USART operation. | |
int_fast32_t | vsf_usart_get_tx_count (vsf_usart_t *usart_ptr) |
Get the number of bytes transmitted in the current or last USART operation. | |
vsf_err_t | vsf_usart_ctrl (vsf_usart_t *usart_ptr, vsf_usart_ctrl_t ctrl, void *param) |
Execute a control command on the USART instance. | |
#define VSF_USART_CFG_FUNCTION_RENAME DISABLED |
vsf_err_t vsf_usart_init | ( | vsf_usart_t * | usart_ptr, |
vsf_usart_cfg_t * | cfg_ptr | ||
) |
Initialize a USART instance.
[in] | usart_ptr | Pointer to USART instance |
[in] | cfg_ptr | Pointer to USART configuration |
void vsf_usart_fini | ( | vsf_usart_t * | usart_ptr | ) |
fsm_rt_t vsf_usart_enable | ( | vsf_usart_t * | usart_ptr | ) |
Enable a USART instance.
[in] | usart_ptr | a pointer to structure vsf_usart_t |
fsm_rt_t vsf_usart_disable | ( | vsf_usart_t * | usart_ptr | ) |
Disable a USART instance.
[in] | usart_ptr | a pointer to structure vsf_usart_t |
void vsf_usart_irq_enable | ( | vsf_usart_t * | usart_ptr, |
vsf_usart_irq_mask_t | irq_mask | ||
) |
Enable interrupt masks of USART instance.
[in] | usart_ptr | a pointer to structure vsf_usart_t |
[in] | irq_mask | one or more values of enum vsf_usart_irq_mask_t |
void vsf_usart_irq_disable | ( | vsf_usart_t * | usart_ptr, |
vsf_usart_irq_mask_t | irq_mask | ||
) |
Disable interrupt masks of USART instance.
[in] | usart_ptr | a pointer to structure vsf_usart_t |
[in] | irq_mask | one or more values of enum vsf_usart_irq_mask_t |
vsf_usart_status_t vsf_usart_status | ( | vsf_usart_t * | usart_ptr | ) |
Get the status of USART instance.
[in] | usart_ptr | a pointer to structure vsf_usart_t |
vsf_usart_capability_t vsf_usart_capability | ( | vsf_usart_t * | usart_ptr | ) |
Get the capability of USART instance.
[in] | usart_ptr | a pointer to structure vsf_usart_t |
uint_fast16_t vsf_usart_rxfifo_get_data_count | ( | vsf_usart_t * | usart_ptr | ) |
Get the number of data currently received in the USART receive FIFO.
[in] | usart_ptr | a pointer to structure vsf_usart_t |
uint_fast16_t vsf_usart_rxfifo_read | ( | vsf_usart_t * | usart_ptr, |
void * | buffer_ptr, | ||
uint_fast16_t | count | ||
) |
uint_fast16_t vsf_usart_txfifo_get_free_count | ( | vsf_usart_t * | usart_ptr | ) |
Get the maximum number of data that can be sent through the USART send FIFO.
[in] | usart_ptr | a pointer to structure vsf_usart_t |
uint_fast16_t vsf_usart_txfifo_write | ( | vsf_usart_t * | usart_ptr, |
void * | buffer_ptr, | ||
uint_fast16_t | count | ||
) |
vsf_err_t vsf_usart_request_rx | ( | vsf_usart_t * | usart_ptr, |
void * | buffer_ptr, | ||
uint_fast32_t | count | ||
) |
Request a DMA receive operation through the USART.
[in] | usart_ptr | a pointer to structure vsf_usart_t |
[in] | buffer_ptr | Pointer to the receive buffer |
[in] | count | Number of bytes to receive |
vsf_err_t vsf_usart_request_tx | ( | vsf_usart_t * | usart_ptr, |
void * | buffer_ptr, | ||
uint_fast32_t | count | ||
) |
Request a DMA transmit operation through the USART.
[in] | usart_ptr | a pointer to structure vsf_usart_t |
[in] | buffer_ptr | Pointer to the transmit buffer |
[in] | count | Number of bytes to transmit |
vsf_err_t vsf_usart_cancel_rx | ( | vsf_usart_t * | usart_ptr | ) |
Cancel an ongoing USART receive operation.
[in] | usart_ptr | a pointer to structure vsf_usart_t |
vsf_err_t vsf_usart_cancel_tx | ( | vsf_usart_t * | usart_ptr | ) |
Cancel an ongoing USART transmit operation.
[in] | usart_ptr | a pointer to structure vsf_usart_t |
int_fast32_t vsf_usart_get_rx_count | ( | vsf_usart_t * | usart_ptr | ) |
Get the number of bytes received in the current or last USART operation.
[in] | usart_ptr | a pointer to structure vsf_usart_t |
int_fast32_t vsf_usart_get_tx_count | ( | vsf_usart_t * | usart_ptr | ) |
Get the number of bytes transmitted in the current or last USART operation.
[in] | usart_ptr | a pointer to structure vsf_usart_t |
vsf_err_t vsf_usart_ctrl | ( | vsf_usart_t * | usart_ptr, |
vsf_usart_ctrl_t | ctrl, | ||
void * | param | ||
) |
Execute a control command on the USART instance.
[in] | usart_ptr | a pointer to structure vsf_usart_t |
[in] | ctrl | Control command from vsf_usart_ctrl_t enumeration |
[in,out] | param | Command-specific parameter (can be NULL depending on command) |