Go to the documentation of this file.
56 #include "ring_buffer.h"
59 #ifdef ENV_USE_FREERTOS
67 #ifdef HAL_UART_MODULE_ENABLED
292 #ifdef ENV_RTOS_USE_SEMP
304 uint16_t app_uart_receive_sem_sync(
app_uart_id_t id, uint8_t *p_data, uint16_t size);
317 uint16_t app_uart_transmit_sem_sync(
app_uart_id_t id, uint8_t *p_data, uint16_t size);
app_uart_pin_t rx
Set the configuration of UART RX pin.
app_uart_pin_cfg_t pin_cfg
the pin configuration information for the specified UART module.
app_io_pull_t pull
Specifies the Pull-up or Pull-Down activation for the selected pins.
uart_init_t init
UART communication parameters.
@ APP_UART_EVT_ABORT_RX
Requested RX abort completed.
app_uart_evt_type_t
UART event Enumerations definition.
uint16_t app_uart_transmit_sync(app_uart_id_t id, uint8_t *p_data, uint16_t size, uint32_t timeout)
Send an amount of data in blocking mode.
@ APP_UART_TYPE_MAX
Only for check parameter, not used as input parameters.
app_uart_mode_t use_mode
UART operate mode.
app_uart_id_t id
specified UART module ID.
@ APP_UART_TYPE_POLLING
Polling operation mode
app_uart_pin_t cts
Set the configuration of UART CTS pin.
uint16_t app_uart_deinit(app_uart_id_t id)
De-initialize the APP UART DRIVER peripheral.
uint16_t app_uart_init(app_uart_params_t *p_params, app_uart_evt_handler_t evt_handler, app_uart_tx_buf_t *tx_buffer)
Initialize the APP UART DRIVER according to the specified parameters in the app_uart_params_t and app...
app_io_pull_t
GPIO pull Enumerations definition.
app_io_type_t
GPIO type Enumerations definition.
@ APP_UART_EVT_ABORT_TX
Requested TX abort completed.
UART handle Structure definition.
UART parameters structure definition.
dma_channel_t tx_dma_channel
Specifies the dma channel of UART TX.
UART buffer structure definition.
uint32_t tx_buf_size
Size of the TX buffer.
app_uart_pin_t tx
Set the configuration of UART TX pin.
UART operate mode Enumerations definition.
UART init structure definition.
@ APP_UART_ID_0
UART module 0.
Header file containing functions prototypes of GPIO app library.
uint8_t * tx_buf
Pointer to the TX buffer.
void(* app_uart_evt_handler_t)(app_uart_evt_t *p_evt)
UART event callback definition.
app_uart_evt_type_t type
Type of event.
@ APP_UART_EVT_RX_DATA
Requested RX transfer completed.
uint16_t app_uart_receive_sync(app_uart_id_t id, uint8_t *p_data, uint16_t size, uint32_t timeout)
Receive an amount of data in blocking mode.
UART event structure definition.
uint16_t size
UART transmitted/received counter.
uint16_t app_uart_receive_async(app_uart_id_t id, uint8_t *p_data, uint16_t size)
Receive an amount of data in interrupt mode.
@ APP_UART_ID_MAX
Only for check parameter, not used as input parameters.
app_uart_type_t type
Specifies the operation mode of UART.
This file contains all the functions prototypes for the HAL module driver.
uint16_t app_uart_transmit_async(app_uart_id_t id, uint8_t *p_data, uint16_t size)
Send an amount of data in interrupt mode.
uart_handle_t * app_uart_get_handle(app_uart_id_t id)
Return the UART handle.
@ APP_UART_TYPE_INTERRUPT
Interrupt operation mode.
app_io_mux_t mux
Specifies the Peripheral to be connected to the selected pins.
app_uart_id_t
UART module Enumerations definition.
app_io_mux_t
GPIO mux Enumerations definition.
app_uart_pin_t rts
Set the configuration of UART RTS pin.
uint32_t pin
Specifies the IO pins to be configured.
@ APP_UART_TYPE_DMA
DMA operation mode
UART IO configuration Structures.
uint32_t error_code
UART Error code .
@ APP_UART_EVT_ERROR
Error reported by UART peripheral.
Header file of app rtos config code.
void app_uart_flush(app_uart_id_t id)
Flush all log entries from the buffer.
app_uart_type_t
UART operating mode Enumerations definition.
@ APP_UART_ID_1
UART module 1.
app_io_type_t type
Specifies the type of UART IO.
dma_channel_t rx_dma_channel
Specifies the dma channel of UART RX.
dma_channel_t
HAL DMA Channel Enumerations definition.
@ APP_UART_EVT_TX_CPLT
Requested TX transfer completed.