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 #476 background imageLoading...
Page #476 background image
Chapter 2. API Reference
Return
true driver is installed
false driver is not installed
Parameters
uart_num: UART port number, the max port number is (UART_NUM_MAX -1).
esp_err_t uart_set_word_length(uart_port_t uart_num, uart_word_length_t data_bit)
Set UART data bits.
Return
ESP_OK Success
ESP_FAIL Parameter error
Parameters
uart_num: UART port number, the max port number is (UART_NUM_MAX -1).
data_bit: UART data bits
esp_err_t uart_get_word_length(uart_port_t uart_num, uart_word_length_t *data_bit)
Get the UART data bit configuration.
Return
ESP_FAIL Parameter error
ESP_OK Success, result will be put in (*data_bit)
Parameters
uart_num: UART port number, the max port number is (UART_NUM_MAX -1).
data_bit: Pointer to accept value of UART data bits.
esp_err_t uart_set_stop_bits(uart_port_t uart_num, uart_stop_bits_t stop_bits)
Set UART stop bits.
Return
ESP_OK Success
ESP_FAIL Fail
Parameters
uart_num: UART port number, the max port number is (UART_NUM_MAX -1).
stop_bits: UART stop bits
esp_err_t uart_get_stop_bits(uart_port_t uart_num, uart_stop_bits_t *stop_bits)
Get the UART stop bit configuration.
Return
ESP_FAIL Parameter error
ESP_OK Success, result will be put in (*stop_bit)
Parameters
uart_num: UART port number, the max port number is (UART_NUM_MAX -1).
stop_bits: Pointer to accept value of UART stop bits.
esp_err_t uart_set_parity(uart_port_t uart_num, uart_parity_t parity_mode)
Set UART parity mode.
Return
ESP_FAIL Parameter error
ESP_OK Success
Parameters
uart_num: UART port number, the max port number is (UART_NUM_MAX -1).
parity_mode: the enum of uart parity configuration
esp_err_t uart_get_parity(uart_port_t uart_num, uart_parity_t *parity_mode)
Get the UART parity mode configuration.
Return
ESP_FAIL Parameter error
ESP_OK Success, result will be put in (*parity_mode)
Parameters
uart_num: UART port number, the max port number is (UART_NUM_MAX -1).
Espressif Systems 465
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