drivers: serial: sam u(s)art: correct interpretation of RXRDY flag
The receiver ready flag of the (channel) status register for the sam controller was not being interpreted correctly for both the uart and usart implementation, according to the uart api. Tested and confirmed using the sam4sa16ca. Signed-off-by: Jaro Van Landschoot <jaro.vanlandschoot@basalte.be>
This commit is contained in:
parent
640a4586c0
commit
a897005b98
|
@ -49,7 +49,7 @@ static int uart_sam_poll_in(const struct device *dev, unsigned char *c)
|
|||
Uart * const uart = cfg->regs;
|
||||
|
||||
if (!(uart->UART_SR & UART_SR_RXRDY)) {
|
||||
return -EBUSY;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* got a character */
|
||||
|
|
|
@ -50,7 +50,7 @@ static int usart_sam_poll_in(const struct device *dev, unsigned char *c)
|
|||
Usart * const usart = config->regs;
|
||||
|
||||
if (!(usart->US_CSR & US_CSR_RXRDY)) {
|
||||
return -EBUSY;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* got a character */
|
||||
|
|
Loading…
Reference in a new issue