uart: upgrade C api
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user