EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #480 background imageLoading...
Page #480 background image
Chapter 2. API Reference
Parameters
uart_num: UART port number, the max port number is (UART_NUM_MAX -1).
level: 1: RTS output low (active); 0: RTS output high (block)
esp_err_t uart_set_dtr(uart_port_t uart_num, int level)
Manually set the UART DTR pin level.
Return
ESP_OK Success
ESP_FAIL Parameter error
Parameters
uart_num: UART port number, the max port number is (UART_NUM_MAX -1).
level: 1: DTR output low; 0: DTR output high
esp_err_t uart_set_tx_idle_num(uart_port_t uart_num, uint16_t idle_num)
Set UART idle interval after tx FIFO is empty.
Return
ESP_OK Success
ESP_FAIL Parameter error
Parameters
uart_num: UART port number, the max port number is (UART_NUM_MAX -1).
idle_num: idle interval after tx FIFO is empty(unit: the time it takes to send one bit under current
baudrate)
esp_err_t uart_param_config(uart_port_t uart_num, const uart_config_t *uart_config)
Set UART configuration parameters.
Return
ESP_OK Success
ESP_FAIL Parameter error
Parameters
uart_num: UART port number, the max port number is (UART_NUM_MAX -1).
uart_config: UART parameter settings
esp_err_t uart_intr_config(uart_port_t uart_num, const uart_intr_config_t *intr_conf)
Configure UART interrupts.
Return
ESP_OK Success
ESP_FAIL Parameter error
Parameters
uart_num: UART port number, the max port number is (UART_NUM_MAX -1).
intr_conf: UART interrupt settings
esp_err_t uart_wait_tx_done(uart_port_t uart_num, TickType_t ticks_to_wait)
Wait until UART TX FIFO is empty.
Return
ESP_OK Success
ESP_FAIL Parameter error
ESP_ERR_TIMEOUT Timeout
Parameters
uart_num: UART port number, the max port number is (UART_NUM_MAX -1).
ticks_to_wait: Timeout, count in RTOS ticks
int uart_tx_chars(uart_port_t uart_num, const char *buer, uint32_t len)
Send data to the UART port from a given buffer and length.
This function will not wait for enough space in TX FIFO. It will just fill the available TX FIFO and return
when the FIFO is full.
Note This function should only be used when UART TX buffer is not enabled.
Return
(-1) Parameter error
Espressif Systems 469
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Espressif ESP32-S2 and is the answer not in the manual?

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish