19 lines
No EOL
286 B
C
19 lines
No EOL
286 B
C
#include "uart.h"
|
|
|
|
#define UART_BASE ((volatile char *)0x101f1000)
|
|
|
|
void uart_init(void) {}
|
|
|
|
void uart_write(const char *msg) {
|
|
while (*msg) {
|
|
*UART_BASE = *msg++;
|
|
}
|
|
}
|
|
|
|
void uart_putchar(char c) {
|
|
*UART_BASE = c;
|
|
}
|
|
|
|
char uart_getchar(void) {
|
|
return *UART_BASE;
|
|
} |