driver: Fixed Atmel SAM3 serial driver.

The Atmel SAM3 serial driver poll in function checked
for new characters incorrectly.

Change-Id: I9024a991404bf949226634c9f6c6ea507577cff1
Signed-off-by: Justin Watson <jwatson5@gmail.com>
This commit is contained in:
Justin Watson 2016-10-05 23:19:58 -07:00 committed by Anas Nashif
commit b5e9c6d1bb

View file

@ -209,7 +209,7 @@ static int uart_sam3_poll_in(struct device *dev, unsigned char *c)
{
volatile struct _uart *uart = UART_STRUCT(dev);
if (uart->sr & UART_INT_RXRDY)
if (!(uart->sr & UART_INT_RXRDY))
return (-1);
/* got a character */