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

26 lines
454 B
Rust
Raw Normal View History

2020-06-09 09:52:27 +00:00
#![no_main]
#![no_std]
use cortex_m::asm;
2021-04-12 15:09:38 +00:00
// this imports `beginner/apps/lib.rs` to retrieve our global logger + panicking-behavior
use firmware as _;
2020-06-09 09:52:27 +00:00
#[rtic::app(device = dk)]
2020-06-09 09:52:27 +00:00
const APP: () = {
#[init]
fn init(_cx: init::Context) {
dk::init().unwrap();
2021-04-12 15:09:38 +00:00
defmt::info!("Hello");
2020-06-09 09:52:27 +00:00
}
#[idle]
fn main(_cx: main::Context) -> ! {
2021-04-12 15:09:38 +00:00
defmt::info!("world!");
2020-06-09 09:52:27 +00:00
loop {
asm::bkpt();
}
}
};