diff options
Diffstat (limited to 'src/gpio.rs')
| -rw-r--r-- | src/gpio.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpio.rs b/src/gpio.rs index 7dba7ab4f..4f79aff93 100644 --- a/src/gpio.rs +++ b/src/gpio.rs | |||
| @@ -102,7 +102,7 @@ pub struct AnyPin { | |||
| 102 | 102 | ||
| 103 | impl AnyPin { | 103 | impl AnyPin { |
| 104 | /// Create an `AnyPin` from raw components. | 104 | /// Create an `AnyPin` from raw components. |
| 105 | pub fn new( | 105 | fn new( |
| 106 | port: usize, | 106 | port: usize, |
| 107 | pin: usize, | 107 | pin: usize, |
| 108 | gpio: &'static crate::pac::gpio0::RegisterBlock, | 108 | gpio: &'static crate::pac::gpio0::RegisterBlock, |
| @@ -151,7 +151,7 @@ impl AnyPin { | |||
| 151 | 151 | ||
| 152 | embassy_hal_internal::impl_peripheral!(AnyPin); | 152 | embassy_hal_internal::impl_peripheral!(AnyPin); |
| 153 | 153 | ||
| 154 | trait SealedPin { | 154 | pub(crate) trait SealedPin { |
| 155 | fn pin_port(&self) -> usize; | 155 | fn pin_port(&self) -> usize; |
| 156 | 156 | ||
| 157 | fn port(&self) -> usize { | 157 | fn port(&self) -> usize { |
| @@ -297,7 +297,7 @@ macro_rules! impl_pin { | |||
| 297 | } | 297 | } |
| 298 | } | 298 | } |
| 299 | 299 | ||
| 300 | impl crate::peripherals::$peri { | 300 | impl crate::peripherals::$peri { |
| 301 | /// Convenience helper to obtain a type-erased handle to this pin. | 301 | /// Convenience helper to obtain a type-erased handle to this pin. |
| 302 | pub fn degrade(&self) -> AnyPin { | 302 | pub fn degrade(&self) -> AnyPin { |
| 303 | AnyPin::new(self.port(), self.pin(), self.gpio(), self.port_reg(), self.pcr_reg()) | 303 | AnyPin::new(self.port(), self.pin(), self.gpio(), self.port_reg(), self.pcr_reg()) |
