stm32/gpio: expose all functionality as inherent methods.

This commit is contained in:
Dario Nieuwenhuis
2022-01-14 22:02:00 +01:00
parent 52e156b429
commit 58fc64722c
34 changed files with 266 additions and 210 deletions

View File

@@ -5,7 +5,6 @@
#[path = "../example_common.rs"]
mod example_common;
use embassy_stm32::gpio::{Input, Pull};
use embedded_hal::digital::v2::InputPin;
use example_common::*;
#[cortex_m_rt::entry]
@@ -17,7 +16,7 @@ fn main() -> ! {
let button = Input::new(p.PC13, Pull::Up);
loop {
if unwrap!(button.is_high()) {
if button.is_high() {
info!("high");
} else {
info!("low");