From 7b9b489968c244c1cf2d2e9b149c4cc6aef1c27e Mon Sep 17 00:00:00 2001 From: Krzysztof Date: Wed, 28 Apr 2021 13:11:41 +0200 Subject: [PATCH] docs: Update type of uart_num in UART API Reference examples --- docs/en/api-reference/peripherals/uart.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/api-reference/peripherals/uart.rst b/docs/en/api-reference/peripherals/uart.rst index dd31838dbf..66b0c1c4d7 100644 --- a/docs/en/api-reference/peripherals/uart.rst +++ b/docs/en/api-reference/peripherals/uart.rst @@ -50,7 +50,7 @@ Call the function :cpp:func:`uart_param_config` and pass to it a :cpp:type:`uart .. code-block:: c - const int uart_num = {IDF_TARGET_UART_NUM}; + const uart_port_t uart_num = {IDF_TARGET_UART_NUM}; uart_config_t uart_config = { .baud_rate = 115200, .data_bits = UART_DATA_8_BITS, @@ -195,7 +195,7 @@ There is a 'companion' function :cpp:func:`uart_wait_tx_done` that monitors the .. code-block:: c // Wait for packet to be sent - const int uart_num = {IDF_TARGET_UART_NUM}; + const uart_port_t uart_num = {IDF_TARGET_UART_NUM}; ESP_ERROR_CHECK(uart_wait_tx_done(uart_num, 100)); // wait timeout is 100 RTOS ticks (TickType_t) @@ -207,7 +207,7 @@ Once the data is received by the UART and saved in the Rx FIFO buffer, it needs .. code-block:: c // Read data from UART. - const int uart_num = {IDF_TARGET_UART_NUM}; + const uart_port_t uart_num = {IDF_TARGET_UART_NUM}; uint8_t data[128]; int length = 0; ESP_ERROR_CHECK(uart_get_buffered_data_len(uart_num, (size_t*)&length));