embedded-trainings-2020/advanced/firmware/src/bin/rtic-hello.rs
Jorge Aparicio 53d10f9a4a squashed
2020-06-09 11:58:27 +02:00

25 lines
378 B
Rust

#![no_main]
#![no_std]
use cortex_m::asm;
use panic_log as _; // panic handler
#[rtfm::app(device = dk)]
const APP: () = {
#[init]
fn init(_cx: init::Context) {
dk::init().unwrap();
log::info!("Hello");
}
#[idle]
fn idle(_cx: idle::Context) -> ! {
log::info!("world!");
loop {
asm::bkpt();
}
}
};