Exemple #1
0
int uart_getc(int port, bool wait)
{
    char c;
    if (cbuf_read_char(&uart1_rx_buf, &c, wait) == 0)
        return -1;
    return c;
}
Exemple #2
0
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();
    }
}
Exemple #3
0
int uart_getc(char *c, bool wait)
{
    return cbuf_read_char(&uart_rx_buf, c, wait);
}
Exemple #4
0
int platform_dgetc(char *c, bool wait)
{
	return cbuf_read_char(&debug_rx_buf, c, wait);
}