File tree 2 files changed +1
-24
lines changed
2 files changed +1
-24
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
14
14
### Breaking changes
15
15
16
16
- Change timer/pwm init API
17
+ - Remove ` set_low ` and ` set_high ` for pins in Alternate output mode
17
18
18
19
### Changed
19
20
Original file line number Diff line number Diff line change @@ -479,30 +479,6 @@ macro_rules! gpio {
479
479
480
480
impl <MODE > toggleable:: Default for $PXi<Output <MODE >> { }
481
481
482
- impl <MODE > OutputPin for $PXi<Alternate <MODE >> {
483
- type Error = Void ;
484
- fn set_high( & mut self ) -> Result <( ) , Self :: Error > {
485
- // NOTE(unsafe) atomic write to a stateless register
486
- Ok ( unsafe { ( * $GPIOX:: ptr( ) ) . bsrr. write( |w| w. bits( 1 << $i) ) } )
487
- }
488
-
489
- fn set_low( & mut self ) -> Result <( ) , Self :: Error > {
490
- // NOTE(unsafe) atomic write to a stateless register
491
- Ok ( unsafe { ( * $GPIOX:: ptr( ) ) . bsrr. write( |w| w. bits( 1 << ( 16 + $i) ) ) } )
492
- }
493
- }
494
-
495
- impl <MODE > StatefulOutputPin for $PXi<Alternate <MODE >> {
496
- fn is_set_high( & self ) -> Result <bool , Self :: Error > {
497
- self . is_set_low( ) . map( |b| !b)
498
- }
499
-
500
- fn is_set_low( & self ) -> Result <bool , Self :: Error > {
501
- // NOTE(unsafe) atomic read with no side effects
502
- Ok ( unsafe { ( * $GPIOX:: ptr( ) ) . odr. read( ) . bits( ) & ( 1 << $i) == 0 } )
503
- }
504
- }
505
-
506
482
impl <MODE > InputPin for $PXi<Input <MODE >> {
507
483
type Error = Void ;
508
484
fn is_high( & self ) -> Result <bool , Self :: Error > {
You can’t perform that action at this time.
0 commit comments