1 /*
2  * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #pragma once
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 #include "esp_err.h"
14 #include "esp_intr_alloc.h"
15 #include "soc/soc_caps.h"
16 #include "hal/uart_types.h"
17 
18 // Valid UART port number
19 #define UART_NUM_0             (0) /*!< UART port 0 */
20 #define UART_NUM_1             (1) /*!< UART port 1 */
21 #if SOC_UART_NUM > 2
22 #define UART_NUM_2             (2) /*!< UART port 2 */
23 #endif
24 #define UART_NUM_MAX           (SOC_UART_NUM) /*!< UART port max */
25 
26 /* @brief When calling `uart_set_pin`, instead of GPIO number, `UART_PIN_NO_CHANGE`
27  *        can be provided to keep the currently allocated pin.
28  */
29 #define UART_PIN_NO_CHANGE      (-1)
30 
31 #define UART_FIFO_LEN           SOC_UART_FIFO_LEN       ///< Length of the UART HW FIFO
32 #define UART_BITRATE_MAX        SOC_UART_BITRATE_MAX    ///< Maximum configurable bitrate
33 
34 #ifdef __cplusplus
35 }
36 #endif
37