Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f3c1a91

Browse filesBrowse files
atanisoftme-no-dev
authored andcommitted
adding uartRxActive to expose the RX state machine status as a boolean value (espressif#2457)
1 parent 5af0336 commit f3c1a91
Copy full SHA for f3c1a91

File tree

Expand file treeCollapse file tree

2 files changed

+9
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+9
-0
lines changed

‎cores/esp32/esp32-hal-uart.c

Copy file name to clipboardExpand all lines: cores/esp32/esp32-hal-uart.c
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,3 +558,10 @@ uartDetectBaudrate(uart_t *uart)
558558

559559
return default_rates[i];
560560
}
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

Copy file name to clipboardExpand all lines: cores/esp32/esp32-hal-uart.h
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ int uartGetDebug();
7474

7575
unsigned long uartDetectBaudrate(uart_t *uart);
7676

77+
bool uartRxActive(uart_t* uart);
78+
7779
#ifdef __cplusplus
7880
}
7981
#endif

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.