diff options
| -rw-r--r-- | embassy-nrf/src/gpiote.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/embassy-nrf/src/gpiote.rs b/embassy-nrf/src/gpiote.rs index 6fac2c371..e3be02407 100644 --- a/embassy-nrf/src/gpiote.rs +++ b/embassy-nrf/src/gpiote.rs | |||
| @@ -149,7 +149,7 @@ impl Iterator for BitIter { | |||
| 149 | /// GPIOTE channel driver in input mode | 149 | /// GPIOTE channel driver in input mode |
| 150 | pub struct InputChannel<'d, C: Channel, T: GpioPin> { | 150 | pub struct InputChannel<'d, C: Channel, T: GpioPin> { |
| 151 | _ch: PeripheralRef<'d, C>, | 151 | _ch: PeripheralRef<'d, C>, |
| 152 | pin: Input<'d, T>, | 152 | _pin: Input<'d, T>, |
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | impl<'d, C: Channel, T: GpioPin> Drop for InputChannel<'d, C, T> { | 155 | impl<'d, C: Channel, T: GpioPin> Drop for InputChannel<'d, C, T> { |
| @@ -185,7 +185,7 @@ impl<'d, C: Channel, T: GpioPin> InputChannel<'d, C, T> { | |||
| 185 | 185 | ||
| 186 | g.events_in[num].reset(); | 186 | g.events_in[num].reset(); |
| 187 | 187 | ||
| 188 | InputChannel { _ch: ch, pin } | 188 | InputChannel { _ch: ch, _pin: pin } |
| 189 | } | 189 | } |
| 190 | 190 | ||
| 191 | pub async fn wait(&self) { | 191 | pub async fn wait(&self) { |
| @@ -443,11 +443,11 @@ mod eh02 { | |||
| 443 | type Error = Infallible; | 443 | type Error = Infallible; |
| 444 | 444 | ||
| 445 | fn is_high(&self) -> Result<bool, Self::Error> { | 445 | fn is_high(&self) -> Result<bool, Self::Error> { |
| 446 | Ok(self.pin.is_high()) | 446 | Ok(self._pin.is_high()) |
| 447 | } | 447 | } |
| 448 | 448 | ||
| 449 | fn is_low(&self) -> Result<bool, Self::Error> { | 449 | fn is_low(&self) -> Result<bool, Self::Error> { |
| 450 | Ok(self.pin.is_low()) | 450 | Ok(self._pin.is_low()) |
| 451 | } | 451 | } |
| 452 | } | 452 | } |
| 453 | } | 453 | } |
| @@ -462,11 +462,11 @@ mod eh1 { | |||
| 462 | 462 | ||
| 463 | impl<'d, C: Channel, T: GpioPin> embedded_hal_1::digital::InputPin for InputChannel<'d, C, T> { | 463 | impl<'d, C: Channel, T: GpioPin> embedded_hal_1::digital::InputPin for InputChannel<'d, C, T> { |
| 464 | fn is_high(&self) -> Result<bool, Self::Error> { | 464 | fn is_high(&self) -> Result<bool, Self::Error> { |
| 465 | Ok(self.pin.is_high()) | 465 | Ok(self._pin.is_high()) |
| 466 | } | 466 | } |
| 467 | 467 | ||
| 468 | fn is_low(&self) -> Result<bool, Self::Error> { | 468 | fn is_low(&self) -> Result<bool, Self::Error> { |
| 469 | Ok(self.pin.is_low()) | 469 | Ok(self._pin.is_low()) |
| 470 | } | 470 | } |
| 471 | } | 471 | } |
| 472 | } | 472 | } |
