improved uart character printing and poweroff/restart
This commit is contained in:
parent
10851eeb64
commit
8cd08165e0
6 changed files with 66 additions and 7 deletions
|
|
@ -1,11 +1,9 @@
|
|||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <drivers/uart.h>
|
||||
#include <syscon/syscon.h>
|
||||
|
||||
void kmain() {
|
||||
char *uart = (char *)0x10000000;
|
||||
char *msg = "Hello, OS World!\n";
|
||||
|
||||
for (int i = 0; msg[i] != '\0'; i++) {
|
||||
*uart = msg[i]; // Write each character to the UART
|
||||
}
|
||||
kprint("Hello, OS World!\n");
|
||||
poweroff();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue