]> rtime.felk.cvut.cz Git - fpga/virtex2/uart.git/blob - software/uart.c
1c578319c518f3d4e6b9a94d31db1d16172a2bb0
[fpga/virtex2/uart.git] / software / uart.c
1 #include "hardware.h"
2 #include "uart.h"
3
4 int putchar(int c) {
5   while (USTAT & 0x20) {}
6   UTX = c;
7   return 0;
8 }
9
10 int getchar() {
11   while (!(USTAT & 0x10)) {}
12   return URX;
13 }
14