m1n1/src/uart.h
Hector Martin 017f050fff hv_vuart: Implement RX & enough to support Linux
This works to get to a serial shell on Linux, and to use m1n1-as-LV1
proxyclient with M1N1DEVICE=/dev/m1n1-sec

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-23 17:02:28 +09:00

29 lines
504 B
C

/* SPDX-License-Identifier: MIT */
#ifndef UART_H
#define UART_H
#include "types.h"
void uart_init(void);
void uart_putbyte(u8 c);
u8 uart_getbyte(void);
void uart_putchar(u8 c);
u8 uart_getchar(void);
void uart_write(const void *buf, size_t count);
size_t uart_read(void *buf, size_t count);
void uart_puts(const char *s);
void uart_setbaud(int baudrate);
void uart_flush(void);
void uart_clear_irqs(void);
int uart_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
#endif