29 lines
544 B
Rust
29 lines
544 B
Rust
use cortex_m::prelude::*;
|
|
use embedded_hal::digital::v2::ToggleableOutputPin;
|
|
use stm32f1xx_hal::{
|
|
delay::Delay,
|
|
gpio::{gpioc, Output, PushPull},
|
|
};
|
|
|
|
mod setup;
|
|
|
|
//use crate::exit;
|
|
pub use setup::setup;
|
|
|
|
pub struct App {
|
|
delay: Delay,
|
|
board_led: gpioc::PC13<Output<PushPull>>,
|
|
}
|
|
|
|
impl App {
|
|
pub fn run(mut self) -> ! {
|
|
defmt::info!("Application Startup!");
|
|
|
|
loop {
|
|
self.board_led.toggle().unwrap();
|
|
defmt::info!("Blink...");
|
|
self.delay.delay_ms(500u16);
|
|
}
|
|
}
|
|
}
|