Skip to content

Instantly share code, notes, and snippets.

@lulf
Created January 12, 2022 10:31
Show Gist options
  • Save lulf/5ae60c6e97234d4584c3b3dbd0bb20ee to your computer and use it in GitHub Desktop.
Save lulf/5ae60c6e97234d4584c3b3dbd0bb20ee to your computer and use it in GitHub Desktop.
use cortex_m_rt::entry;
use embassy_stm32::{
gpio::{Input, Level, Output, Pull, Speed},
interrupt,
};
#[entry]
fn main() -> ! {
let p = embassy_stm32::init(Default::default());
let mut led = Output::new(p.PB14, Level::Low, Speed::VeryHigh);
let button = Input::new(p.PC13, Pull::Up);
loop { }
}
#[interrupt]
fn EXTI13() {
defmt::println!("HELLO!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment