2022-01-19 17:59:55 +01:00

27 lines
487 B
Rust

#![no_std]
#![no_main]
#![feature(type_alias_impl_trait)]
#[path = "../example_common.rs"]
mod example_common;
use cortex_m_rt::entry;
use embassy_stm32::gpio::{Input, Pull};
use example_common::*;
#[entry]
fn main() -> ! {
info!("Hello World!");
let p = embassy_stm32::init(Default::default());
let button = Input::new(p.PC13, Pull::Down);
loop {
if button.is_high() {
info!("high");
} else {
info!("low");
}
}
}