14 lines
397 B
C
14 lines
397 B
C
volatile unsigned int * const UART0DR = (unsigned int *)0x101f1000;
|
|
// UART0 is the terminal running at 0x101f1000
|
|
// UART0DR is the register used to transmit and receive bytes
|
|
|
|
void print_uart0(const char *s) {
|
|
while(*s != '\0') { /* Loop until end of string */
|
|
*UART0DR = (unsigned int)(*s); /* Transmit char */
|
|
s++; /* Next char */
|
|
}
|
|
}
|
|
|
|
void c_entry() {
|
|
print_uart0("Hello world!\n");
|
|
} |