@@ -11,7 +11,7 @@ pub trait GpioExt {
11
11
fn split ( self ) -> Self :: Parts ;
12
12
}
13
13
14
- pub trait Gpio {
14
+ trait GpioRegExt {
15
15
fn in_low ( & self , pos : u8 ) -> bool ;
16
16
fn out_low ( & self , pos : u8 ) -> bool ;
17
17
fn set_high ( & self , pos : u8 ) ;
@@ -61,7 +61,7 @@ use embedded_hal::digital::{InputPin, OutputPin, StatefulOutputPin, toggleable};
61
61
/// Fully erased pin
62
62
pub struct Pin < MODE > {
63
63
i : u8 ,
64
- port : * const Gpio ,
64
+ port : * const GpioRegExt ,
65
65
_mode : PhantomData < MODE > ,
66
66
}
67
67
@@ -109,7 +109,7 @@ impl<MODE> InputPin for Pin<Input<MODE>> {
109
109
110
110
macro_rules! gpio_trait {
111
111
( $gpiox: ident) => {
112
- impl Gpio for crate :: stm32:: $gpiox:: RegisterBlock {
112
+ impl GpioRegExt for crate :: stm32:: $gpiox:: RegisterBlock {
113
113
fn in_low( & self , pos : u8 ) -> bool {
114
114
// NOTE(unsafe) atomic read with no side effects
115
115
self . idr. read( ) . bits( ) & ( 1 << pos) == 0
@@ -151,7 +151,7 @@ macro_rules! gpio {
151
151
use super :: {
152
152
Alternate , Floating , GpioExt , Input , OpenDrain , Output ,
153
153
PullDown , PullUp , PushPull , AF0 , AF1 , AF2 , AF3 , AF4 , AF5 , AF6 , AF7 ,
154
- Pin , Gpio ,
154
+ Pin , GpioRegExt ,
155
155
} ;
156
156
157
157
/// GPIO parts
@@ -431,7 +431,7 @@ macro_rules! gpio {
431
431
pub fn downgrade( self ) -> Pin <Output <MODE >> {
432
432
Pin {
433
433
i: $i,
434
- port: $GPIOX:: ptr( ) as * const Gpio ,
434
+ port: $GPIOX:: ptr( ) as * const GpioRegExt ,
435
435
_mode: self . _mode,
436
436
}
437
437
}
@@ -477,7 +477,7 @@ macro_rules! gpio {
477
477
pub fn downgrade( self ) -> Pin <Input <MODE >> {
478
478
Pin {
479
479
i: $i,
480
- port: $GPIOX:: ptr( ) as * const Gpio ,
480
+ port: $GPIOX:: ptr( ) as * const GpioRegExt ,
481
481
_mode: self . _mode,
482
482
}
483
483
}
0 commit comments