Skip to content

Commit

Permalink
libplatsupport/odroidc2: report rx empty
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Heider <[email protected]>
  • Loading branch information
axel-h committed Mar 11, 2024
1 parent 19c5299 commit a24fd9a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions libplatsupport/src/plat/odroidc2/serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ int uart_getchar(ps_chardevice_t *dev)
{
void* reg_base = dev->vaddr;

/* this can potentially block forever if nobody sends anything. */
while (internal_uart_is_rx_empty(reg_base) {
/* busy waiting loop */
if (internal_uart_is_rx_empty(reg_base) {
return -1;
}

return internal_uart_rx_byte(reg_base);
Expand Down

0 comments on commit a24fd9a

Please sign in to comment.