Skip to content

Commit d64bc28

Browse files
authored
feat(uart): adds a function to calculate maximum valid rx timeout
1 parent 8e62997 commit d64bc28

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cores/esp32/esp32-hal-uart.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ void uart_send_break(uint8_t uartNum);
116116
// Sends a buffer and at the end of the stream, it generates BREAK in the line
117117
int uart_send_msg_with_break(uint8_t uartNum, uint8_t *msg, size_t msgSize);
118118

119+
// UART RX Timeout (in UART Symbols) depends on the UART Clock Source and the SoC that is used
120+
// This is a helper function that calculates what is the maximum RX Timeout that a running UART IDF driver allows.
121+
uint16_t uart_get_max_rx_timeout(uint8_t uartNum);
122+
119123
#ifdef __cplusplus
120124
}
121125
#endif

0 commit comments

Comments
 (0)