|
|
|
@ -1,8 +1,9 @@
|
|
|
|
|
#![no_std]
|
|
|
|
|
#![no_main]
|
|
|
|
|
|
|
|
|
|
use core::{fmt::Write, panic::PanicInfo};
|
|
|
|
|
use lwcpu::{NumberDisplay, Screen, TextDisplay};
|
|
|
|
|
use core::fmt::Write;
|
|
|
|
|
use core::panic::PanicInfo;
|
|
|
|
|
use lwcpu::{NumberDisplay, TextDisplay};
|
|
|
|
|
use riscv_rt::entry;
|
|
|
|
|
|
|
|
|
|
#[panic_handler]
|
|
|
|
@ -11,15 +12,9 @@ fn panic_handler(_info: &PanicInfo) -> ! {
|
|
|
|
|
loop {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const HELLO_WORLD: &str = " Hello world!";
|
|
|
|
|
|
|
|
|
|
#[entry]
|
|
|
|
|
fn main() -> ! {
|
|
|
|
|
let mut text = TextDisplay{};
|
|
|
|
|
for i in 0..31 {
|
|
|
|
|
Screen::set_line(i, 1 << i);
|
|
|
|
|
}
|
|
|
|
|
loop {
|
|
|
|
|
let _ = text.write_str(HELLO_WORLD);
|
|
|
|
|
}
|
|
|
|
|
let _ = write!(text, "LMAO: {}", 47);
|
|
|
|
|
loop {}
|
|
|
|
|
}
|
|
|
|
|