synth/uart/echo.c

13 lines
167 B
C
Raw Normal View History

2021-02-17 21:20:30 +00:00
#include "uart.h"
2021-03-13 23:49:28 +00:00
#define uart0 ((struct uart*)0xc010)
2021-02-17 21:20:30 +00:00
int main() {
while (1) {
2021-03-13 23:49:28 +00:00
char c = uart_read(uart0);
uart_write(uart0, c);
2021-02-17 21:20:30 +00:00
}
// never returns
}