Created
January 12, 2022 10:31
-
-
Save lulf/5ae60c6e97234d4584c3b3dbd0bb20ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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