embedded-trainings-2020/advanced/firmware/src/bin/rtic-hello.rs

25 lines
378 B
Rust
Raw Normal View History

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