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 interrupt masks of usart instance. | |
fsm_rt_t | vsf_usart_disable (vsf_usart_t *usart_ptr) |
disable interrupt masks of 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) |
try to read the maximum length of data from the usart receive fifo | |
uint_fast16_t | vsf_usart_txfifo_get_free_count (vsf_usart_t *usart_ptr) |
try to get the maximum number of data that can be sent from the usart send fifo | |
uint_fast16_t | vsf_usart_txfifo_write (vsf_usart_t *usart_ptr, void *buffer_ptr, uint_fast16_t count) |
try to write the maximum length of data from the usart send fifo | |
vsf_err_t | vsf_usart_request_rx (vsf_usart_t *usart_ptr, void *buffer_ptr, uint_fast32_t count) |
usart request to receive data of specified length | |
vsf_err_t | vsf_usart_request_tx (vsf_usart_t *usart_ptr, void *buffer_ptr, uint_fast32_t count) |
usart request to send data of specified length | |
vsf_err_t | vsf_usart_cancel_rx (vsf_usart_t *usart_ptr) |
cancel current current receive request | |
vsf_err_t | vsf_usart_cancel_tx (vsf_usart_t *usart_ptr) |
cancel current send request | |
int_fast32_t | vsf_usart_get_rx_count (vsf_usart_t *usart_ptr) |
get the number of current receive requests that have been received | |
int_fast32_t | vsf_usart_get_tx_count (vsf_usart_t *usart_ptr) |
get the number of current send requests that have been sended | |
vsf_err_t | vsf_usart_cmd (vsf_usart_t *usart_ptr, vsf_usart_cmd_t cmd, void *param) |
Calls the specified usart command. | |
#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 | a pointer to structure vsf_usart_t |
[in] | cfg_ptr | a pointer to structure vsf_usart_cfg_t |
void vsf_usart_fini | ( | vsf_usart_t * | usart_ptr | ) |
fsm_rt_t vsf_usart_enable | ( | vsf_usart_t * | usart_ptr | ) |
enable interrupt masks of usart instance.
[in] | usart_ptr | a pointer to structure vsf_usart_t |
fsm_rt_t vsf_usart_disable | ( | vsf_usart_t * | usart_ptr | ) |
disable interrupt masks of 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 value 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 value of enum vsf_usart_irq_mask_t, 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 | ||
) |
try to read the maximum length of data from the usart receive fifo
[in] | usart_ptr | a pointer to structure vsf_usart_t |
[in] | buffer_ptr | data buffer |
[in] | count | maximum number of reads |
uint_fast16_t vsf_usart_txfifo_get_free_count | ( | vsf_usart_t * | usart_ptr | ) |
try to get the maximum number of data that can be sent from 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 | ||
) |
try to write the maximum length of data from the usart send fifo
[in] | usart_ptr | a pointer to structure vsf_usart_t |
[in] | buffer_ptr | data buffer |
[in] | count | maximum number of writes |
vsf_err_t vsf_usart_request_rx | ( | vsf_usart_t * | usart_ptr, |
void * | buffer_ptr, | ||
uint_fast32_t | count | ||
) |
usart request to receive data of specified length
[in] | usart_ptr | a pointer to structure vsf_usart_t |
[in] | buffer_ptr | data buffer |
[in] | count | number of requested data |
vsf_err_t vsf_usart_request_tx | ( | vsf_usart_t * | usart_ptr, |
void * | buffer_ptr, | ||
uint_fast32_t | count | ||
) |
usart request to send data of specified length
[in] | usart_ptr | a pointer to structure vsf_usart_t |
[in] | buffer_ptr | data buffer |
[in] | count | number of requested data |
vsf_err_t vsf_usart_cancel_rx | ( | vsf_usart_t * | usart_ptr | ) |
cancel current current receive request
[in] | usart_ptr | a pointer to structure vsf_usart_t |
vsf_err_t vsf_usart_cancel_tx | ( | vsf_usart_t * | usart_ptr | ) |
cancel current send request
[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 current receive requests that have been received
[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 current send requests that have been sended
[in] | usart_ptr | a pointer to structure vsf_usart_t |
vsf_err_t vsf_usart_cmd | ( | vsf_usart_t * | usart_ptr, |
vsf_usart_cmd_t | cmd, | ||
void * | param | ||
) |
Calls the specified usart command.
[in] | usart_ptr | a pointer to structure vsf_usart_t |
[in] | cmd | usart command vsf_usart_cmd_t. |
[in] | param | the parameter of the command, its use is determined by the command |