2018-12-10 19:48:06 +11:00
|
|
|
#![no_std]
|
2018-12-15 16:57:14 +11:00
|
|
|
#![feature(start)]
|
2018-12-10 19:48:06 +11:00
|
|
|
|
|
|
|
#[panic_handler]
|
|
|
|
fn panic(_info: &core::panic::PanicInfo) -> ! {
|
|
|
|
loop {}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[start]
|
|
|
|
fn main(_argc: isize, _argv: *const *const u8) -> isize {
|
|
|
|
unsafe {
|
|
|
|
(0x400_0000 as *mut u16).write_volatile(0x0403);
|
|
|
|
(0x600_0000 as *mut u16).offset(120 + 80 * 240).write_volatile(0x001F);
|
|
|
|
(0x600_0000 as *mut u16).offset(136 + 80 * 240).write_volatile(0x03E0);
|
|
|
|
(0x600_0000 as *mut u16).offset(120 + 96 * 240).write_volatile(0x7C00);
|
|
|
|
loop {}
|
|
|
|
}
|
|
|
|
}
|
2019-02-14 13:27:27 +11:00
|
|
|
|
|
|
|
#[no_mangle]
|
|
|
|
static __IRQ_HANDLER: extern "C" fn() = irq_handler;
|
|
|
|
|
|
|
|
extern "C" fn irq_handler() {}
|