Fixes in idle handling.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15718 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2022-08-10 08:44:27 +00:00
parent 322ee855c5
commit 738a3645b1
2 changed files with 4 additions and 3 deletions

View File

@ -532,7 +532,7 @@ void sio_lld_serve_interrupt(SIODriver *siop) {
#if SIO_USE_SYNCHRONIZATION
/* The idle flag is forcibly cleared when an RX error event is
detected.*/
imsc &= ~UART_UARTIMSC_RTIM;
u->UARTICR = UART_UARTICR_RTIC;
#endif
/* Disabling event sources.*/
@ -564,7 +564,7 @@ void sio_lld_serve_interrupt(SIODriver *siop) {
#if SIO_USE_SYNCHRONIZATION
/* The idle flag is forcibly cleared when an RX data event is
detected.*/
imsc &= ~UART_UARTIMSC_RTIM;
u->UARTICR = UART_UARTICR_RTIC;
#endif
/* Called once then the interrupt source is disabled.*/

View File

@ -149,7 +149,8 @@
*
* @notapi
*/
#define sio_lld_is_rx_idle(siop) true
#define sio_lld_is_rx_idle(siop) \
(bool)(((siop)->uart->UARTRIS & UART_UARTRIS_RTRIS) != 0U)
/**
* @brief Determines if RX has pending error events to be read and cleared.