diff options
-rw-r--r-- | chip/g/usb_console.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/chip/g/usb_console.c b/chip/g/usb_console.c index 8195b5b433..27a8d15b95 100644 --- a/chip/g/usb_console.c +++ b/chip/g/usb_console.c @@ -294,19 +294,6 @@ int usb_getc(void) return -1; } -int usb_putc(int c) -{ - int ret = usb_wait_console(); - - if (ret) - return ret; - - ret = QUEUE_ADD_UNITS(&tx_q, &c, 1); - if (ret) - handle_output(); - return ret ? EC_SUCCESS : EC_ERROR_OVERFLOW; -} - int usb_puts(const char *outstr) { int ret; @@ -330,6 +317,15 @@ int usb_puts(const char *outstr) return *outstr ? EC_ERROR_OVERFLOW : EC_SUCCESS; } +int usb_putc(int c) +{ + char string[2]; + + string[0] = c; + string[1] = '\0'; + return usb_puts(string); +} + int usb_vprintf(const char *format, va_list args) { int ret; |