drivers: uart: bcm2711: fix poll_in
uart_bcm2711_poll_in() incorrectly returned the received byte instead of writing it to the provided buffer. Update the implementation to store the character in *c and return 0 on success, matching the UART poll_in API. Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
This commit is contained in:
committed by
Anas Nashif
parent
59a57722ae
commit
1350164d67
@@ -154,7 +154,10 @@ static int uart_bcm2711_poll_in(const struct device *dev, unsigned char *c)
|
||||
;
|
||||
}
|
||||
|
||||
return sys_read32(uart_data->uart_addr + BCM2711_MU_IO) & 0xFF;
|
||||
/* got a character */
|
||||
*c = sys_read32(uart_data->uart_addr + BCM2711_MU_IO) & 0xFF;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
|
||||
Reference in New Issue
Block a user