cleans up moonlight dir

This commit is contained in:
2026-03-21 15:40:54 +01:00
parent ba1b9c44ee
commit 083565251e
20 changed files with 11 additions and 9 deletions

View File

@@ -0,0 +1,39 @@
#include "hwtimer.h"
#include "csr.h"
#include "platform.h"
#include "uart.h"
#include <stdio.h>
#include <stdarg.h>
// needed by picolibc/port.c
int uart_putc(int ch) {
int intr_enable = riscv_mintr_get();
riscv_mintr_off();
uart_write(uart, ch);
riscv_mintr_restore(intr_enable);
return 1;
}
int uart_getc(void) {
int intr_enable = riscv_mintr_get();
riscv_mintr_off();
int ch = uart_read(uart);
riscv_mintr_restore(intr_enable);
return ch;
}
int uart_init(void) {
puts("[UART0] : Uart Init Done, this is Test output!");
return 0;
};
int board_init(void) {
int ret;
ret = uart_init();
if(ret)
return ret;
ret = hwtimer_init();
if(ret)
return ret;
return 0;
}