Ejemplo n.º 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;
}
Ejemplo n.º 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();
    }
}
Ejemplo n.º 3
0
int uart_getc(char *c, bool wait)
{
    return cbuf_read_char(&uart_rx_buf, c, wait);
}
Ejemplo n.º 4
0
Archivo: debug.c Proyecto: DSKIM3/lk
int platform_dgetc(char *c, bool wait)
{
	return cbuf_read_char(&debug_rx_buf, c, wait);
}