uart: upgrade C api

This commit is contained in:
Paul Mathieu
2021-03-13 15:49:28 -08:00
parent 5d5eeb45cc
commit 75b5488b8d
4 changed files with 27 additions and 20 deletions

View File

@@ -1,9 +1,11 @@
#include "uart.h"
#define uart0 ((struct uart*)0xc010)
int main() {
while (1) {
char c = uart_read();
uart_write(c);
char c = uart_read(uart0);
uart_write(uart0, c);
}
// never returns