We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5af0336 commit f3c1a91Copy full SHA for f3c1a91
cores/esp32/esp32-hal-uart.c
@@ -558,3 +558,10 @@ uartDetectBaudrate(uart_t *uart)
558
559
return default_rates[i];
560
}
561
+
562
+/*
563
+ * Returns the status of the RX state machine, if the value is non-zero the state machine is active.
564
+ */
565
+bool uartRxActive(uart_t* uart) {
566
+ return uart->dev->status.st_urx_out != 0;
567
+}
cores/esp32/esp32-hal-uart.h
@@ -74,6 +74,8 @@ int uartGetDebug();
74
75
unsigned long uartDetectBaudrate(uart_t *uart);
76
77
+bool uartRxActive(uart_t* uart);
78
79
#ifdef __cplusplus
80
81
#endif
0 commit comments