int uart_getc(int port, bool wait) { char c; if (cbuf_read_char(&uart1_rx_buf, &c, wait) == 0) return -1; return c; }
static int imx_uart_getc(bool wait) { if (!uart_base) { return ZX_ERR_NOT_SUPPORTED; } if (initialized) { char c; if (cbuf_read_char(&uart_rx_buf, &c, wait) == 1) { return c; } return ZX_ERR_INTERNAL; } else { // Interrupts are not enabled yet. Use panic calls for now return imx_uart_pgetc(); } }
int uart_getc(char *c, bool wait) { return cbuf_read_char(&uart_rx_buf, c, wait); }
int platform_dgetc(char *c, bool wait) { return cbuf_read_char(&debug_rx_buf, c, wait); }