Commit f3c1a91f authored by Mike Dunston's avatar Mike Dunston Committed by Me No Dev

adding uartRxActive to expose the RX state machine status as a boolean value (#2457)

parent 5af03361
...@@ -558,3 +558,10 @@ uartDetectBaudrate(uart_t *uart) ...@@ -558,3 +558,10 @@ uartDetectBaudrate(uart_t *uart)
return default_rates[i]; return default_rates[i];
} }
/*
* Returns the status of the RX state machine, if the value is non-zero the state machine is active.
*/
bool uartRxActive(uart_t* uart) {
return uart->dev->status.st_urx_out != 0;
}
...@@ -74,6 +74,8 @@ int uartGetDebug(); ...@@ -74,6 +74,8 @@ int uartGetDebug();
unsigned long uartDetectBaudrate(uart_t *uart); unsigned long uartDetectBaudrate(uart_t *uart);
bool uartRxActive(uart_t* uart);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment