@@ -48,6 +48,14 @@ extern "C" {
4848#define SERIAL_7O2 0x800003b
4949#define SERIAL_8O2 0x800003f
5050
51+ // These are Hardware Flow Contol possible usage
52+ // equivalent to UDF enum uart_hw_flowcontrol_t from
53+ // https://github.com/espressif/esp-idf/blob/master/components/hal/include/hal/uart_types.h#L75-L81
54+ #define HW_FLOWCTRL_DISABLE 0x0 // disable HW Flow Control
55+ #define HW_FLOWCTRL_RTS 0x1 // use only RTS PIN for HW Flow Control
56+ #define HW_FLOWCTRL_CTS 0x2 // use only CTS PIN for HW Flow Control
57+ #define HW_FLOWCTRL_CTS_RTS 0x3 // use both CTS and RTS PIN for HW Flow Control
58+
5159struct uart_struct_t ;
5260typedef struct uart_struct_t uart_t ;
5361
@@ -76,7 +84,12 @@ void uartSetDebug(uart_t* uart);
7684int uartGetDebug ();
7785
7886bool uartIsDriverInstalled (uart_t * uart );
79- void uartSetPins (uart_t * uart , uint8_t rxPin , uint8_t txPin );
87+
88+ // Negative Pin Number will keep it unmodified, thus this function can set individual pins
89+ void uartSetPins (uart_t * uart , int8_t rxPin , int8_t txPin , int8_t ctsPin , int8_t rtsPin );
90+
91+ // Enables or disables HW Flow Control function -- needs also to set CTS and/or RTS pins
92+ void uartSetHwFlowCtrlMode (uart_t * uart , uint8_t mode , uint8_t threshold );
8093
8194void uartStartDetectBaudrate (uart_t * uart );
8295unsigned long uartDetectBaudrate (uart_t * uart );
0 commit comments