File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ macro_rules! gpio {
57
57
pub mod $gpiox {
58
58
use core:: marker:: PhantomData ;
59
59
60
- use embedded_hal:: digital:: { InputPin , OutputPin , StatefulOutputPin } ;
60
+ use embedded_hal:: digital:: { InputPin , OutputPin , StatefulOutputPin , toggleable } ;
61
61
use crate :: stm32:: $GPIOX;
62
62
63
63
use crate :: stm32:: RCC ;
@@ -119,6 +119,8 @@ macro_rules! gpio {
119
119
}
120
120
}
121
121
122
+ impl <MODE > toggleable:: Default for $PXx<Output <MODE >> { }
123
+
122
124
impl <MODE > InputPin for $PXx<Input <MODE >> {
123
125
fn is_high( & self ) -> bool {
124
126
!self . is_low( )
@@ -411,6 +413,8 @@ macro_rules! gpio {
411
413
}
412
414
}
413
415
416
+ impl <MODE > toggleable:: Default for $PXi<Output <MODE >> { }
417
+
414
418
impl <MODE > $PXi<Input <MODE >> {
415
419
/// Erases the pin number from the type
416
420
///
You can’t perform that action at this time.
0 commit comments