diff --git a/esp-hal-embassy/src/time_driver.rs b/esp-hal-embassy/src/time_driver.rs index fa785cdeecd..d4b465b3483 100644 --- a/esp-hal-embassy/src/time_driver.rs +++ b/esp-hal-embassy/src/time_driver.rs @@ -3,9 +3,8 @@ use core::cell::Cell; use embassy_time_driver::{AlarmHandle, Driver}; use esp_hal::{ interrupt::{InterruptHandler, Priority}, - prelude::*, sync::Locked, - time::now, + time::{now, ExtU64}, timer::{AnyTimer, OneShotTimer}, Blocking, }; diff --git a/esp-hal/src/i2s/parallel.rs b/esp-hal/src/i2s/parallel.rs index ee80060f3b4..3f29eb68665 100644 --- a/esp-hal/src/i2s/parallel.rs +++ b/esp-hal/src/i2s/parallel.rs @@ -43,7 +43,6 @@ //! # use esp_hal::dma_buffers; //! # use esp_hal::delay::Delay; //! # use esp_hal::i2s::parallel::{I2sParallel, TxEightBits}; -//! # use esp_hal::prelude::*; //! //! const BUFFER_SIZE: usize = 256; //! diff --git a/esp-hal/src/lib.rs b/esp-hal/src/lib.rs index dfd9d110913..09c64b853a6 100644 --- a/esp-hal/src/lib.rs +++ b/esp-hal/src/lib.rs @@ -68,9 +68,10 @@ //! # loop {} //! # } //! use esp_hal::{ +//! clock::CpuClock, //! delay::Delay, +//! entry, //! gpio::{Io, Level, Output}, -//! prelude::*, //! }; //! //! #[entry] @@ -178,7 +179,6 @@ pub mod i2c; #[cfg(any(dport, interrupt_core0, interrupt_core1))] pub mod interrupt; pub mod peripheral; -pub mod prelude; #[cfg(any(hmac, sha))] mod reg_access; #[cfg(any(spi0, spi1, spi2, spi3))] diff --git a/esp-hal/src/macros.rs b/esp-hal/src/macros.rs index d80aac9a081..0926ae78e1b 100644 --- a/esp-hal/src/macros.rs +++ b/esp-hal/src/macros.rs @@ -13,9 +13,8 @@ macro_rules! before_snippet { () => { r#" # #![no_std] -# use esp_hal::prelude::*; # use procmacros::handler; -# use esp_hal::interrupt; +# use esp_hal::{interrupt, time::{RateExtU32 as _, ExtU64 as _}}; # macro_rules! println { # ($($tt:tt)*) => { }; # } diff --git a/esp-hal/src/mcpwm/operator.rs b/esp-hal/src/mcpwm/operator.rs index 6b814413ce6..7cf8d0c37f0 100644 --- a/esp-hal/src/mcpwm/operator.rs +++ b/esp-hal/src/mcpwm/operator.rs @@ -453,7 +453,6 @@ impl embedded_hal::pwm::SetD /// /// ```rust, no_run #[doc = crate::before_snippet!()] -/// # use esp_hal::{mcpwm, prelude::*}; /// # use esp_hal::mcpwm::{McPwm, PeripheralClockConfig}; /// # use esp_hal::mcpwm::operator::{DeadTimeCfg, PwmPinConfig, PWMStream}; /// // active high complementary using PWMA input diff --git a/esp-hal/src/prelude.rs b/esp-hal/src/prelude.rs deleted file mode 100644 index fbf862e60b5..00000000000 --- a/esp-hal/src/prelude.rs +++ /dev/null @@ -1,40 +0,0 @@ -//! # The `esp-hal` Prelude -//! -//! ## Overview -//! The prelude is the list of things that `esp-hal` automatically imports into -//! every program. It’s kept as small as possible, and is focused on -//! things, particularly traits, which are used in almost every single Rust -//! program. - -pub use imp::*; - -#[doc(hidden)] -mod imp { - #[doc(hidden)] - pub use fugit::{ExtU64 as _, RateExtU32 as _}; - #[doc(hidden)] - pub use nb; - - #[cfg(dac)] - pub use crate::analog::dac::Instance as _esp_hal_analog_dac_Instance; - #[cfg(any(dport, pcr, system))] - pub use crate::clock::Clock as _esp_hal_clock_Clock; - #[cfg(gpio)] - pub use crate::gpio::Pin as _esp_hal_gpio_Pin; - #[cfg(ledc)] - pub use crate::ledc::{ - channel::{ - ChannelHW as _esp_hal_ledc_channel_ChannelHW, - ChannelIFace as _esp_hal_ledc_channel_ChannelIFace, - }, - timer::{ - TimerHW as _esp_hal_ledc_timer_TimerHW, - TimerIFace as _esp_hal_ledc_timer_TimerIFace, - }, - }; - #[cfg(any(timg0, timg1))] - pub use crate::timer::timg::TimerGroupInstance as _esp_hal_timer_timg_TimerGroupInstance; - #[cfg(any(systimer, timg0, timg1))] - pub use crate::timer::Timer as _esp_hal_timer_Timer; - pub use crate::{clock::CpuClock, entry, interrupt::InterruptConfigurable, macros::*}; -} diff --git a/esp-hal/src/rmt.rs b/esp-hal/src/rmt.rs index 81a5b51c830..1a72894659d 100644 --- a/esp-hal/src/rmt.rs +++ b/esp-hal/src/rmt.rs @@ -81,7 +81,6 @@ #![doc = crate::before_snippet!()] //! # use esp_hal::rmt::{PulseCode, Rmt, TxChannel, TxChannelConfig, TxChannelCreator}; //! # use esp_hal::delay::Delay; -//! # use esp_hal::prelude::*; //! //! // Configure frequency based on chip type #![cfg_attr(esp32h2, doc = "let freq = 32.MHz();")] @@ -117,7 +116,6 @@ #![doc = crate::before_snippet!()] //! # use esp_hal::rmt::{PulseCode, Rmt, RxChannel, RxChannelConfig, RxChannelCreator}; //! # use esp_hal::delay::Delay; -//! # use esp_hal::prelude::*; //! # use esp_hal::gpio::{Level, Output}; //! //! const WIDTH: usize = 80; diff --git a/esp-hal/src/rng.rs b/esp-hal/src/rng.rs index 3216744636e..2efa64fc13c 100644 --- a/esp-hal/src/rng.rs +++ b/esp-hal/src/rng.rs @@ -42,7 +42,7 @@ //! //! ```rust, no_run #![doc = crate::before_snippet!()] -//! # use esp_hal::{prelude::*, rng::Rng}; +//! # use esp_hal::rng::Rng; //! //! let mut rng = Rng::new(peripherals.RNG); //! diff --git a/esp-hal/src/rtc_cntl/mod.rs b/esp-hal/src/rtc_cntl/mod.rs index 0da6bb949cc..6d1606d2c4c 100644 --- a/esp-hal/src/rtc_cntl/mod.rs +++ b/esp-hal/src/rtc_cntl/mod.rs @@ -23,7 +23,7 @@ //! ```rust, no_run #![doc = crate::before_snippet!()] //! # use core::time::Duration; -//! # use esp_hal::{delay::Delay, prelude::*, rtc_cntl::Rtc}; +//! # use esp_hal::{delay::Delay, rtc_cntl::Rtc}; //! //! let rtc = Rtc::new(peripherals.LPWR); //! let delay = Delay::new(); @@ -90,7 +90,7 @@ //! ```rust, no_run #![doc = crate::before_snippet!()] //! # use core::time::Duration; -//! # use esp_hal::{delay::Delay, prelude::*, rtc_cntl::Rtc}; +//! # use esp_hal::{delay::Delay, rtc_cntl::Rtc}; //! //! let rtc = Rtc::new(peripherals.LPWR); //! let delay = Delay::new(); diff --git a/esp-hal/src/rtc_cntl/sleep/mod.rs b/esp-hal/src/rtc_cntl/sleep/mod.rs index e6acaaeb209..8a83ffb006b 100644 --- a/esp-hal/src/rtc_cntl/sleep/mod.rs +++ b/esp-hal/src/rtc_cntl/sleep/mod.rs @@ -55,7 +55,6 @@ pub enum WakeupLevel { #[doc = crate::before_snippet!()] /// # use core::time::Duration; /// # use esp_hal::delay::Delay; -/// # use esp_hal::prelude::*; /// # use esp_hal::rtc_cntl::{reset_reason, sleep::TimerWakeupSource, wakeup_cause, Rtc, SocResetReason}; /// # use esp_hal::Cpu; /// @@ -104,7 +103,6 @@ pub enum Error { #[doc = crate::before_snippet!()] /// # use core::time::Duration; /// # use esp_hal::delay::Delay; -/// # use esp_hal::prelude::*; /// # use esp_hal::rtc_cntl::{reset_reason, sleep::{Ext0WakeupSource, TimerWakeupSource, WakeupLevel}, wakeup_cause, Rtc, SocResetReason}; /// # use esp_hal::Cpu; /// # use esp_hal::gpio::{Input, Pull}; @@ -155,7 +153,6 @@ impl<'a, P: RtcIoWakeupPinType> Ext0WakeupSource<'a, P> { #[doc = crate::before_snippet!()] /// # use core::time::Duration; /// # use esp_hal::delay::Delay; -/// # use esp_hal::prelude::*; /// # use esp_hal::rtc_cntl::{reset_reason, sleep::{Ext1WakeupSource, TimerWakeupSource, WakeupLevel}, wakeup_cause, Rtc, SocResetReason}; /// # use esp_hal::Cpu; /// # use esp_hal::gpio::{Input, Pull, RtcPin}; @@ -210,7 +207,6 @@ impl<'a, 'b> Ext1WakeupSource<'a, 'b> { #[doc = crate::before_snippet!()] /// # use core::time::Duration; /// # use esp_hal::delay::Delay; -/// # use esp_hal::prelude::*; /// # use esp_hal::rtc_cntl::{reset_reason, sleep::{Ext1WakeupSource, TimerWakeupSource, WakeupLevel}, wakeup_cause, Rtc, SocResetReason}; /// # use esp_hal::Cpu; /// # use esp_hal::gpio::{Input, Pull, RtcPinWithResistors}; @@ -268,7 +264,6 @@ impl<'a, 'b> Ext1WakeupSource<'a, 'b> { /// # use core::time::Duration; /// # use esp_hal::delay::Delay; /// # use esp_hal::gpio::{self, Input, Pull}; -/// # use esp_hal::prelude::*; /// # use esp_hal::rtc_cntl::{reset_reason, sleep::{RtcioWakeupSource, TimerWakeupSource, WakeupLevel}, wakeup_cause, Rtc, SocResetReason}; /// # use esp_hal::Cpu; /// # use esp_hal::peripheral::Peripheral; diff --git a/esp-hal/src/soc/esp32/psram.rs b/esp-hal/src/soc/esp32/psram.rs index 0bdb03d2c1b..2e643018a6a 100644 --- a/esp-hal/src/soc/esp32/psram.rs +++ b/esp-hal/src/soc/esp32/psram.rs @@ -22,7 +22,7 @@ //! # extern crate alloc; //! # use alloc::{string::String, vec::Vec}; //! # use esp_alloc as _; -//! # use esp_hal::{psram, prelude::*}; +//! # use esp_hal::psram; //! //! // Initialize PSRAM and add it as a heap memory region //! fn init_psram_heap(start: *mut u8, size: usize) { diff --git a/esp-hal/src/soc/esp32s2/psram.rs b/esp-hal/src/soc/esp32s2/psram.rs index 0b469d993ce..8bf08e3affc 100644 --- a/esp-hal/src/soc/esp32s2/psram.rs +++ b/esp-hal/src/soc/esp32s2/psram.rs @@ -22,7 +22,7 @@ //! # extern crate alloc; //! # use alloc::{string::String, vec::Vec}; //! # use esp_alloc as _; -//! # use esp_hal::{psram, prelude::*}; +//! # use esp_hal::psram; //! //! // Initialize PSRAM and add it as a heap memory region //! fn init_psram_heap(start: *mut u8, size: usize) { diff --git a/esp-hal/src/soc/esp32s3/psram.rs b/esp-hal/src/soc/esp32s3/psram.rs index c7b940cce7f..a801343bc0b 100644 --- a/esp-hal/src/soc/esp32s3/psram.rs +++ b/esp-hal/src/soc/esp32s3/psram.rs @@ -27,7 +27,7 @@ //! # extern crate alloc; //! # use alloc::{string::String, vec::Vec}; //! # use esp_alloc as _; -//! # use esp_hal::{psram, prelude::*}; +//! # use esp_hal::psram; //! //! // Initialize PSRAM and add it as a heap memory region //! fn init_psram_heap(start: *mut u8, size: usize) { diff --git a/esp-hal/src/spi/master.rs b/esp-hal/src/spi/master.rs index b49cb2e2450..d949e64ec3d 100644 --- a/esp-hal/src/spi/master.rs +++ b/esp-hal/src/spi/master.rs @@ -75,10 +75,9 @@ use crate::{ clock::Clocks, dma::{DmaChannelFor, DmaEligible, DmaRxBuffer, DmaTxBuffer, Rx, Tx}, gpio::{interconnect::PeripheralOutput, InputSignal, NoPin, OutputSignal}, - interrupt::InterruptHandler, + interrupt::{InterruptConfigurable, InterruptHandler}, peripheral::{Peripheral, PeripheralRef}, peripherals::spi2::RegisterBlock, - prelude::InterruptConfigurable, private, private::Sealed, spi::AnySpi, diff --git a/esp-hal/src/time.rs b/esp-hal/src/time.rs index 38a29de659e..77d758c8b5e 100644 --- a/esp-hal/src/time.rs +++ b/esp-hal/src/time.rs @@ -2,6 +2,8 @@ //! //! The `time` module offers a way to get the system now. +pub use fugit::{ExtU64, RateExtU32}; + /// Represents a duration of time. /// /// The resolution is 1 microsecond, represented as a 64-bit unsigned integer. diff --git a/esp-hal/src/timer/systimer.rs b/esp-hal/src/timer/systimer.rs index 57dc15a1178..037171fb78f 100644 --- a/esp-hal/src/timer/systimer.rs +++ b/esp-hal/src/timer/systimer.rs @@ -429,7 +429,7 @@ impl Alarm { static mut HANDLERS: [Option; 3] = [None, None, None]; - #[crate::prelude::ram] + #[crate::macros::ram] unsafe extern "C" fn _handle_interrupt() { if unsafe { &*SYSTIMER::PTR } .int_raw() diff --git a/esp-hal/src/touch.rs b/esp-hal/src/touch.rs index 80be9cf2793..09bb15926e5 100644 --- a/esp-hal/src/touch.rs +++ b/esp-hal/src/touch.rs @@ -29,9 +29,9 @@ use core::marker::PhantomData; use crate::{ gpio::TouchPin, + interrupt::InterruptConfigurable, peripheral::{Peripheral, PeripheralRef}, peripherals::{RTC_CNTL, SENS, TOUCH}, - prelude::*, private::{Internal, Sealed}, rtc_cntl::Rtc, Async, @@ -528,7 +528,11 @@ mod asynch { }; use super::*; - use crate::{asynch::AtomicWaker, macros::ram, prelude::handler, Async}; + use crate::{ + asynch::AtomicWaker, + macros::{handler, ram}, + Async, + }; const NUM_TOUCH_PINS: usize = 10; diff --git a/esp-hal/src/uart.rs b/esp-hal/src/uart.rs index 3b01681a61c..2b69e3cee84 100644 --- a/esp-hal/src/uart.rs +++ b/esp-hal/src/uart.rs @@ -125,7 +125,6 @@ #![doc = crate::before_snippet!()] //! # use esp_hal::delay::Delay; //! # use esp_hal::uart::{AtCmdConfig, Config, Uart, UartInterrupt}; -//! # use esp_hal::prelude::*; //! let delay = Delay::new(); //! //! // Default pins for UART/Serial communication diff --git a/esp-hal/src/usb_serial_jtag.rs b/esp-hal/src/usb_serial_jtag.rs index d6a6547f572..93e8fbfbdfc 100644 --- a/esp-hal/src/usb_serial_jtag.rs +++ b/esp-hal/src/usb_serial_jtag.rs @@ -73,7 +73,7 @@ //! ### How to output text using USB Serial/JTAG. //! ```rust, no_run #![doc = crate::before_snippet!()] -//! # use esp_hal::{delay::Delay, prelude::*, usb_serial_jtag::UsbSerialJtag, Blocking}; +//! # use esp_hal::{delay::Delay, usb_serial_jtag::UsbSerialJtag, Blocking}; //! //! let delay = Delay::new(); //! diff --git a/esp-ieee802154/src/raw.rs b/esp-ieee802154/src/raw.rs index 53f104743c2..1afb3e505fe 100644 --- a/esp-ieee802154/src/raw.rs +++ b/esp-ieee802154/src/raw.rs @@ -3,8 +3,8 @@ use core::{cell::RefCell, ptr::addr_of}; use critical_section::Mutex; use esp_hal::{ interrupt::Priority, + macros::handler, peripherals::RADIO_CLK, - prelude::handler, system::{RadioClockController, RadioPeripherals}, }; use esp_wifi_sys::include::{ diff --git a/esp-wifi/src/common_adapter/common_adapter_esp32.rs b/esp-wifi/src/common_adapter/common_adapter_esp32.rs index 82e215fbe9b..1be2d065260 100644 --- a/esp-wifi/src/common_adapter/common_adapter_esp32.rs +++ b/esp-wifi/src/common_adapter/common_adapter_esp32.rs @@ -4,7 +4,7 @@ use super::phy_init_data::PHY_INIT_DATA_DEFAULT; use crate::{ binary::include::*, hal::{ - prelude::ram, + macros::ram, system::{RadioClockController, RadioPeripherals}, }, }; diff --git a/esp-wifi/src/common_adapter/common_adapter_esp32s2.rs b/esp-wifi/src/common_adapter/common_adapter_esp32s2.rs index b87536dbf75..825f073df69 100644 --- a/esp-wifi/src/common_adapter/common_adapter_esp32s2.rs +++ b/esp-wifi/src/common_adapter/common_adapter_esp32s2.rs @@ -4,7 +4,7 @@ use super::phy_init_data::PHY_INIT_DATA_DEFAULT; use crate::{ binary::include::*, hal::{ - prelude::ram, + macros::ram, system::{RadioClockController, RadioPeripherals}, }, }; diff --git a/examples/src/bin/debug_assist.rs b/examples/src/bin/debug_assist.rs index 551e8c5a532..25198e0006e 100644 --- a/examples/src/bin/debug_assist.rs +++ b/examples/src/bin/debug_assist.rs @@ -12,7 +12,12 @@ use core::cell::RefCell; use critical_section::Mutex; use esp_backtrace as _; -use esp_hal::{assist_debug::DebugAssist, prelude::*}; +use esp_hal::{ + assist_debug::DebugAssist, + entry, + interrupt::InterruptConfigurable, + macros::handler, +}; use esp_println::println; static DA: Mutex>> = Mutex::new(RefCell::new(None)); diff --git a/examples/src/bin/dma_extmem2mem.rs b/examples/src/bin/dma_extmem2mem.rs index fcd126ad2af..dd8776bc74f 100644 --- a/examples/src/bin/dma_extmem2mem.rs +++ b/examples/src/bin/dma_extmem2mem.rs @@ -9,7 +9,7 @@ use aligned::{Aligned, A64}; use esp_alloc as _; use esp_backtrace as _; -use esp_hal::{delay::Delay, dma::Mem2Mem, dma_descriptors_chunk_size, prelude::*}; +use esp_hal::{delay::Delay, dma::Mem2Mem, dma_descriptors_chunk_size, entry, time::ExtU64}; use log::{error, info}; extern crate alloc; diff --git a/examples/src/bin/dma_mem2mem.rs b/examples/src/bin/dma_mem2mem.rs index 20b4090b095..5830ca19d06 100644 --- a/examples/src/bin/dma_mem2mem.rs +++ b/examples/src/bin/dma_mem2mem.rs @@ -7,7 +7,7 @@ #![no_main] use esp_backtrace as _; -use esp_hal::{delay::Delay, dma::Mem2Mem, dma_buffers, prelude::*}; +use esp_hal::{delay::Delay, dma::Mem2Mem, dma_buffers, entry, time::ExtU64}; use log::{error, info}; const DATA_SIZE: usize = 1024 * 10; diff --git a/examples/src/bin/embassy_multicore_interrupt.rs b/examples/src/bin/embassy_multicore_interrupt.rs index 905befee0f3..53383ea571b 100644 --- a/examples/src/bin/embassy_multicore_interrupt.rs +++ b/examples/src/bin/embassy_multicore_interrupt.rs @@ -19,9 +19,9 @@ use embassy_time::{Duration, Ticker}; use esp_backtrace as _; use esp_hal::{ cpu_control::{CpuControl, Stack}, + entry, gpio::{Level, Output}, interrupt::{software::SoftwareInterruptControl, Priority}, - prelude::*, timer::{timg::TimerGroup, AnyTimer}, Cpu, }; diff --git a/examples/src/bin/embassy_rmt_rx.rs b/examples/src/bin/embassy_rmt_rx.rs index eb55708cecd..b111c9fa71a 100644 --- a/examples/src/bin/embassy_rmt_rx.rs +++ b/examples/src/bin/embassy_rmt_rx.rs @@ -14,8 +14,8 @@ use embassy_time::{Duration, Timer}; use esp_backtrace as _; use esp_hal::{ gpio::{Level, Output}, - prelude::*, rmt::{PulseCode, Rmt, RxChannelAsync, RxChannelConfig, RxChannelCreatorAsync}, + time::RateExtU32, timer::timg::TimerGroup, }; use esp_println::{print, println}; diff --git a/examples/src/bin/embassy_rmt_tx.rs b/examples/src/bin/embassy_rmt_tx.rs index 749e4af1ecb..ccb08a856f0 100644 --- a/examples/src/bin/embassy_rmt_tx.rs +++ b/examples/src/bin/embassy_rmt_tx.rs @@ -15,8 +15,8 @@ use embassy_executor::Spawner; use embassy_time::{Duration, Timer}; use esp_backtrace as _; use esp_hal::{ - prelude::*, rmt::{PulseCode, Rmt, TxChannelAsync, TxChannelConfig, TxChannelCreatorAsync}, + time::RateExtU32, timer::timg::TimerGroup, }; use esp_println::println; diff --git a/examples/src/bin/embassy_spi.rs b/examples/src/bin/embassy_spi.rs index 1df7ba575c1..4c1bec74f79 100644 --- a/examples/src/bin/embassy_spi.rs +++ b/examples/src/bin/embassy_spi.rs @@ -24,11 +24,11 @@ use esp_backtrace as _; use esp_hal::{ dma::{DmaRxBuf, DmaTxBuf}, dma_buffers, - prelude::*, spi::{ master::{Config, Spi}, Mode, }, + time::RateExtU32, timer::timg::TimerGroup, }; diff --git a/examples/src/bin/etm_timer.rs b/examples/src/bin/etm_timer.rs index 0f037d58373..3ba0141f6f1 100644 --- a/examples/src/bin/etm_timer.rs +++ b/examples/src/bin/etm_timer.rs @@ -11,6 +11,7 @@ use esp_backtrace as _; use esp_hal::{ + entry, etm::Etm, gpio::{ etm::{Channels, OutputConfig}, @@ -18,7 +19,7 @@ use esp_hal::{ Output, Pull, }, - prelude::*, + time::{ExtU64, RateExtU32}, timer::{ systimer::{etm::Event, SystemTimer}, PeriodicTimer, diff --git a/examples/src/bin/flash_read_write.rs b/examples/src/bin/flash_read_write.rs index e330ca03366..81b53a8d013 100644 --- a/examples/src/bin/flash_read_write.rs +++ b/examples/src/bin/flash_read_write.rs @@ -11,7 +11,7 @@ use embedded_storage::{ReadStorage, Storage}; use esp_backtrace as _; -use esp_hal::prelude::*; +use esp_hal::entry; use esp_println::println; use esp_storage::FlashStorage; diff --git a/examples/src/bin/gpio_interrupt.rs b/examples/src/bin/gpio_interrupt.rs index befe9d6dc84..1675738fb25 100644 --- a/examples/src/bin/gpio_interrupt.rs +++ b/examples/src/bin/gpio_interrupt.rs @@ -18,9 +18,10 @@ use critical_section::Mutex; use esp_backtrace as _; use esp_hal::{ delay::Delay, + entry, gpio::{Event, Input, Io, Level, Output, Pull}, - macros::ram, - prelude::*, + interrupt::InterruptConfigurable, + macros::{handler, ram}, }; static BUTTON: Mutex>> = Mutex::new(RefCell::new(None)); diff --git a/examples/src/bin/hmac.rs b/examples/src/bin/hmac.rs index b358a0550d4..e9aba42642c 100644 --- a/examples/src/bin/hmac.rs +++ b/examples/src/bin/hmac.rs @@ -60,8 +60,8 @@ use esp_backtrace as _; use esp_hal::{ + entry, hmac::{Hmac, HmacPurpose, KeyId}, - prelude::*, rng::Rng, }; use esp_println::println; diff --git a/examples/src/bin/ieee802154_receive_all_frames.rs b/examples/src/bin/ieee802154_receive_all_frames.rs index c288195834a..2f41e46d7a1 100644 --- a/examples/src/bin/ieee802154_receive_all_frames.rs +++ b/examples/src/bin/ieee802154_receive_all_frames.rs @@ -5,7 +5,7 @@ #![no_main] use esp_backtrace as _; -use esp_hal::prelude::*; +use esp_hal::entry; use esp_ieee802154::{Config, Ieee802154}; use esp_println::println; diff --git a/examples/src/bin/ieee802154_receive_frame.rs b/examples/src/bin/ieee802154_receive_frame.rs index ba8aba35852..81a2d1a49b6 100644 --- a/examples/src/bin/ieee802154_receive_frame.rs +++ b/examples/src/bin/ieee802154_receive_frame.rs @@ -5,7 +5,7 @@ #![no_main] use esp_backtrace as _; -use esp_hal::prelude::*; +use esp_hal::entry; use esp_ieee802154::{Config, Ieee802154}; use esp_println::println; diff --git a/examples/src/bin/ieee802154_send_broadcast_frame.rs b/examples/src/bin/ieee802154_send_broadcast_frame.rs index 197351811b8..e2f4ca0f5f0 100644 --- a/examples/src/bin/ieee802154_send_broadcast_frame.rs +++ b/examples/src/bin/ieee802154_send_broadcast_frame.rs @@ -5,7 +5,7 @@ #![no_main] use esp_backtrace as _; -use esp_hal::{delay::Delay, prelude::*}; +use esp_hal::{delay::Delay, entry}; use esp_ieee802154::{Config, Frame, Ieee802154}; use esp_println::println; use ieee802154::mac::{ diff --git a/examples/src/bin/ieee802154_send_frame.rs b/examples/src/bin/ieee802154_send_frame.rs index 94e53ee3192..1641efa5d97 100644 --- a/examples/src/bin/ieee802154_send_frame.rs +++ b/examples/src/bin/ieee802154_send_frame.rs @@ -5,7 +5,7 @@ #![no_main] use esp_backtrace as _; -use esp_hal::{delay::Delay, prelude::*}; +use esp_hal::{delay::Delay, entry}; use esp_ieee802154::{Config, Frame, Ieee802154}; use esp_println::println; use ieee802154::mac::{ diff --git a/examples/src/bin/ieee802154_sniffer.rs b/examples/src/bin/ieee802154_sniffer.rs index 05974776349..d53228ccbf0 100644 --- a/examples/src/bin/ieee802154_sniffer.rs +++ b/examples/src/bin/ieee802154_sniffer.rs @@ -10,7 +10,7 @@ use esp_backtrace as _; use esp_hal::{ - prelude::*, + entry, reset::software_reset, uart::{self, Uart}, }; diff --git a/examples/src/bin/lp_core_basic.rs b/examples/src/bin/lp_core_basic.rs index 9c80181bbee..e771685eef3 100644 --- a/examples/src/bin/lp_core_basic.rs +++ b/examples/src/bin/lp_core_basic.rs @@ -16,9 +16,10 @@ use esp_backtrace as _; use esp_hal::{ + entry, gpio::lp_io::LowPowerOutput, lp_core::{LpCore, LpCoreWakeupSource}, - prelude::*, + macros::load_lp_code, }; use esp_println::{print, println}; diff --git a/examples/src/bin/spi_loopback.rs b/examples/src/bin/spi_loopback.rs index 35dcc6ad412..a3b6d249f52 100644 --- a/examples/src/bin/spi_loopback.rs +++ b/examples/src/bin/spi_loopback.rs @@ -19,12 +19,13 @@ use esp_backtrace as _; use esp_hal::{ delay::Delay, + entry, peripheral::Peripheral, - prelude::*, spi::{ master::{Config, Spi}, Mode, }, + time::RateExtU32, }; use esp_println::println; diff --git a/examples/src/bin/spi_loopback_dma_psram.rs b/examples/src/bin/spi_loopback_dma_psram.rs index bbd9e2a0715..41b785b486b 100644 --- a/examples/src/bin/spi_loopback_dma_psram.rs +++ b/examples/src/bin/spi_loopback_dma_psram.rs @@ -26,12 +26,13 @@ use esp_backtrace as _; use esp_hal::{ delay::Delay, dma::{DmaRxBuf, DmaTxBuf, ExternalBurstConfig}, + entry, peripheral::Peripheral, - prelude::*, spi::{ master::{Config, Spi}, Mode, }, + time::RateExtU32, }; extern crate alloc; use log::*; diff --git a/examples/src/bin/spi_slave_dma.rs b/examples/src/bin/spi_slave_dma.rs index 9754b19a511..b6184613df5 100644 --- a/examples/src/bin/spi_slave_dma.rs +++ b/examples/src/bin/spi_slave_dma.rs @@ -34,8 +34,8 @@ use esp_backtrace as _; use esp_hal::{ delay::Delay, dma_buffers, + entry, gpio::{Input, Level, Output, Pull}, - prelude::*, spi::{slave::Spi, Mode}, }; use esp_println::println; diff --git a/examples/src/bin/touch.rs b/examples/src/bin/touch.rs index 4f5f8ba5e0e..4d2dd715e1e 100644 --- a/examples/src/bin/touch.rs +++ b/examples/src/bin/touch.rs @@ -18,9 +18,10 @@ use critical_section::Mutex; use esp_backtrace as _; use esp_hal::{ delay::Delay, + entry, gpio::GpioPin, - macros::ram, - prelude::*, + interrupt::InterruptConfigurable, + macros::{handler, ram}, rtc_cntl::Rtc, touch::{Continuous, Touch, TouchConfig, TouchPad}, Blocking, diff --git a/examples/src/bin/twai.rs b/examples/src/bin/twai.rs index cf26d8feaf6..d2b3e490e5a 100644 --- a/examples/src/bin/twai.rs +++ b/examples/src/bin/twai.rs @@ -30,7 +30,7 @@ const IS_FIRST_SENDER: bool = true; use esp_backtrace as _; use esp_hal::{ delay::Delay, - prelude::*, + entry, twai::{self, filter::SingleStandardFilter, EspTwaiFrame, StandardId, TwaiMode}, }; use esp_println::println; diff --git a/examples/src/bin/usb_serial.rs b/examples/src/bin/usb_serial.rs index 410a76caa33..b60a772edc8 100644 --- a/examples/src/bin/usb_serial.rs +++ b/examples/src/bin/usb_serial.rs @@ -16,8 +16,8 @@ use core::ptr::addr_of_mut; use esp_backtrace as _; use esp_hal::{ + entry, otg_fs::{Usb, UsbBus}, - prelude::*, }; use usb_device::prelude::{UsbDeviceBuilder, UsbVidPid}; use usbd_serial::{SerialPort, USB_CLASS_CDC}; diff --git a/examples/src/bin/wifi_80211_tx.rs b/examples/src/bin/wifi_80211_tx.rs index 115a80edff1..2d37530e097 100644 --- a/examples/src/bin/wifi_80211_tx.rs +++ b/examples/src/bin/wifi_80211_tx.rs @@ -13,7 +13,14 @@ use core::marker::PhantomData; use esp_alloc as _; use esp_backtrace as _; -use esp_hal::{delay::Delay, prelude::*, rng::Rng, timer::timg::TimerGroup}; +use esp_hal::{ + clock::CpuClock, + delay::Delay, + entry, + rng::Rng, + time::ExtU64, + timer::timg::TimerGroup, +}; use esp_wifi::{init, wifi}; use ieee80211::{ common::{CapabilitiesInformation, FCFFlags}, diff --git a/examples/src/bin/wifi_access_point.rs b/examples/src/bin/wifi_access_point.rs index 4b0bb228c72..ea012c82cf8 100644 --- a/examples/src/bin/wifi_access_point.rs +++ b/examples/src/bin/wifi_access_point.rs @@ -19,7 +19,8 @@ use embedded_io::*; use esp_alloc as _; use esp_backtrace as _; use esp_hal::{ - prelude::*, + clock::CpuClock, + entry, rng::Rng, time::{self, Duration}, timer::timg::TimerGroup, diff --git a/examples/src/bin/wifi_access_point_with_sta.rs b/examples/src/bin/wifi_access_point_with_sta.rs index 30ac04462e6..0196876079d 100644 --- a/examples/src/bin/wifi_access_point_with_sta.rs +++ b/examples/src/bin/wifi_access_point_with_sta.rs @@ -20,7 +20,8 @@ use embedded_io::*; use esp_alloc as _; use esp_backtrace as _; use esp_hal::{ - prelude::*, + clock::CpuClock, + entry, rng::Rng, time::{self, Duration}, timer::timg::TimerGroup, diff --git a/examples/src/bin/wifi_bench.rs b/examples/src/bin/wifi_bench.rs index c01f55e0986..8db12ecb6a8 100644 --- a/examples/src/bin/wifi_bench.rs +++ b/examples/src/bin/wifi_bench.rs @@ -19,8 +19,9 @@ use embedded_io::*; use esp_alloc as _; use esp_backtrace as _; use esp_hal::{ + clock::CpuClock, delay::Delay, - prelude::*, + entry, rng::Rng, time::{self, Duration}, timer::timg::TimerGroup, diff --git a/examples/src/bin/wifi_ble.rs b/examples/src/bin/wifi_ble.rs index d5ea8c79098..6be700c36b5 100644 --- a/examples/src/bin/wifi_ble.rs +++ b/examples/src/bin/wifi_ble.rs @@ -25,8 +25,9 @@ use bleps::{ use esp_alloc as _; use esp_backtrace as _; use esp_hal::{ + clock::CpuClock, + entry, gpio::{Input, Pull}, - prelude::*, rng::Rng, time, timer::timg::TimerGroup, diff --git a/examples/src/bin/wifi_coex.rs b/examples/src/bin/wifi_coex.rs index 55734883c2b..069d3b380d7 100644 --- a/examples/src/bin/wifi_coex.rs +++ b/examples/src/bin/wifi_coex.rs @@ -31,7 +31,8 @@ use embedded_io::*; use esp_alloc as _; use esp_backtrace as _; use esp_hal::{ - prelude::*, + clock::CpuClock, + entry, rng::Rng, time::{self, Duration}, timer::timg::TimerGroup, diff --git a/examples/src/bin/wifi_csi.rs b/examples/src/bin/wifi_csi.rs index db44c52061f..7b1b187dcb5 100644 --- a/examples/src/bin/wifi_csi.rs +++ b/examples/src/bin/wifi_csi.rs @@ -15,12 +15,7 @@ extern crate alloc; use blocking_network_stack::Stack; use esp_alloc as _; use esp_backtrace as _; -use esp_hal::{ - prelude::*, - rng::Rng, - time::{self}, - timer::timg::TimerGroup, -}; +use esp_hal::{clock::CpuClock, entry, rng::Rng, time, timer::timg::TimerGroup}; use esp_println::println; use esp_wifi::{ init, diff --git a/examples/src/bin/wifi_dhcp.rs b/examples/src/bin/wifi_dhcp.rs index 2da9243a985..258c854face 100644 --- a/examples/src/bin/wifi_dhcp.rs +++ b/examples/src/bin/wifi_dhcp.rs @@ -19,7 +19,8 @@ use embedded_io::*; use esp_alloc as _; use esp_backtrace as _; use esp_hal::{ - prelude::*, + clock::CpuClock, + entry, rng::Rng, time::{self, Duration}, timer::timg::TimerGroup, diff --git a/examples/src/bin/wifi_dhcp_smoltcp_nal.rs b/examples/src/bin/wifi_dhcp_smoltcp_nal.rs index e3bd51650f4..5c073bfc210 100644 --- a/examples/src/bin/wifi_dhcp_smoltcp_nal.rs +++ b/examples/src/bin/wifi_dhcp_smoltcp_nal.rs @@ -17,7 +17,8 @@ extern crate alloc; use esp_alloc as _; use esp_backtrace as _; use esp_hal::{ - prelude::*, + clock::CpuClock, + entry, rng::Rng, time::{self, Duration}, timer::timg::TimerGroup, diff --git a/examples/src/bin/wifi_embassy_access_point.rs b/examples/src/bin/wifi_embassy_access_point.rs index 762f9bb02e0..d00d98e0bea 100644 --- a/examples/src/bin/wifi_embassy_access_point.rs +++ b/examples/src/bin/wifi_embassy_access_point.rs @@ -30,7 +30,7 @@ use embassy_net::{ use embassy_time::{Duration, Timer}; use esp_alloc as _; use esp_backtrace as _; -use esp_hal::{prelude::*, rng::Rng, timer::timg::TimerGroup}; +use esp_hal::{clock::CpuClock, rng::Rng, timer::timg::TimerGroup}; use esp_println::{print, println}; use esp_wifi::{ init, diff --git a/examples/src/bin/wifi_embassy_access_point_with_sta.rs b/examples/src/bin/wifi_embassy_access_point_with_sta.rs index d25ce440077..efdfa728b36 100644 --- a/examples/src/bin/wifi_embassy_access_point_with_sta.rs +++ b/examples/src/bin/wifi_embassy_access_point_with_sta.rs @@ -31,7 +31,7 @@ use embassy_net::{ use embassy_time::{Duration, Timer}; use esp_alloc as _; use esp_backtrace as _; -use esp_hal::{prelude::*, rng::Rng, timer::timg::TimerGroup}; +use esp_hal::{clock::CpuClock, rng::Rng, timer::timg::TimerGroup}; use esp_println::{print, println}; use esp_wifi::{ init, diff --git a/examples/src/bin/wifi_embassy_bench.rs b/examples/src/bin/wifi_embassy_bench.rs index f85b0c7a863..bd39dedea35 100644 --- a/examples/src/bin/wifi_embassy_bench.rs +++ b/examples/src/bin/wifi_embassy_bench.rs @@ -23,7 +23,7 @@ use embassy_net::{tcp::TcpSocket, Ipv4Address, Stack, StackResources}; use embassy_time::{with_timeout, Duration, Timer}; use esp_alloc as _; use esp_backtrace as _; -use esp_hal::{prelude::*, rng::Rng, timer::timg::TimerGroup}; +use esp_hal::{clock::CpuClock, rng::Rng, timer::timg::TimerGroup}; use esp_println::println; use esp_wifi::{ init, diff --git a/examples/src/bin/wifi_embassy_ble.rs b/examples/src/bin/wifi_embassy_ble.rs index d687937797e..f78ae34c130 100644 --- a/examples/src/bin/wifi_embassy_ble.rs +++ b/examples/src/bin/wifi_embassy_ble.rs @@ -28,8 +28,8 @@ use embassy_executor::Spawner; use esp_alloc as _; use esp_backtrace as _; use esp_hal::{ + clock::CpuClock, gpio::{Input, Pull}, - prelude::*, rng::Rng, time, timer::timg::TimerGroup, diff --git a/examples/src/bin/wifi_embassy_dhcp.rs b/examples/src/bin/wifi_embassy_dhcp.rs index 5f53e5d70a5..52249d85ccd 100644 --- a/examples/src/bin/wifi_embassy_dhcp.rs +++ b/examples/src/bin/wifi_embassy_dhcp.rs @@ -18,7 +18,7 @@ use embassy_net::{tcp::TcpSocket, Ipv4Address, Stack, StackResources}; use embassy_time::{Duration, Timer}; use esp_alloc as _; use esp_backtrace as _; -use esp_hal::{prelude::*, rng::Rng, timer::timg::TimerGroup}; +use esp_hal::{clock::CpuClock, rng::Rng, timer::timg::TimerGroup}; use esp_println::println; use esp_wifi::{ init, diff --git a/examples/src/bin/wifi_embassy_esp_now.rs b/examples/src/bin/wifi_embassy_esp_now.rs index 13c76a4285f..5fe73416841 100644 --- a/examples/src/bin/wifi_embassy_esp_now.rs +++ b/examples/src/bin/wifi_embassy_esp_now.rs @@ -15,7 +15,7 @@ use embassy_futures::select::{select, Either}; use embassy_time::{Duration, Ticker}; use esp_alloc as _; use esp_backtrace as _; -use esp_hal::{prelude::*, rng::Rng, timer::timg::TimerGroup}; +use esp_hal::{clock::CpuClock, rng::Rng, timer::timg::TimerGroup}; use esp_println::println; use esp_wifi::{ esp_now::{PeerInfo, BROADCAST_ADDRESS}, diff --git a/examples/src/bin/wifi_embassy_esp_now_duplex.rs b/examples/src/bin/wifi_embassy_esp_now_duplex.rs index 6073dbd0e1a..a632d96a4a6 100644 --- a/examples/src/bin/wifi_embassy_esp_now_duplex.rs +++ b/examples/src/bin/wifi_embassy_esp_now_duplex.rs @@ -15,7 +15,7 @@ use embassy_sync::{blocking_mutex::raw::NoopRawMutex, mutex::Mutex}; use embassy_time::{Duration, Ticker}; use esp_alloc as _; use esp_backtrace as _; -use esp_hal::{prelude::*, rng::Rng, timer::timg::TimerGroup}; +use esp_hal::{clock::CpuClock, rng::Rng, timer::timg::TimerGroup}; use esp_println::println; use esp_wifi::{ esp_now::{EspNowManager, EspNowReceiver, EspNowSender, PeerInfo, BROADCAST_ADDRESS}, diff --git a/examples/src/bin/wifi_embassy_trouble.rs b/examples/src/bin/wifi_embassy_trouble.rs index 46d012d1661..253bbf49b54 100644 --- a/examples/src/bin/wifi_embassy_trouble.rs +++ b/examples/src/bin/wifi_embassy_trouble.rs @@ -18,7 +18,7 @@ use embassy_sync::blocking_mutex::raw::NoopRawMutex; use embassy_time::{Duration, Timer}; use esp_alloc as _; use esp_backtrace as _; -use esp_hal::{prelude::*, rng::Rng, timer::timg::TimerGroup}; +use esp_hal::{clock::CpuClock, rng::Rng, timer::timg::TimerGroup}; use esp_wifi::{ble::controller::BleConnector, init, EspWifiController}; use log::*; use static_cell::StaticCell; diff --git a/examples/src/bin/wifi_esp_now.rs b/examples/src/bin/wifi_esp_now.rs index 44369ea22ff..92140aee2f9 100644 --- a/examples/src/bin/wifi_esp_now.rs +++ b/examples/src/bin/wifi_esp_now.rs @@ -11,7 +11,8 @@ use esp_alloc as _; use esp_backtrace as _; use esp_hal::{ - prelude::*, + clock::CpuClock, + entry, rng::Rng, time::{self, Duration}, timer::timg::TimerGroup, diff --git a/examples/src/bin/wifi_sniffer.rs b/examples/src/bin/wifi_sniffer.rs index 8324dc38a68..f1d19b99c41 100644 --- a/examples/src/bin/wifi_sniffer.rs +++ b/examples/src/bin/wifi_sniffer.rs @@ -19,7 +19,7 @@ use core::cell::RefCell; use critical_section::Mutex; use esp_backtrace as _; -use esp_hal::{prelude::*, rng::Rng, timer::timg::TimerGroup}; +use esp_hal::{clock::CpuClock, entry, rng::Rng, timer::timg::TimerGroup}; use esp_println::println; use esp_wifi::{init, wifi}; use ieee80211::{match_frames, mgmt_frame::BeaconFrame}; diff --git a/examples/src/bin/wifi_static_ip.rs b/examples/src/bin/wifi_static_ip.rs index 856b8cd8c15..ba7f3a56b65 100644 --- a/examples/src/bin/wifi_static_ip.rs +++ b/examples/src/bin/wifi_static_ip.rs @@ -18,7 +18,8 @@ use embedded_io::*; use esp_alloc as _; use esp_backtrace as _; use esp_hal::{ - prelude::*, + clock::CpuClock, + entry, rng::Rng, time::{self, Duration}, timer::timg::TimerGroup, diff --git a/hil-test/tests/aes.rs b/hil-test/tests/aes.rs index 27d223ba55e..950f01e9d42 100644 --- a/hil-test/tests/aes.rs +++ b/hil-test/tests/aes.rs @@ -7,7 +7,7 @@ use esp_hal::{ aes::{Aes, Mode}, - prelude::*, + clock::CpuClock, }; use hil_test as _; diff --git a/hil-test/tests/ecc.rs b/hil-test/tests/ecc.rs index 894605e70b0..3e3fa9f3d6b 100644 --- a/hil-test/tests/ecc.rs +++ b/hil-test/tests/ecc.rs @@ -17,8 +17,8 @@ use elliptic_curve::sec1::ToEncodedPoint; #[cfg(feature = "esp32h2")] use esp_hal::ecc::WorkMode; use esp_hal::{ + clock::CpuClock, ecc::{Ecc, EllipticCurve, Error}, - prelude::*, rng::Rng, Blocking, }; diff --git a/hil-test/tests/embassy_interrupt_spi_dma.rs b/hil-test/tests/embassy_interrupt_spi_dma.rs index 592246d7663..019b02889b2 100644 --- a/hil-test/tests/embassy_interrupt_spi_dma.rs +++ b/hil-test/tests/embassy_interrupt_spi_dma.rs @@ -13,11 +13,11 @@ use esp_hal::{ dma_buffers, interrupt::{software::SoftwareInterruptControl, Priority}, peripheral::Peripheral, - prelude::*, spi::{ master::{Config, Spi}, Mode, }, + time::RateExtU32, timer::AnyTimer, Async, }; diff --git a/hil-test/tests/embassy_timers_executors.rs b/hil-test/tests/embassy_timers_executors.rs index 88f33023596..942b287ce96 100644 --- a/hil-test/tests/embassy_timers_executors.rs +++ b/hil-test/tests/embassy_timers_executors.rs @@ -17,7 +17,7 @@ use esp_hal::{ }; use esp_hal::{ peripherals::Peripherals, - prelude::*, + time::ExtU64, timer::{timg::TimerGroup, OneShotTimer, PeriodicTimer}, }; #[cfg(not(feature = "esp32"))] diff --git a/hil-test/tests/esp_wifi_floats.rs b/hil-test/tests/esp_wifi_floats.rs index 07ee7d91a53..5e9893fe567 100644 --- a/hil-test/tests/esp_wifi_floats.rs +++ b/hil-test/tests/esp_wifi_floats.rs @@ -10,10 +10,11 @@ use core::cell::RefCell; use critical_section::Mutex; use esp_hal::{ + clock::CpuClock, delay::Delay, interrupt::software::{SoftwareInterrupt, SoftwareInterruptControl}, + macros::handler, peripherals::Peripherals, - prelude::*, rng::Rng, timer::timg::TimerGroup, }; diff --git a/hil-test/tests/i2s.rs b/hil-test/tests/i2s.rs index 26fcd78911f..49f089ec61a 100644 --- a/hil-test/tests/i2s.rs +++ b/hil-test/tests/i2s.rs @@ -16,7 +16,7 @@ use esp_hal::{ gpio::{AnyPin, NoPin, Pin}, i2s::master::{DataFormat, I2s, I2sTx, Standard}, peripherals::I2S0, - prelude::*, + time::RateExtU32, Async, }; use hil_test as _; diff --git a/hil-test/tests/init.rs b/hil-test/tests/init.rs index e9991161fef..dc298d38aa3 100644 --- a/hil-test/tests/init.rs +++ b/hil-test/tests/init.rs @@ -6,10 +6,11 @@ #![no_main] use esp_hal::{ + clock::CpuClock, config::WatchdogStatus, delay::Delay, - prelude::*, rtc_cntl::Rtc, + time::ExtU64, timer::timg::TimerGroup, Config, }; diff --git a/hil-test/tests/interrupt.rs b/hil-test/tests/interrupt.rs index cd34ed6a2af..b5339d281c2 100644 --- a/hil-test/tests/interrupt.rs +++ b/hil-test/tests/interrupt.rs @@ -11,6 +11,7 @@ use core::{arch::asm, cell::RefCell}; use critical_section::Mutex; use esp_hal::{ + clock::CpuClock, interrupt::{ self, software::{SoftwareInterrupt, SoftwareInterruptControl}, @@ -18,7 +19,6 @@ use esp_hal::{ Priority, }, peripherals::Interrupt, - prelude::*, }; use hil_test as _; diff --git a/hil-test/tests/lcd_cam_i8080.rs b/hil-test/tests/lcd_cam_i8080.rs index fe2d7a04b1d..06408255981 100644 --- a/hil-test/tests/lcd_cam_i8080.rs +++ b/hil-test/tests/lcd_cam_i8080.rs @@ -18,7 +18,7 @@ use esp_hal::{ channel::{CtrlMode, EdgeMode}, Pcnt, }, - prelude::*, + time::RateExtU32, Blocking, }; use hil_test as _; diff --git a/hil-test/tests/lcd_cam_i8080_async.rs b/hil-test/tests/lcd_cam_i8080_async.rs index 482f75667f7..f3136e23618 100644 --- a/hil-test/tests/lcd_cam_i8080_async.rs +++ b/hil-test/tests/lcd_cam_i8080_async.rs @@ -14,7 +14,7 @@ use esp_hal::{ lcd::i8080::{Command, Config, TxEightBits, I8080}, LcdCam, }, - prelude::*, + time::RateExtU32, Async, }; use hil_test as _; diff --git a/hil-test/tests/parl_io_tx.rs b/hil-test/tests/parl_io_tx.rs index 80606c442fc..b0f83d33536 100644 --- a/hil-test/tests/parl_io_tx.rs +++ b/hil-test/tests/parl_io_tx.rs @@ -26,7 +26,7 @@ use esp_hal::{ Pcnt, }, peripherals::PARL_IO, - prelude::*, + time::RateExtU32, }; use hil_test as _; diff --git a/hil-test/tests/parl_io_tx_async.rs b/hil-test/tests/parl_io_tx_async.rs index f3f82bcf1dd..eb7c8c19c53 100644 --- a/hil-test/tests/parl_io_tx_async.rs +++ b/hil-test/tests/parl_io_tx_async.rs @@ -28,7 +28,7 @@ use esp_hal::{ Pcnt, }, peripherals::PARL_IO, - prelude::*, + time::RateExtU32, }; use hil_test as _; diff --git a/hil-test/tests/qspi.rs b/hil-test/tests/qspi.rs index c8cbd75cc67..bb5c26ba2fc 100644 --- a/hil-test/tests/qspi.rs +++ b/hil-test/tests/qspi.rs @@ -11,12 +11,12 @@ use esp_hal::{ dma::{DmaRxBuf, DmaTxBuf}, dma_buffers, gpio::{AnyPin, Input, Level, Output, Pull}, - prelude::*, spi::{ master::{Address, Command, Config, Spi, SpiDma}, DataMode, Mode, }, + time::RateExtU32, Blocking, }; use hil_test as _; @@ -221,11 +221,7 @@ mod tests { #[cfg(pcnt)] pcnt: peripherals.PCNT, dma_channel, - gpios: [ - pin.degrade(), - pin_mirror.degrade(), - unconnected_pin.degrade(), - ], + gpios: [pin.into(), pin_mirror.into(), unconnected_pin.into()], } } diff --git a/hil-test/tests/rmt.rs b/hil-test/tests/rmt.rs index 1b5320472c9..13b05450d99 100644 --- a/hil-test/tests/rmt.rs +++ b/hil-test/tests/rmt.rs @@ -6,8 +6,8 @@ #![no_main] use esp_hal::{ - prelude::*, rmt::{PulseCode, Rmt, RxChannel, RxChannelConfig, TxChannel, TxChannelConfig}, + time::RateExtU32, }; use hil_test as _; diff --git a/hil-test/tests/rsa.rs b/hil-test/tests/rsa.rs index e8f16c66f70..0b39046f6ce 100644 --- a/hil-test/tests/rsa.rs +++ b/hil-test/tests/rsa.rs @@ -7,7 +7,6 @@ use crypto_bigint::{Uint, U1024, U512}; use esp_hal::{ - prelude::*, rsa::{ operand_sizes::*, Rsa, diff --git a/hil-test/tests/rsa_async.rs b/hil-test/tests/rsa_async.rs index c200122d23d..21ba4d4e229 100644 --- a/hil-test/tests/rsa_async.rs +++ b/hil-test/tests/rsa_async.rs @@ -7,7 +7,6 @@ use crypto_bigint::{Uint, U1024, U512}; use esp_hal::{ - prelude::*, rsa::{ operand_sizes::*, Rsa, diff --git a/hil-test/tests/sha.rs b/hil-test/tests/sha.rs index 41939ec59d8..4f67c0573d6 100644 --- a/hil-test/tests/sha.rs +++ b/hil-test/tests/sha.rs @@ -13,7 +13,7 @@ use esp_hal::sha::{Sha384, Sha512}; #[cfg(any(feature = "esp32s2", feature = "esp32s3"))] use esp_hal::sha::{Sha512_224, Sha512_256}; use esp_hal::{ - prelude::*, + clock::CpuClock, rng::Rng, sha::{Sha, Sha1, Sha256, ShaAlgorithm, ShaDigest}, }; diff --git a/hil-test/tests/spi_full_duplex.rs b/hil-test/tests/spi_full_duplex.rs index cc8a4b5ffa4..1316d112618 100644 --- a/hil-test/tests/spi_full_duplex.rs +++ b/hil-test/tests/spi_full_duplex.rs @@ -15,8 +15,8 @@ use esp_hal::{ dma_buffers, gpio::{Level, NoPin}, peripheral::Peripheral, - prelude::*, spi::master::{Config, Spi}, + time::RateExtU32, Blocking, }; #[cfg(pcnt)] diff --git a/hil-test/tests/spi_half_duplex_read.rs b/hil-test/tests/spi_half_duplex_read.rs index 88f2c499b5f..ab0d4529544 100644 --- a/hil-test/tests/spi_half_duplex_read.rs +++ b/hil-test/tests/spi_half_duplex_read.rs @@ -9,12 +9,12 @@ use esp_hal::{ dma::{DmaRxBuf, DmaTxBuf}, dma_buffers, gpio::{Level, Output}, - prelude::*, spi::{ master::{Address, Command, Config, Spi, SpiDma}, DataMode, Mode, }, + time::RateExtU32, Blocking, }; use hil_test as _; diff --git a/hil-test/tests/spi_half_duplex_write.rs b/hil-test/tests/spi_half_duplex_write.rs index 87d6b5c3855..6de721fd0d5 100644 --- a/hil-test/tests/spi_half_duplex_write.rs +++ b/hil-test/tests/spi_half_duplex_write.rs @@ -10,12 +10,12 @@ use esp_hal::{ dma_buffers, gpio::interconnect::InputSignal, pcnt::{channel::EdgeMode, unit::Unit, Pcnt}, - prelude::*, spi::{ master::{Address, Command, Config, Spi, SpiDma}, DataMode, Mode, }, + time::RateExtU32, Blocking, }; use hil_test as _; diff --git a/hil-test/tests/spi_half_duplex_write_psram.rs b/hil-test/tests/spi_half_duplex_write_psram.rs index 24cdc44f5e0..5027dc5ffb8 100644 --- a/hil-test/tests/spi_half_duplex_write_psram.rs +++ b/hil-test/tests/spi_half_duplex_write_psram.rs @@ -12,12 +12,12 @@ use esp_hal::{ dma_descriptors_chunk_size, gpio::interconnect::InputSignal, pcnt::{channel::EdgeMode, unit::Unit, Pcnt}, - prelude::*, spi::{ master::{Address, Command, Config, Spi, SpiDma}, DataMode, Mode, }, + time::RateExtU32, Blocking, }; use hil_test as _; diff --git a/hil-test/tests/systimer.rs b/hil-test/tests/systimer.rs index 647b265cf9d..7c7c0fe0400 100644 --- a/hil-test/tests/systimer.rs +++ b/hil-test/tests/systimer.rs @@ -12,7 +12,8 @@ use critical_section::Mutex; use embedded_hal::delay::DelayNs; use esp_hal::{ delay::Delay, - prelude::*, + macros::handler, + time::ExtU64, timer::{ systimer::{Alarm, SystemTimer}, OneShotTimer, diff --git a/hil-test/tests/twai.rs b/hil-test/tests/twai.rs index 86c95864290..b244dd8d289 100644 --- a/hil-test/tests/twai.rs +++ b/hil-test/tests/twai.rs @@ -7,7 +7,6 @@ use embedded_can::Frame; use esp_hal::{ - prelude::*, twai::{self, filter::SingleStandardFilter, EspTwaiFrame, StandardId, TwaiMode}, Blocking, }; diff --git a/hil-test/tests/uart.rs b/hil-test/tests/uart.rs index 807b179a85d..350d8986311 100644 --- a/hil-test/tests/uart.rs +++ b/hil-test/tests/uart.rs @@ -7,7 +7,6 @@ use embedded_hal_nb::serial::{Read, Write}; use esp_hal::{ - prelude::*, uart::{self, ClockSource, Uart}, Blocking, }; diff --git a/hil-test/tests/uart_regression.rs b/hil-test/tests/uart_regression.rs index 26ed3bb66d3..e0a4775f9a1 100644 --- a/hil-test/tests/uart_regression.rs +++ b/hil-test/tests/uart_regression.rs @@ -10,7 +10,6 @@ mod tests { use esp_hal::{ gpio::OutputPin, - prelude::*, uart::{self, UartRx, UartTx}, }; use hil_test as _; diff --git a/hil-test/tests/uart_tx_rx.rs b/hil-test/tests/uart_tx_rx.rs index 5a4c67226b1..5dd1de26c3e 100644 --- a/hil-test/tests/uart_tx_rx.rs +++ b/hil-test/tests/uart_tx_rx.rs @@ -6,7 +6,6 @@ #![no_main] use esp_hal::{ - prelude::*, uart::{self, UartRx, UartTx}, Blocking, }; diff --git a/qa-test/src/bin/embassy_executor_benchmark.rs b/qa-test/src/bin/embassy_executor_benchmark.rs index e1945bfca9a..77aa749e9e1 100644 --- a/qa-test/src/bin/embassy_executor_benchmark.rs +++ b/qa-test/src/bin/embassy_executor_benchmark.rs @@ -15,7 +15,8 @@ use core::{ use embassy_executor::{raw::TaskStorage, Spawner}; use esp_backtrace as _; use esp_hal::{ - prelude::*, + clock::{Clock, CpuClock}, + macros::handler, time::Duration, timer::{systimer::SystemTimer, OneShotTimer}, }; diff --git a/qa-test/src/bin/embassy_i2c.rs b/qa-test/src/bin/embassy_i2c.rs index 45a58efcec7..f8154ddc5d1 100644 --- a/qa-test/src/bin/embassy_i2c.rs +++ b/qa-test/src/bin/embassy_i2c.rs @@ -21,7 +21,7 @@ use embassy_time::{Duration, Timer}; use esp_backtrace as _; use esp_hal::{ i2c::master::{Config, I2c}, - prelude::*, + time::RateExtU32, timer::timg::TimerGroup, }; use lis3dh_async::{Lis3dh, Range, SlaveAddr}; diff --git a/qa-test/src/bin/embassy_i2c_bmp180_calibration_data.rs b/qa-test/src/bin/embassy_i2c_bmp180_calibration_data.rs index 77af5f4c76d..e89b8231e74 100644 --- a/qa-test/src/bin/embassy_i2c_bmp180_calibration_data.rs +++ b/qa-test/src/bin/embassy_i2c_bmp180_calibration_data.rs @@ -21,7 +21,7 @@ use embassy_time::{Duration, Timer}; use esp_backtrace as _; use esp_hal::{ i2c::master::{Config, I2c}, - prelude::*, + time::RateExtU32, timer::timg::TimerGroup, }; diff --git a/qa-test/src/bin/embassy_i2s_read.rs b/qa-test/src/bin/embassy_i2s_read.rs index ad12db40d2d..2886716249f 100644 --- a/qa-test/src/bin/embassy_i2s_read.rs +++ b/qa-test/src/bin/embassy_i2s_read.rs @@ -22,7 +22,7 @@ use esp_backtrace as _; use esp_hal::{ dma_buffers, i2s::master::{DataFormat, I2s, Standard}, - prelude::*, + time::RateExtU32, timer::timg::TimerGroup, }; use esp_println::println; diff --git a/qa-test/src/bin/embassy_i2s_sound.rs b/qa-test/src/bin/embassy_i2s_sound.rs index 9678d976496..e7a8b0970f5 100644 --- a/qa-test/src/bin/embassy_i2s_sound.rs +++ b/qa-test/src/bin/embassy_i2s_sound.rs @@ -36,7 +36,7 @@ use esp_backtrace as _; use esp_hal::{ dma_buffers, i2s::master::{DataFormat, I2s, Standard}, - prelude::*, + time::RateExtU32, timer::timg::TimerGroup, }; use esp_println::println; diff --git a/qa-test/src/bin/i2c_bmp180_calibration_data.rs b/qa-test/src/bin/i2c_bmp180_calibration_data.rs index 593765d16ee..91070eb77bd 100644 --- a/qa-test/src/bin/i2c_bmp180_calibration_data.rs +++ b/qa-test/src/bin/i2c_bmp180_calibration_data.rs @@ -13,8 +13,8 @@ use esp_backtrace as _; use esp_hal::{ + entry, i2c::master::{Config, I2c}, - prelude::*, }; use esp_println::println; diff --git a/qa-test/src/bin/i2c_display.rs b/qa-test/src/bin/i2c_display.rs index 5c64ee40cb9..91a424257b5 100644 --- a/qa-test/src/bin/i2c_display.rs +++ b/qa-test/src/bin/i2c_display.rs @@ -24,8 +24,9 @@ use embedded_graphics::{ use esp_backtrace as _; use esp_hal::{ delay::Delay, + entry, i2c::master::{Config, I2c}, - prelude::*, + time::ExtU64, }; use ssd1306::{prelude::*, I2CDisplayInterface, Ssd1306}; diff --git a/qa-test/src/bin/lcd_cam_ov2640.rs b/qa-test/src/bin/lcd_cam_ov2640.rs index 0a5c9314640..17ddd618eb3 100644 --- a/qa-test/src/bin/lcd_cam_ov2640.rs +++ b/qa-test/src/bin/lcd_cam_ov2640.rs @@ -29,6 +29,7 @@ use esp_backtrace as _; use esp_hal::{ delay::Delay, dma_rx_stream_buffer, + entry, i2c::{ self, master::{Config, I2c}, @@ -37,7 +38,7 @@ use esp_hal::{ cam::{self, Camera, RxEightBits}, LcdCam, }, - prelude::*, + time::RateExtU32, Blocking, }; use esp_println::{print, println}; diff --git a/qa-test/src/bin/lcd_dpi.rs b/qa-test/src/bin/lcd_dpi.rs index 5b85b7ef16a..179c7353448 100644 --- a/qa-test/src/bin/lcd_dpi.rs +++ b/qa-test/src/bin/lcd_dpi.rs @@ -35,6 +35,7 @@ use esp_backtrace as _; use esp_hal::{ delay::Delay, dma_loop_buffer, + entry, gpio::{Level, Output}, i2c::{self, master::I2c}, lcd_cam::{ @@ -47,7 +48,7 @@ use esp_hal::{ LcdCam, }, peripherals::Peripherals, - prelude::*, + time::RateExtU32, Blocking, }; use esp_println::println; diff --git a/qa-test/src/bin/lcd_i8080.rs b/qa-test/src/bin/lcd_i8080.rs index 662201d1a9b..73a84e95cf7 100644 --- a/qa-test/src/bin/lcd_i8080.rs +++ b/qa-test/src/bin/lcd_i8080.rs @@ -27,12 +27,13 @@ use esp_hal::{ delay::Delay, dma::DmaTxBuf, dma_tx_buffer, + entry, gpio::{Input, Level, Output, Pull}, lcd_cam::{ lcd::i8080::{Config, TxEightBits, I8080}, LcdCam, }, - prelude::*, + time::RateExtU32, Blocking, }; use esp_println::println; diff --git a/qa-test/src/bin/psram_octal.rs b/qa-test/src/bin/psram_octal.rs index 14419d201dc..41e66d120f4 100644 --- a/qa-test/src/bin/psram_octal.rs +++ b/qa-test/src/bin/psram_octal.rs @@ -14,7 +14,7 @@ use alloc::{string::String, vec::Vec}; use esp_alloc as _; use esp_backtrace as _; -use esp_hal::{prelude::*, psram}; +use esp_hal::{entry, psram}; use esp_println::println; fn init_psram_heap(start: *mut u8, size: usize) { diff --git a/qa-test/src/bin/psram_quad.rs b/qa-test/src/bin/psram_quad.rs index e5df76ee466..5fdad994ab2 100644 --- a/qa-test/src/bin/psram_quad.rs +++ b/qa-test/src/bin/psram_quad.rs @@ -14,7 +14,7 @@ use alloc::{string::String, vec::Vec}; use esp_alloc as _; use esp_backtrace as _; -use esp_hal::{prelude::*, psram}; +use esp_hal::{entry, psram}; use esp_println::println; fn init_psram_heap(start: *mut u8, size: usize) { diff --git a/qa-test/src/bin/qspi_flash.rs b/qa-test/src/bin/qspi_flash.rs index bae87784281..93c28416ff5 100644 --- a/qa-test/src/bin/qspi_flash.rs +++ b/qa-test/src/bin/qspi_flash.rs @@ -32,12 +32,13 @@ use esp_hal::{ delay::Delay, dma::{DmaRxBuf, DmaTxBuf}, dma_buffers, - prelude::*, + entry, spi::{ master::{Address, Command, Config, Spi}, DataMode, Mode, }, + time::RateExtU32, }; use esp_println::{print, println}; diff --git a/qa-test/src/bin/ram.rs b/qa-test/src/bin/ram.rs index 70c14731ab8..4fd04a3e835 100644 --- a/qa-test/src/bin/ram.rs +++ b/qa-test/src/bin/ram.rs @@ -18,7 +18,7 @@ #![no_main] use esp_backtrace as _; -use esp_hal::{delay::Delay, macros::ram, prelude::*, rtc_cntl::Rtc}; +use esp_hal::{delay::Delay, entry, macros::ram, rtc_cntl::Rtc, time::ExtU64}; use esp_println::println; #[ram(rtc_fast)] diff --git a/qa-test/src/bin/spi_halfduplex_read_manufacturer_id.rs b/qa-test/src/bin/spi_halfduplex_read_manufacturer_id.rs index 94db9146922..3972410f609 100644 --- a/qa-test/src/bin/spi_halfduplex_read_manufacturer_id.rs +++ b/qa-test/src/bin/spi_halfduplex_read_manufacturer_id.rs @@ -30,12 +30,13 @@ use esp_backtrace as _; use esp_hal::{ delay::Delay, - prelude::*, + entry, spi::{ master::{Address, Command, Config, Spi}, DataMode, Mode, }, + time::RateExtU32, }; use esp_println::println;