diff --git a/esp-hal/MIGRATING-0.20.md b/esp-hal/MIGRATING-0.20.md index 77544c0d4..866a74c97 100644 --- a/esp-hal/MIGRATING-0.20.md +++ b/esp-hal/MIGRATING-0.20.md @@ -172,7 +172,7 @@ configure an input pin, and pass it to `set_edge_signal` or `set_ctrl_signal`. Use `NoPin` in place of the now-removed `NO_PIN` constant. SPI pins, when using the `with_pin` function, are no longer optional. -You can pass `NoPin` or `Level` as inputs, and `NoPin` as output if you don't need a particular pin. +You can pass `NoPin` or `Level` if you don't need a particular pin. ```diff let spi = Spi::new(peripherals.SPI2, 100.kHz(), SpiMode::Mode0) diff --git a/esp-hal/src/gpio/placeholder.rs b/esp-hal/src/gpio/placeholder.rs index c984f3860..3ced27796 100644 --- a/esp-hal/src/gpio/placeholder.rs +++ b/esp-hal/src/gpio/placeholder.rs @@ -7,6 +7,14 @@ use super::*; +impl crate::peripheral::Peripheral for Level { + type P = Self; + + unsafe fn clone_unchecked(&mut self) -> Self::P { + *self + } +} + impl PeripheralSignal for Level { fn pull_direction(&self, _pull: Pull, _internal: private::Internal) {} }