diff --git a/examples/src/bin/gpio_interrupt.rs b/examples/src/bin/gpio_interrupt.rs index 18b05b9d36f..b7675744a5c 100644 --- a/examples/src/bin/gpio_interrupt.rs +++ b/examples/src/bin/gpio_interrupt.rs @@ -17,19 +17,21 @@ use critical_section::Mutex; use esp_backtrace as _; use esp_hal::{ delay::Delay, - gpio::{self, Event, Input, Io, Level, Output, Pull}, + gpio::{Event, GpioPin, Input, Io, Level, Output, Pull}, macros::ram, prelude::*, }; cfg_if::cfg_if! { if #[cfg(any(feature = "esp32", feature = "esp32s2", feature = "esp32s3"))] { - static BUTTON: Mutex>>>> = Mutex::new(RefCell::new(None)); + const BUTTON_PIN: u8 = 0; } else { - static BUTTON: Mutex>>>> = Mutex::new(RefCell::new(None)); + const BUTTON_PIN: u8 = 9; } } +static BUTTON: Mutex>>>> = Mutex::new(RefCell::new(None)); + #[entry] fn main() -> ! { let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); diff --git a/examples/src/bin/touch.rs b/examples/src/bin/touch.rs index ccbf1a42202..0e7b6ae8db3 100644 --- a/examples/src/bin/touch.rs +++ b/examples/src/bin/touch.rs @@ -17,8 +17,7 @@ use critical_section::Mutex; use esp_backtrace as _; use esp_hal::{ delay::Delay, - gpio, - gpio::Io, + gpio::{GpioPin, Io}, macros::ram, prelude::*, rtc_cntl::Rtc, @@ -27,7 +26,7 @@ use esp_hal::{ }; use esp_println::println; -static TOUCH1: Mutex, Continous, Blocking>>>> = +static TOUCH1: Mutex, Continous, Blocking>>>> = Mutex::new(RefCell::new(None)); #[handler] diff --git a/hil-test/tests/qspi_read.rs b/hil-test/tests/qspi_read.rs index 6abeab451db..f659e6a2426 100644 --- a/hil-test/tests/qspi_read.rs +++ b/hil-test/tests/qspi_read.rs @@ -42,7 +42,7 @@ cfg_if::cfg_if! { struct Context { spi: esp_hal::peripherals::SPI2, dma_channel: Channel<'static, DmaChannel0, Blocking>, - miso: esp_hal::gpio::GpioPin<2>, + miso: GpioPin<2>, miso_mirror: Output<'static, GpioPin<3>>, clocks: Clocks<'static>, } diff --git a/hil-test/tests/qspi_write.rs b/hil-test/tests/qspi_write.rs index bc2b01f9273..70a37a34766 100644 --- a/hil-test/tests/qspi_write.rs +++ b/hil-test/tests/qspi_write.rs @@ -18,7 +18,7 @@ use esp_hal::{ clock::Clocks, dma::{Channel, Dma, DmaPriority, DmaTxBuf}, dma_buffers, - gpio::{Io, Pull}, + gpio::{GpioPin, Io, Pull}, pcnt::{ channel::{EdgeMode, PcntInputConfig, PcntSource}, unit::Unit, @@ -50,8 +50,8 @@ struct Context { spi: esp_hal::peripherals::SPI2, pcnt: esp_hal::peripherals::PCNT, dma_channel: Channel<'static, DmaChannel0, Blocking>, - mosi: esp_hal::gpio::GpioPin<2>, - mosi_mirror: esp_hal::gpio::GpioPin<3>, + mosi: GpioPin<2>, + mosi_mirror: GpioPin<3>, clocks: Clocks<'static>, } diff --git a/hil-test/tests/qspi_write_read.rs b/hil-test/tests/qspi_write_read.rs index 602a6a964f3..1a572ffbe1e 100644 --- a/hil-test/tests/qspi_write_read.rs +++ b/hil-test/tests/qspi_write_read.rs @@ -44,7 +44,7 @@ cfg_if::cfg_if! { struct Context { spi: esp_hal::peripherals::SPI2, dma_channel: Channel<'static, DmaChannel0, Blocking>, - mosi: esp_hal::gpio::GpioPin<2>, + mosi: GpioPin<2>, mosi_mirror: Output<'static, GpioPin<3>>, clocks: Clocks<'static>, }