adding uartRxActive to expose the RX state machine status as a boolean value (#2457)
This commit is contained in:
parent
5af0336177
commit
f3c1a91f8e
@ -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();
|
|||||||
|
|
||||||
unsigned long uartDetectBaudrate(uart_t *uart);
|
unsigned long uartDetectBaudrate(uart_t *uart);
|
||||||
|
|
||||||
|
bool uartRxActive(uart_t* uart);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user