High Level functions for UART. More...
Functions | |
| uart_status_en | uart_put_non_blocking (uart_instance_en id, uart_put_config_t *put_config) |
| uart_status_en | uart_get_non_blocking (uart_instance_en id, uart_get_config_t *xfer, uint32_t *received_chars) |
| uart_status_en | uart_abort_put (uart_instance_en id) |
| uart_status_en | uart_abort_get (uart_instance_en id) |
| uint32_t | uart_get_num_transmitted (uart_instance_en id) |
| uint32_t | uart_get_num_received (uart_instance_en id) |
| uart_put_status_en | uart_get_put_status (uart_instance_en id) |
| uart_get_status_en | uart_get_get_status (uart_instance_en id) |
High Level functions for UART.
| uart_status_en uart_put_non_blocking | ( | uart_instance_en | id, |
| uart_put_config_t * | put_config ) |
Initiates a non-blocking transmit operation over UART for the specified instance. Data is written to the UART transmit FIFO and the function returns immediately. If there is more data to write the interrupt is configured to write the remainder. Completion is handled via callback.
| id | UART Instance ID. |
| put_config | Pointer to the transmit configuration structure. |
| uart_status_en uart_get_non_blocking | ( | uart_instance_en | id, |
| uart_get_config_t * | xfer, | ||
| uint32_t * | received_chars ) |
Initiates a non-blocking receive operation over UART for the specified instance. Attempts to read data from the UART receive FIFO into the provided buffer and returns immediately with the number of bytes received so far. If there is still data to receive the interrupt is configured to read the remainder. Completion is handled via callback.
| id | UART Instance ID. |
| xfer | Pointer to the receive configuration structure. |
| received_chars | Pointer to a variable that stores the number of bytes already available in the RX FIFO |
| uart_status_en uart_abort_put | ( | uart_instance_en | id | ) |
Aborts any ongoing UART transmit (put) operation for the specified instance, releasing the transmitter and resetting the transmit state to idle.
| id | UART Instance ID. |
| uart_status_en uart_abort_get | ( | uart_instance_en | id | ) |
Aborts any ongoing UART receive (get) operation for the specified instance, releasing the receiver and resetting the receive state to idle. The RX FIFO will be retained.
| id | UART Instance ID. |
| uint32_t uart_get_num_transmitted | ( | uart_instance_en | id | ) |
Returns number of characters that have been shifted out since last call to uart_put_non_blocking for the specified instance.
| id | UART Instance ID. |
| uint32_t uart_get_num_received | ( | uart_instance_en | id | ) |
Returns number of characters that have been written into user buffer since last call to uart_get_non_blocking for the specified instance.
| id | UART Instance ID. |
| uart_put_status_en uart_get_put_status | ( | uart_instance_en | id | ) |
Returns the current transmit status of the UART for the specified instance.
| id | UART Instance ID. |
| uart_get_status_en uart_get_get_status | ( | uart_instance_en | id | ) |
Returns the current receive status of the UART for the specified instance.
| id | UART Instance ID. |