File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
7
7
8
8
## [ Unreleased]
9
9
10
+ - Add ` InputPin ` impl for generic open drain outputs
11
+
10
12
## [ v0.5.2] - 2019-12-15
11
13
12
14
- Fix USB module docs
Original file line number Diff line number Diff line change @@ -731,6 +731,21 @@ macro_rules! impl_pxx {
731
731
}
732
732
}
733
733
734
+ impl InputPin for Pxx <Output <OpenDrain >> {
735
+ type Error = Infallible ;
736
+ fn is_high( & self ) -> Result <bool , Infallible > {
737
+ match self {
738
+ $( Pxx :: $pin( pin) => pin. is_high( ) ) ,*
739
+ }
740
+ }
741
+
742
+ fn is_low( & self ) -> Result <bool , Infallible > {
743
+ match self {
744
+ $( Pxx :: $pin( pin) => pin. is_low( ) ) ,*
745
+ }
746
+ }
747
+ }
748
+
734
749
impl <MODE > ExtiPin for Pxx <Input <MODE >> {
735
750
fn make_interrupt_source( & mut self , afio: & mut afio:: Parts ) {
736
751
match self {
You can’t perform that action at this time.
0 commit comments