Merge pull request #213 from lulf/toggleable-output
Implement togglable output pin for Output
This commit is contained in:
commit
f04e6ec762
2 changed files with 4 additions and 2 deletions
|
@ -15,7 +15,7 @@ defmt = { version = "0.2.0", optional = true }
|
||||||
log = { version = "0.4.11", optional = true }
|
log = { version = "0.4.11", optional = true }
|
||||||
cortex-m-rt = { version = "0.6.13", features = ["device"] }
|
cortex-m-rt = { version = "0.6.13", features = ["device"] }
|
||||||
cortex-m = "0.7.1"
|
cortex-m = "0.7.1"
|
||||||
embedded-hal = { version = "0.2.4" }
|
embedded-hal = { version = "0.2.4", features = ["unproven"] }
|
||||||
futures = { version = "0.3.5", default-features = false, features = ["async-await"] }
|
futures = { version = "0.3.5", default-features = false, features = ["async-await"] }
|
||||||
rand_core = { version = "0.6.2" }
|
rand_core = { version = "0.6.2" }
|
||||||
sdio-host = { version = "0.5.0" }
|
sdio-host = { version = "0.5.0" }
|
||||||
|
|
|
@ -3,7 +3,7 @@ use core::convert::Infallible;
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use embassy::util::Unborrow;
|
use embassy::util::Unborrow;
|
||||||
use embassy_extras::{unborrow, unsafe_impl_unborrow};
|
use embassy_extras::{unborrow, unsafe_impl_unborrow};
|
||||||
use embedded_hal::digital::v2::{InputPin, OutputPin, StatefulOutputPin};
|
use embedded_hal::digital::v2::{toggleable, InputPin, OutputPin, StatefulOutputPin};
|
||||||
|
|
||||||
use crate::pac;
|
use crate::pac;
|
||||||
use crate::pac::gpio::{self, vals};
|
use crate::pac::gpio::{self, vals};
|
||||||
|
@ -148,6 +148,8 @@ impl<'d, T: Pin> StatefulOutputPin for Output<'d, T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'d, T: Pin> toggleable::Default for Output<'d, T> {}
|
||||||
|
|
||||||
pub(crate) mod sealed {
|
pub(crate) mod sealed {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue