kirdy/src/main.rs

32 lines
506 B
Rust

#![no_main]
#![no_std]
use panic_halt as _;
use cortex_m_rt::entry;
use stm32f4xx_hal::{
pac::{CorePeripherals, Peripherals}
};
use log::info;
mod device;
mod laser_diode;
use device::{
boot::bootup,
sys_timer
};
#[entry]
fn main() -> ! {
let mut core_perif = CorePeripherals::take().unwrap();
let perif = Peripherals::take().unwrap();
let (mut wd) = bootup(core_perif, perif);
loop {
wd.feed();
info!("looping");
sys_timer::sleep(10);
}
}