diff options
Diffstat (limited to 'stmhal/pybstdio.c')
| -rw-r--r-- | stmhal/pybstdio.c | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/stmhal/pybstdio.c b/stmhal/pybstdio.c index 88f47d1b4..2121a6cbb 100644 --- a/stmhal/pybstdio.c +++ b/stmhal/pybstdio.c @@ -84,8 +84,10 @@ int stdin_rx_chr(void) {          }  #endif  #endif -        if (usb_vcp_rx_num() != 0) { -            return usb_vcp_rx_get(); + +        byte c; +        if (usb_vcp_recv_byte(&c) != 0) { +            return c;          } else if (pyb_stdio_uart != PYB_UART_NONE && uart_rx_any(pyb_stdio_uart)) {              return uart_rx_char(pyb_stdio_uart);          } | 
