stm32/gpio: expose all functionality as inherent methods.
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user