diff --git a/esp-hal/MIGRATING-0.20.md b/esp-hal/MIGRATING-0.20.md index d0eec4a8881..0714b5a81e6 100644 --- a/esp-hal/MIGRATING-0.20.md +++ b/esp-hal/MIGRATING-0.20.md @@ -19,7 +19,7 @@ Instead of manually grabbing peripherals and setting up clocks, you should now c - let peripherals = Peripherals::take(); - let system = SystemControl::new(peripherals.SYSTEM); - let clocks = ClockControl::boot_defaults(system.clock_control).freeze(); -+ let (peripherals, clocks) = esp_hal::init(Config::default()); ++ let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); // ... } diff --git a/esp-hal/src/clock/mod.rs b/esp-hal/src/clock/mod.rs index 100d95454dd..59cb01cf6a1 100644 --- a/esp-hal/src/clock/mod.rs +++ b/esp-hal/src/clock/mod.rs @@ -49,14 +49,14 @@ //! # fn main() { //! // Initialize with the highest possible frequency for this chip //! let (peripherals, clocks) = esp_hal::init({ -//! let mut config = Config::default(); +//! let mut config = esp_hal::Config::default(); //! config.cpu_clock = CpuClock::max(); //! config //! }); //! //! // Initialize with custom clock frequency //! // let (peripherals, clocks) = esp_hal::init({ -//! // let mut config = Config::default(); +//! // let mut config = esp_hal::Config::default(); #![cfg_attr( not(any(esp32c2, esp32h2)), doc = "// config.cpu_clock = CpuClock::Clock160MHz;" @@ -67,7 +67,7 @@ //! // }); //! // //! // Initialize with default clock frequency for this chip -//! // let (peripherals, clocks) = esp_hal::init(Config::default()); +//! // let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); //! # } //! ``` diff --git a/esp-hal/src/lcd_cam/lcd/i8080.rs b/esp-hal/src/lcd_cam/lcd/i8080.rs index 694d73b723c..27af36a8578 100644 --- a/esp-hal/src/lcd_cam/lcd/i8080.rs +++ b/esp-hal/src/lcd_cam/lcd/i8080.rs @@ -16,7 +16,7 @@ //! ```rust, no_run #![doc = crate::before_snippet!()] //! # use esp_hal::gpio::Io; -//! # use esp_hal::lcd_cam::{LcdCam, lcd::i8080::{self, I8080, TxEightBits}}; +//! # use esp_hal::lcd_cam::{LcdCam, lcd::i8080::{Config, I8080, TxEightBits}}; //! # use esp_hal::dma_buffers; //! # use esp_hal::dma::{Dma, DmaPriority}; //! # let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); @@ -49,7 +49,7 @@ //! tx_descriptors, //! tx_pins, //! 20.MHz(), -//! i8080::Config::default(), +//! Config::default(), //! &clocks, //! ) //! .with_ctrl_pins(io.pins.gpio0, io.pins.gpio47); diff --git a/esp-hal/src/lib.rs b/esp-hal/src/lib.rs index 9b98ac3e546..07636b5cfb9 100644 --- a/esp-hal/src/lib.rs +++ b/esp-hal/src/lib.rs @@ -73,7 +73,7 @@ //! //! #[entry] //! fn main() -> ! { -//! let (peripherals, clocks) = esp_hal::init(Config::default()); +//! let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); //! //! // Set GPIO0 as an output, and set its state high initially. //! let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); @@ -625,7 +625,7 @@ macro_rules! before_snippet { # loop {} # } # fn main() { -# let (peripherals, clocks) = esp_hal::init(Config::default()); +# let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); "# }; } diff --git a/esp-hal/src/mcpwm/operator.rs b/esp-hal/src/mcpwm/operator.rs index 2f73324e7ac..9d08ac1966a 100644 --- a/esp-hal/src/mcpwm/operator.rs +++ b/esp-hal/src/mcpwm/operator.rs @@ -486,7 +486,6 @@ impl<'d, Pin: OutputPin, PWM: PwmPeripheral, const OP: u8, const IS_A: bool> /// # use esp_hal::mcpwm::{McPwm, PeripheralClockConfig}; /// # use esp_hal::mcpwm::operator::{DeadTimeCfg, PwmPinConfig, PWMStream}; /// # use esp_hal::gpio::Io; -/// let (peripherals, clocks) = esp_hal::init(Config::default()); /// # let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); /// // active high complementary using PWMA input /// let bridge_active = DeadTimeCfg::new_ahc(); diff --git a/esp-hal/src/prelude.rs b/esp-hal/src/prelude.rs index a6cbed5434d..11ad6b9ae56 100644 --- a/esp-hal/src/prelude.rs +++ b/esp-hal/src/prelude.rs @@ -38,4 +38,4 @@ pub use crate::timer::timg::{ pub use crate::timer::Timer as _esp_hal_timer_Timer; #[cfg(any(uart0, uart1, uart2))] pub use crate::uart::Instance as _esp_hal_uart_Instance; -pub use crate::{clock::CpuClock, entry, macros::*, Config, InterruptConfigurable}; +pub use crate::{clock::CpuClock, entry, macros::*, InterruptConfigurable}; diff --git a/esp-hal/src/uart.rs b/esp-hal/src/uart.rs index c76756112ed..62e49a474e1 100644 --- a/esp-hal/src/uart.rs +++ b/esp-hal/src/uart.rs @@ -56,12 +56,12 @@ //! ### Sending and Receiving Data //! ```rust, no_run #![doc = crate::before_snippet!()] -//! # use esp_hal::uart::{self, Uart}; +//! # use esp_hal::uart::{config::Config, Uart}; //! # use esp_hal::gpio::Io; //! # let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); //! # let mut uart1 = Uart::new_with_config( //! # peripherals.UART1, -//! # uart::config::Config::default(), +//! # Config::default(), //! # &clocks, //! # io.pins.gpio1, //! # io.pins.gpio2, @@ -74,12 +74,12 @@ //! ### Splitting the UART into TX and RX Components //! ```rust, no_run #![doc = crate::before_snippet!()] -//! # use esp_hal::uart::{self, Uart}; +//! # use esp_hal::uart::{config::Config, Uart}; //! # use esp_hal::gpio::Io; //! # let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); //! # let mut uart1 = Uart::new_with_config( //! # peripherals.UART1, -//! # uart::config::Config::default(), +//! # Config::default(), //! # &clocks, //! # io.pins.gpio1, //! # io.pins.gpio2, diff --git a/examples/src/bin/adc.rs b/examples/src/bin/adc.rs index ab11bb5e89e..1c9413e2c26 100644 --- a/examples/src/bin/adc.rs +++ b/examples/src/bin/adc.rs @@ -27,7 +27,7 @@ use esp_println::println; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); cfg_if::cfg_if! { diff --git a/examples/src/bin/adc_cal.rs b/examples/src/bin/adc_cal.rs index d1d667a4c35..1466e01cc46 100644 --- a/examples/src/bin/adc_cal.rs +++ b/examples/src/bin/adc_cal.rs @@ -23,7 +23,7 @@ use esp_println::println; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); cfg_if::cfg_if! { diff --git a/examples/src/bin/advanced_serial.rs b/examples/src/bin/advanced_serial.rs index d41bf15d288..b4a3760189f 100644 --- a/examples/src/bin/advanced_serial.rs +++ b/examples/src/bin/advanced_serial.rs @@ -19,7 +19,7 @@ use nb::block; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/examples/src/bin/blinky.rs b/examples/src/bin/blinky.rs index fc592c4f535..114854599eb 100644 --- a/examples/src/bin/blinky.rs +++ b/examples/src/bin/blinky.rs @@ -17,7 +17,7 @@ use esp_hal::{ #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); // Set GPIO0 as an output, and set its state high initially. let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/examples/src/bin/blinky_erased_pins.rs b/examples/src/bin/blinky_erased_pins.rs index 435601cbc2c..65204583333 100644 --- a/examples/src/bin/blinky_erased_pins.rs +++ b/examples/src/bin/blinky_erased_pins.rs @@ -20,7 +20,7 @@ use esp_hal::{ #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/examples/src/bin/dac.rs b/examples/src/bin/dac.rs index b379a9b3bd9..825600c09a5 100644 --- a/examples/src/bin/dac.rs +++ b/examples/src/bin/dac.rs @@ -23,7 +23,7 @@ use esp_hal::{analog::dac::Dac, delay::Delay, gpio::Io, prelude::*}; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/examples/src/bin/debug_assist.rs b/examples/src/bin/debug_assist.rs index 1599a77f67d..3a39b30cb7e 100644 --- a/examples/src/bin/debug_assist.rs +++ b/examples/src/bin/debug_assist.rs @@ -18,7 +18,7 @@ static DA: Mutex>> = Mutex::new(RefCell::new(None)); #[entry] fn main() -> ! { - let (peripherals, _clocks) = esp_hal::init(Config::default()); + let (peripherals, _clocks) = esp_hal::init(esp_hal::Config::default()); let mut da = DebugAssist::new(peripherals.ASSIST_DEBUG); da.set_interrupt_handler(interrupt_handler); diff --git a/examples/src/bin/dma_extmem2mem.rs b/examples/src/bin/dma_extmem2mem.rs index a6ff9a09963..fcc4832b93a 100644 --- a/examples/src/bin/dma_extmem2mem.rs +++ b/examples/src/bin/dma_extmem2mem.rs @@ -62,7 +62,7 @@ fn init_heap(psram: impl esp_hal::peripheral::Peripheral

! { esp_println::logger::init_logger(log::LevelFilter::Info); - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); init_heap(peripherals.PSRAM); let delay = Delay::new(&clocks); diff --git a/examples/src/bin/dma_mem2mem.rs b/examples/src/bin/dma_mem2mem.rs index 5c153ecbfb4..39f7a02f434 100644 --- a/examples/src/bin/dma_mem2mem.rs +++ b/examples/src/bin/dma_mem2mem.rs @@ -21,7 +21,7 @@ const DATA_SIZE: usize = 1024 * 10; fn main() -> ! { esp_println::logger::init_logger(log::LevelFilter::Info); - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let delay = Delay::new(&clocks); diff --git a/examples/src/bin/embassy_hello_world.rs b/examples/src/bin/embassy_hello_world.rs index 6e2b4a10079..9b47ccf416c 100644 --- a/examples/src/bin/embassy_hello_world.rs +++ b/examples/src/bin/embassy_hello_world.rs @@ -12,7 +12,7 @@ use embassy_executor::Spawner; use embassy_time::{Duration, Timer}; use esp_backtrace as _; -use esp_hal::{prelude::*, timer::timg::TimerGroup}; +use esp_hal::timer::timg::TimerGroup; #[embassy_executor::task] async fn run() { @@ -25,7 +25,7 @@ async fn run() { #[esp_hal_embassy::main] async fn main(spawner: Spawner) { esp_println::logger::init_logger_from_env(); - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); esp_println::println!("Init!"); diff --git a/examples/src/bin/embassy_i2c.rs b/examples/src/bin/embassy_i2c.rs index f5ff82fa146..995c99942ad 100644 --- a/examples/src/bin/embassy_i2c.rs +++ b/examples/src/bin/embassy_i2c.rs @@ -24,7 +24,7 @@ use lis3dh_async::{Lis3dh, Range, SlaveAddr}; #[esp_hal_embassy::main] async fn main(_spawner: Spawner) { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let timg0 = TimerGroup::new(peripherals.TIMG0, &clocks); esp_hal_embassy::init(&clocks, timg0.timer0); diff --git a/examples/src/bin/embassy_i2c_bmp180_calibration_data.rs b/examples/src/bin/embassy_i2c_bmp180_calibration_data.rs index e30d08eec9e..2ba39581c2d 100644 --- a/examples/src/bin/embassy_i2c_bmp180_calibration_data.rs +++ b/examples/src/bin/embassy_i2c_bmp180_calibration_data.rs @@ -24,7 +24,7 @@ use esp_hal::{gpio::Io, i2c::I2C, prelude::*, timer::timg::TimerGroup}; #[esp_hal_embassy::main] async fn main(_spawner: Spawner) { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let timg0 = TimerGroup::new(peripherals.TIMG0, &clocks); esp_hal_embassy::init(&clocks, timg0.timer0); diff --git a/examples/src/bin/embassy_i2s_read.rs b/examples/src/bin/embassy_i2s_read.rs index ac2f549840e..24324c64661 100644 --- a/examples/src/bin/embassy_i2s_read.rs +++ b/examples/src/bin/embassy_i2s_read.rs @@ -32,7 +32,7 @@ use esp_println::println; #[esp_hal_embassy::main] async fn main(_spawner: Spawner) { println!("Init!"); - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let timg0 = TimerGroup::new(peripherals.TIMG0, &clocks); esp_hal_embassy::init(&clocks, timg0.timer0); diff --git a/examples/src/bin/embassy_i2s_sound.rs b/examples/src/bin/embassy_i2s_sound.rs index 29320016823..1a5a0a76b02 100644 --- a/examples/src/bin/embassy_i2s_sound.rs +++ b/examples/src/bin/embassy_i2s_sound.rs @@ -54,7 +54,7 @@ const SINE: [i16; 64] = [ #[esp_hal_embassy::main] async fn main(_spawner: Spawner) { println!("Init!"); - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let timg0 = TimerGroup::new(peripherals.TIMG0, &clocks); esp_hal_embassy::init(&clocks, timg0.timer0); diff --git a/examples/src/bin/embassy_multicore.rs b/examples/src/bin/embassy_multicore.rs index 578a4907f25..872d0846e3d 100644 --- a/examples/src/bin/embassy_multicore.rs +++ b/examples/src/bin/embassy_multicore.rs @@ -22,7 +22,6 @@ use esp_hal::{ cpu_control::{CpuControl, Stack}, get_core, gpio::{AnyOutput, Io, Level}, - prelude::*, timer::{timg::TimerGroup, ErasedTimer}, }; use esp_hal_embassy::Executor; @@ -52,7 +51,7 @@ async fn control_led( #[esp_hal_embassy::main] async fn main(_spawner: Spawner) { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/examples/src/bin/embassy_multicore_interrupt.rs b/examples/src/bin/embassy_multicore_interrupt.rs index 82ae89188a0..48c72e8e894 100644 --- a/examples/src/bin/embassy_multicore_interrupt.rs +++ b/examples/src/bin/embassy_multicore_interrupt.rs @@ -71,7 +71,7 @@ async fn enable_disable_led(control: &'static Signal ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let sw_ints = SoftwareInterruptControl::new(peripherals.SW_INTERRUPT); diff --git a/examples/src/bin/embassy_multiprio.rs b/examples/src/bin/embassy_multiprio.rs index 56ddc0e7ca7..d6f52df36d2 100644 --- a/examples/src/bin/embassy_multiprio.rs +++ b/examples/src/bin/embassy_multiprio.rs @@ -25,7 +25,6 @@ use embassy_time::{Duration, Instant, Ticker, Timer}; use esp_backtrace as _; use esp_hal::{ interrupt::{software::SoftwareInterruptControl, Priority}, - prelude::*, timer::{timg::TimerGroup, ErasedTimer}, }; use esp_hal_embassy::InterruptExecutor; @@ -72,7 +71,7 @@ async fn main(low_prio_spawner: Spawner) { esp_println::logger::init_logger_from_env(); println!("Init!"); - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let sw_ints = SoftwareInterruptControl::new(peripherals.SW_INTERRUPT); diff --git a/examples/src/bin/embassy_parl_io_rx.rs b/examples/src/bin/embassy_parl_io_rx.rs index 240605be205..dae767bbd47 100644 --- a/examples/src/bin/embassy_parl_io_rx.rs +++ b/examples/src/bin/embassy_parl_io_rx.rs @@ -26,7 +26,7 @@ use esp_println::println; #[esp_hal_embassy::main] async fn main(_spawner: Spawner) { esp_println::println!("Init!"); - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let systimer = SystemTimer::new(peripherals.SYSTIMER).split::(); esp_hal_embassy::init(&clocks, systimer.alarm0); diff --git a/examples/src/bin/embassy_parl_io_tx.rs b/examples/src/bin/embassy_parl_io_tx.rs index ba88313e9f7..7a90821e50f 100644 --- a/examples/src/bin/embassy_parl_io_tx.rs +++ b/examples/src/bin/embassy_parl_io_tx.rs @@ -37,7 +37,7 @@ use esp_println::println; #[esp_hal_embassy::main] async fn main(_spawner: Spawner) { esp_println::println!("Init!"); - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let systimer = SystemTimer::new(peripherals.SYSTIMER).split::(); esp_hal_embassy::init(&clocks, systimer.alarm0); diff --git a/examples/src/bin/embassy_rmt_rx.rs b/examples/src/bin/embassy_rmt_rx.rs index 06c82453713..794aeceedd9 100644 --- a/examples/src/bin/embassy_rmt_rx.rs +++ b/examples/src/bin/embassy_rmt_rx.rs @@ -39,7 +39,7 @@ async fn signal_task(mut pin: Output<'static, Gpio5>) { #[esp_hal_embassy::main] async fn main(spawner: Spawner) { println!("Init!"); - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let timg0 = TimerGroup::new(peripherals.TIMG0, &clocks); esp_hal_embassy::init(&clocks, timg0.timer0); diff --git a/examples/src/bin/embassy_rmt_tx.rs b/examples/src/bin/embassy_rmt_tx.rs index 8eed5f6c971..c8cc3c83427 100644 --- a/examples/src/bin/embassy_rmt_tx.rs +++ b/examples/src/bin/embassy_rmt_tx.rs @@ -25,7 +25,7 @@ use esp_println::println; #[esp_hal_embassy::main] async fn main(_spawner: Spawner) { println!("Init!"); - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let timg0 = TimerGroup::new(peripherals.TIMG0, &clocks); esp_hal_embassy::init(&clocks, timg0.timer0); diff --git a/examples/src/bin/embassy_serial.rs b/examples/src/bin/embassy_serial.rs index b923f384f1b..541ea6c8e89 100644 --- a/examples/src/bin/embassy_serial.rs +++ b/examples/src/bin/embassy_serial.rs @@ -15,10 +15,9 @@ use esp_backtrace as _; use esp_hal::{ gpio::Io, peripherals::UART0, - prelude::*, timer::timg::TimerGroup, uart::{ - config::{AtCmdConfig, Config as UartConfig}, + config::{AtCmdConfig, Config}, Uart, UartRx, UartTx, @@ -79,7 +78,7 @@ async fn reader( #[esp_hal_embassy::main] async fn main(spawner: Spawner) { esp_println::println!("Init!"); - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let timg0 = TimerGroup::new(peripherals.TIMG0, &clocks); esp_hal_embassy::init(&clocks, timg0.timer0); @@ -103,7 +102,7 @@ async fn main(spawner: Spawner) { } } - let config = UartConfig::default().rx_fifo_full_threshold(READ_BUF_SIZE as u16); + let config = Config::default().rx_fifo_full_threshold(READ_BUF_SIZE as u16); let mut uart0 = Uart::new_async_with_config(peripherals.UART0, config, &clocks, tx_pin, rx_pin).unwrap(); diff --git a/examples/src/bin/embassy_spi.rs b/examples/src/bin/embassy_spi.rs index ee06bbb7ab3..a8f6ab68720 100644 --- a/examples/src/bin/embassy_spi.rs +++ b/examples/src/bin/embassy_spi.rs @@ -33,7 +33,7 @@ use esp_hal::{ #[esp_hal_embassy::main] async fn main(_spawner: Spawner) { esp_println::println!("Init!"); - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let timg0 = TimerGroup::new(peripherals.TIMG0, &clocks); esp_hal_embassy::init(&clocks, timg0.timer0); diff --git a/examples/src/bin/embassy_touch.rs b/examples/src/bin/embassy_touch.rs index 190bfda1927..e0f199442f9 100644 --- a/examples/src/bin/embassy_touch.rs +++ b/examples/src/bin/embassy_touch.rs @@ -18,7 +18,6 @@ use embassy_time::{Duration, Timer}; use esp_backtrace as _; use esp_hal::{ gpio::Io, - prelude::*, rtc_cntl::Rtc, timer::timg::TimerGroup, touch::{Touch, TouchConfig, TouchPad}, @@ -28,7 +27,7 @@ use esp_println::println; #[esp_hal_embassy::main] async fn main(_spawner: Spawner) { esp_println::logger::init_logger_from_env(); - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let timg0 = TimerGroup::new(peripherals.TIMG0, &clocks); esp_hal_embassy::init(&clocks, timg0.timer0); diff --git a/examples/src/bin/embassy_twai.rs b/examples/src/bin/embassy_twai.rs index e61e47c4080..10ddc4e8df9 100644 --- a/examples/src/bin/embassy_twai.rs +++ b/examples/src/bin/embassy_twai.rs @@ -28,7 +28,6 @@ use esp_hal::{ gpio::Io, interrupt, peripherals::{self, TWAI0}, - prelude::*, timer::timg::TimerGroup, twai::{self, EspTwaiFrame, TwaiMode, TwaiRx, TwaiTx}, }; @@ -83,7 +82,7 @@ async fn transmitter( #[esp_hal_embassy::main] async fn main(spawner: Spawner) { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let timg0 = TimerGroup::new(peripherals.TIMG0, &clocks); esp_hal_embassy::init(&clocks, timg0.timer0); diff --git a/examples/src/bin/embassy_usb_serial.rs b/examples/src/bin/embassy_usb_serial.rs index 422b43b258d..8d41c33d0f0 100644 --- a/examples/src/bin/embassy_usb_serial.rs +++ b/examples/src/bin/embassy_usb_serial.rs @@ -23,7 +23,7 @@ use esp_backtrace as _; use esp_hal::{ gpio::Io, otg_fs::{ - asynch::{Config as OtgConfig, Driver}, + asynch::{Config, Driver}, Usb, }, prelude::*, @@ -33,7 +33,7 @@ use esp_hal::{ #[esp_hal_embassy::main] async fn main(_spawner: Spawner) -> () { esp_println::println!("Init!"); - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let timg0 = TimerGroup::new(peripherals.TIMG0, &clocks); esp_hal_embassy::init(&clocks, timg0.timer0); @@ -44,7 +44,7 @@ async fn main(_spawner: Spawner) -> () { // Create the driver, from the HAL. let mut ep_out_buffer = [0u8; 1024]; - let config = OtgConfig::default(); + let config = Config::default(); let driver = Driver::new(usb, &mut ep_out_buffer, config); diff --git a/examples/src/bin/embassy_usb_serial_jtag.rs b/examples/src/bin/embassy_usb_serial_jtag.rs index 293a1b3d317..b42bf7d6bf0 100644 --- a/examples/src/bin/embassy_usb_serial_jtag.rs +++ b/examples/src/bin/embassy_usb_serial_jtag.rs @@ -12,7 +12,6 @@ use embassy_executor::Spawner; use embassy_sync::{blocking_mutex::raw::NoopRawMutex, signal::Signal}; use esp_backtrace as _; use esp_hal::{ - prelude::*, timer::timg::TimerGroup, usb_serial_jtag::{UsbSerialJtag, UsbSerialJtagRx, UsbSerialJtagTx}, Async, @@ -64,7 +63,7 @@ async fn reader( #[esp_hal_embassy::main] async fn main(spawner: Spawner) -> () { esp_println::println!("Init!"); - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let timg0 = TimerGroup::new(peripherals.TIMG0, &clocks); esp_hal_embassy::init(&clocks, timg0.timer0); diff --git a/examples/src/bin/embassy_wait.rs b/examples/src/bin/embassy_wait.rs index 86d69ceeab3..9b9d5854db7 100644 --- a/examples/src/bin/embassy_wait.rs +++ b/examples/src/bin/embassy_wait.rs @@ -13,14 +13,13 @@ use embassy_time::{Duration, Timer}; use esp_backtrace as _; use esp_hal::{ gpio::{Input, Io, Pull}, - prelude::*, timer::timg::TimerGroup, }; #[esp_hal_embassy::main] async fn main(_spawner: Spawner) { esp_println::println!("Init!"); - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let timg0 = TimerGroup::new(peripherals.TIMG0, &clocks); esp_hal_embassy::init(&clocks, timg0.timer0); diff --git a/examples/src/bin/etm_blinky_systimer.rs b/examples/src/bin/etm_blinky_systimer.rs index 97432cbdb8f..b0057d4cee5 100644 --- a/examples/src/bin/etm_blinky_systimer.rs +++ b/examples/src/bin/etm_blinky_systimer.rs @@ -24,7 +24,7 @@ use fugit::ExtU32; #[entry] fn main() -> ! { - let (peripherals, _clocks) = esp_hal::init(Config::default()); + let (peripherals, _clocks) = esp_hal::init(esp_hal::Config::default()); let syst = SystemTimer::new(peripherals.SYSTIMER); let syst_alarms = syst.split::(); diff --git a/examples/src/bin/etm_gpio.rs b/examples/src/bin/etm_gpio.rs index b470e6f054c..36adfbdc393 100644 --- a/examples/src/bin/etm_gpio.rs +++ b/examples/src/bin/etm_gpio.rs @@ -22,7 +22,7 @@ use esp_hal::{ #[entry] fn main() -> ! { - let (peripherals, _clocks) = esp_hal::init(Config::default()); + let (peripherals, _clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); let mut led = io.pins.gpio1; diff --git a/examples/src/bin/etm_timer.rs b/examples/src/bin/etm_timer.rs index 07b3ef571f9..649e64590cc 100644 --- a/examples/src/bin/etm_timer.rs +++ b/examples/src/bin/etm_timer.rs @@ -28,7 +28,7 @@ static TIMER0: Mutex, esp_hal::Blocking>>>> = #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let timg0 = TimerGroup::new(peripherals.TIMG0, &clocks); let timer0 = timg0.timer0; diff --git a/examples/src/bin/gpio_interrupt.rs b/examples/src/bin/gpio_interrupt.rs index 2082353458a..2e7a60fe36c 100644 --- a/examples/src/bin/gpio_interrupt.rs +++ b/examples/src/bin/gpio_interrupt.rs @@ -32,7 +32,7 @@ cfg_if::cfg_if! { #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); // Set GPIO2 as an output, and set its state high initially. let mut io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/examples/src/bin/hello_rgb.rs b/examples/src/bin/hello_rgb.rs index fbc9a937032..d2afd555892 100644 --- a/examples/src/bin/hello_rgb.rs +++ b/examples/src/bin/hello_rgb.rs @@ -36,7 +36,7 @@ use smart_leds::{ #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/examples/src/bin/hello_world.rs b/examples/src/bin/hello_world.rs index 18728385f7b..ebda656f449 100644 --- a/examples/src/bin/hello_world.rs +++ b/examples/src/bin/hello_world.rs @@ -19,7 +19,7 @@ use esp_hal::{delay::Delay, gpio::Io, prelude::*, uart::Uart}; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let delay = Delay::new(&clocks); diff --git a/examples/src/bin/hmac.rs b/examples/src/bin/hmac.rs index 7c5adf1ffdf..0cd9bf634c2 100644 --- a/examples/src/bin/hmac.rs +++ b/examples/src/bin/hmac.rs @@ -73,7 +73,7 @@ type HmacSha256 = HmacSw; #[entry] fn main() -> ! { - let (peripherals, _clocks) = esp_hal::init(Config::default()); + let (peripherals, _clocks) = esp_hal::init(esp_hal::Config::default()); let mut rng = Rng::new(peripherals.RNG); diff --git a/examples/src/bin/i2c_bmp180_calibration_data.rs b/examples/src/bin/i2c_bmp180_calibration_data.rs index cd6fd36ee15..e3f61626a01 100644 --- a/examples/src/bin/i2c_bmp180_calibration_data.rs +++ b/examples/src/bin/i2c_bmp180_calibration_data.rs @@ -17,7 +17,7 @@ use esp_println::println; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/examples/src/bin/i2c_display.rs b/examples/src/bin/i2c_display.rs index 48caa04f6fc..a225d44b0f4 100644 --- a/examples/src/bin/i2c_display.rs +++ b/examples/src/bin/i2c_display.rs @@ -28,7 +28,7 @@ use ssd1306::{prelude::*, I2CDisplayInterface, Ssd1306}; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let delay = Delay::new(&clocks); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/examples/src/bin/i2s_read.rs b/examples/src/bin/i2s_read.rs index e4b926f2191..5a1616eef38 100644 --- a/examples/src/bin/i2s_read.rs +++ b/examples/src/bin/i2s_read.rs @@ -28,7 +28,7 @@ use esp_println::println; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/examples/src/bin/i2s_sound.rs b/examples/src/bin/i2s_sound.rs index 4fe2b5894c0..998bb127cdf 100644 --- a/examples/src/bin/i2s_sound.rs +++ b/examples/src/bin/i2s_sound.rs @@ -49,7 +49,7 @@ const SINE: [i16; 64] = [ #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/examples/src/bin/ieee802154_receive_all_frames.rs b/examples/src/bin/ieee802154_receive_all_frames.rs index f623dec8b2d..ce078a0223d 100644 --- a/examples/src/bin/ieee802154_receive_all_frames.rs +++ b/examples/src/bin/ieee802154_receive_all_frames.rs @@ -5,15 +5,15 @@ use esp_backtrace as _; use esp_hal::prelude::*; -use esp_ieee802154::{Config as Ieee802154Config, Ieee802154}; +use esp_ieee802154::{Config, Ieee802154}; use esp_println::println; #[entry] fn main() -> ! { - let (mut peripherals, _clocks) = esp_hal::init(Config::default()); + let (mut peripherals, _clocks) = esp_hal::init(esp_hal::Config::default()); let mut ieee802154 = Ieee802154::new(peripherals.IEEE802154, &mut peripherals.RADIO_CLK); - ieee802154.set_config(Ieee802154Config { + ieee802154.set_config(Config { channel: 15, promiscuous: true, rx_when_idle: true, diff --git a/examples/src/bin/ieee802154_receive_frame.rs b/examples/src/bin/ieee802154_receive_frame.rs index 19ed94219d5..5fa678a3a52 100644 --- a/examples/src/bin/ieee802154_receive_frame.rs +++ b/examples/src/bin/ieee802154_receive_frame.rs @@ -5,15 +5,15 @@ use esp_backtrace as _; use esp_hal::prelude::*; -use esp_ieee802154::{Config as Ieee802154Config, Ieee802154}; +use esp_ieee802154::{Config, Ieee802154}; use esp_println::println; #[entry] fn main() -> ! { - let (mut peripherals, _clocks) = esp_hal::init(Config::default()); + let (mut peripherals, _clocks) = esp_hal::init(esp_hal::Config::default()); let mut ieee802154 = Ieee802154::new(peripherals.IEEE802154, &mut peripherals.RADIO_CLK); - ieee802154.set_config(Ieee802154Config { + ieee802154.set_config(Config { channel: 15, promiscuous: false, rx_when_idle: true, diff --git a/examples/src/bin/ieee802154_send_broadcast_frame.rs b/examples/src/bin/ieee802154_send_broadcast_frame.rs index 3ee1f554862..1053a934e16 100644 --- a/examples/src/bin/ieee802154_send_broadcast_frame.rs +++ b/examples/src/bin/ieee802154_send_broadcast_frame.rs @@ -5,7 +5,7 @@ use esp_backtrace as _; use esp_hal::{delay::Delay, prelude::*}; -use esp_ieee802154::{Config as Ieee802154Config, Frame, Ieee802154}; +use esp_ieee802154::{Config, Frame, Ieee802154}; use esp_println::println; use ieee802154::mac::{ Address, @@ -19,13 +19,13 @@ use ieee802154::mac::{ #[entry] fn main() -> ! { - let (mut peripherals, clocks) = esp_hal::init(Config::default()); + let (mut peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let delay = Delay::new(&clocks); let mut ieee802154 = Ieee802154::new(peripherals.IEEE802154, &mut peripherals.RADIO_CLK); - ieee802154.set_config(Ieee802154Config { + ieee802154.set_config(Config { channel: 15, promiscuous: false, pan_id: Some(0x4242), diff --git a/examples/src/bin/ieee802154_send_frame.rs b/examples/src/bin/ieee802154_send_frame.rs index 944688784a7..9cf2e72ba9e 100644 --- a/examples/src/bin/ieee802154_send_frame.rs +++ b/examples/src/bin/ieee802154_send_frame.rs @@ -5,7 +5,7 @@ use esp_backtrace as _; use esp_hal::{delay::Delay, prelude::*}; -use esp_ieee802154::{Config as Ieee802154Config, Frame, Ieee802154}; +use esp_ieee802154::{Config, Frame, Ieee802154}; use esp_println::println; use ieee802154::mac::{ Address, @@ -19,13 +19,13 @@ use ieee802154::mac::{ #[entry] fn main() -> ! { - let (mut peripherals, clocks) = esp_hal::init(Config::default()); + let (mut peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let delay = Delay::new(&clocks); let mut ieee802154 = Ieee802154::new(peripherals.IEEE802154, &mut peripherals.RADIO_CLK); - ieee802154.set_config(Ieee802154Config { + ieee802154.set_config(Config { channel: 15, promiscuous: false, pan_id: Some(0x4242), diff --git a/examples/src/bin/ieee802154_sniffer.rs b/examples/src/bin/ieee802154_sniffer.rs index 68e2e98c7f5..c78a7166a1e 100644 --- a/examples/src/bin/ieee802154_sniffer.rs +++ b/examples/src/bin/ieee802154_sniffer.rs @@ -9,12 +9,12 @@ use esp_backtrace as _; use esp_hal::{gpio::Io, prelude::*, reset::software_reset, uart::Uart}; -use esp_ieee802154::{Config as Ieee802154Config, Ieee802154}; +use esp_ieee802154::{Config, Ieee802154}; use esp_println::println; #[entry] fn main() -> ! { - let (mut peripherals, clocks) = esp_hal::init(Config::default()); + let (mut peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); @@ -53,7 +53,7 @@ fn main() -> ! { let radio = peripherals.IEEE802154; let mut ieee802154 = Ieee802154::new(radio, &mut peripherals.RADIO_CLK); - ieee802154.set_config(Ieee802154Config { + ieee802154.set_config(Config { channel, promiscuous: true, rx_when_idle: true, diff --git a/examples/src/bin/lcd_cam_ov2640.rs b/examples/src/bin/lcd_cam_ov2640.rs index 1ff4d9486b0..caa62eeb383 100644 --- a/examples/src/bin/lcd_cam_ov2640.rs +++ b/examples/src/bin/lcd_cam_ov2640.rs @@ -42,7 +42,7 @@ use esp_println::println; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/examples/src/bin/lcd_i8080.rs b/examples/src/bin/lcd_i8080.rs index 6bcce17e26c..20597d7babb 100644 --- a/examples/src/bin/lcd_i8080.rs +++ b/examples/src/bin/lcd_i8080.rs @@ -28,7 +28,7 @@ use esp_hal::{ dma_buffers, gpio::{Io, Level, Output}, lcd_cam::{ - lcd::i8080::{self, TxEightBits, I8080}, + lcd::i8080::{Config, TxEightBits, I8080}, LcdCam, }, prelude::*, @@ -37,7 +37,7 @@ use esp_println::println; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); @@ -77,7 +77,7 @@ fn main() -> ! { tx_descriptors, tx_pins, 20.MHz(), - i8080::Config::default(), + Config::default(), &clocks, ) .with_ctrl_pins(lcd_rs, lcd_wr); diff --git a/examples/src/bin/ledc.rs b/examples/src/bin/ledc.rs index 4b1a2d43702..b7dd70e6c20 100644 --- a/examples/src/bin/ledc.rs +++ b/examples/src/bin/ledc.rs @@ -24,7 +24,7 @@ use esp_hal::{ #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); let led = io.pins.gpio0; diff --git a/examples/src/bin/lp_core_basic.rs b/examples/src/bin/lp_core_basic.rs index a868158cdb8..9b35e8c0eba 100644 --- a/examples/src/bin/lp_core_basic.rs +++ b/examples/src/bin/lp_core_basic.rs @@ -23,7 +23,7 @@ use esp_println::{print, println}; #[entry] fn main() -> ! { - let (peripherals, _clocks) = esp_hal::init(Config::default()); + let (peripherals, _clocks) = esp_hal::init(esp_hal::Config::default()); // configure GPIO 1 as LP output pin let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/examples/src/bin/lp_core_i2c.rs b/examples/src/bin/lp_core_i2c.rs index 4f21a5b70b7..c4a817fd9f4 100644 --- a/examples/src/bin/lp_core_i2c.rs +++ b/examples/src/bin/lp_core_i2c.rs @@ -25,7 +25,7 @@ use esp_println::println; #[entry] fn main() -> ! { - let (peripherals, _clocks) = esp_hal::init(Config::default()); + let (peripherals, _clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/examples/src/bin/lp_core_uart.rs b/examples/src/bin/lp_core_uart.rs index 6296c9813d7..79e5962e946 100644 --- a/examples/src/bin/lp_core_uart.rs +++ b/examples/src/bin/lp_core_uart.rs @@ -22,13 +22,13 @@ use esp_hal::{ }, lp_core::{LpCore, LpCoreWakeupSource}, prelude::*, - uart::{config::Config as UartConfig, lp_uart::LpUart, Uart}, + uart::{config::Config, lp_uart::LpUart, Uart}, }; use esp_println::println; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); @@ -36,7 +36,7 @@ fn main() -> ! { let mut uart1 = Uart::new_with_config( peripherals.UART1, - UartConfig::default(), + Config::default(), &clocks, io.pins.gpio6, io.pins.gpio7, diff --git a/examples/src/bin/mcpwm.rs b/examples/src/bin/mcpwm.rs index 0e072159983..783046ae783 100644 --- a/examples/src/bin/mcpwm.rs +++ b/examples/src/bin/mcpwm.rs @@ -18,7 +18,7 @@ use esp_hal::{ #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); let pin = io.pins.gpio0; diff --git a/examples/src/bin/multicore.rs b/examples/src/bin/multicore.rs index aeb57e05075..28297e91733 100644 --- a/examples/src/bin/multicore.rs +++ b/examples/src/bin/multicore.rs @@ -23,7 +23,7 @@ static mut APP_CORE_STACK: Stack<8192> = Stack::new(); #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let delay = Delay::new(&clocks); diff --git a/examples/src/bin/parl_io_rx.rs b/examples/src/bin/parl_io_rx.rs index ea3f163bcd2..04d31ce6302 100644 --- a/examples/src/bin/parl_io_rx.rs +++ b/examples/src/bin/parl_io_rx.rs @@ -22,7 +22,7 @@ use esp_println::println; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/examples/src/bin/parl_io_tx.rs b/examples/src/bin/parl_io_tx.rs index 8f0bc12bbdc..8fc1b9eac6d 100644 --- a/examples/src/bin/parl_io_tx.rs +++ b/examples/src/bin/parl_io_tx.rs @@ -33,7 +33,7 @@ use esp_println::println; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/examples/src/bin/pcnt_encoder.rs b/examples/src/bin/pcnt_encoder.rs index eb40c7f7d8e..5cba71d117a 100644 --- a/examples/src/bin/pcnt_encoder.rs +++ b/examples/src/bin/pcnt_encoder.rs @@ -37,7 +37,7 @@ static VALUE: AtomicI32 = AtomicI32::new(0); #[entry] fn main() -> ! { - let (peripherals, _clocks) = esp_hal::init(Config::default()); + let (peripherals, _clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/examples/src/bin/psram_octal.rs b/examples/src/bin/psram_octal.rs index dad49894939..a1c46c7d80f 100644 --- a/examples/src/bin/psram_octal.rs +++ b/examples/src/bin/psram_octal.rs @@ -30,7 +30,7 @@ fn main() -> ! { #[cfg(debug_assertions)] compile_error!("This example MUST be built in release mode!"); - let (peripherals, _clocks) = esp_hal::init(Config::default()); + let (peripherals, _clocks) = esp_hal::init(esp_hal::Config::default()); psram::init_psram(peripherals.PSRAM); init_psram_heap(); diff --git a/examples/src/bin/psram_quad.rs b/examples/src/bin/psram_quad.rs index cf11cbc87da..93c0d9747ac 100644 --- a/examples/src/bin/psram_quad.rs +++ b/examples/src/bin/psram_quad.rs @@ -30,7 +30,7 @@ fn main() -> ! { #[cfg(debug_assertions)] compile_error!("PSRAM example must be built in release mode!"); - let (peripherals, _clocks) = esp_hal::init(Config::default()); + let (peripherals, _clocks) = esp_hal::init(esp_hal::Config::default()); psram::init_psram(peripherals.PSRAM); init_psram_heap(); diff --git a/examples/src/bin/qspi_flash.rs b/examples/src/bin/qspi_flash.rs index 169d7853dc0..65ee4ef5732 100644 --- a/examples/src/bin/qspi_flash.rs +++ b/examples/src/bin/qspi_flash.rs @@ -44,7 +44,7 @@ use esp_println::{print, println}; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); cfg_if::cfg_if! { diff --git a/examples/src/bin/ram.rs b/examples/src/bin/ram.rs index 91af1b6f168..bece3c8a998 100644 --- a/examples/src/bin/ram.rs +++ b/examples/src/bin/ram.rs @@ -31,7 +31,7 @@ static mut SOME_ZEROED_DATA: [u8; 8] = [0; 8]; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let delay = Delay::new(&clocks); diff --git a/examples/src/bin/rmt_rx.rs b/examples/src/bin/rmt_rx.rs index 3592a39564c..9ad6803f979 100644 --- a/examples/src/bin/rmt_rx.rs +++ b/examples/src/bin/rmt_rx.rs @@ -24,7 +24,7 @@ const WIDTH: usize = 80; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); let mut out = io.pins.gpio5; diff --git a/examples/src/bin/rmt_tx.rs b/examples/src/bin/rmt_tx.rs index d7df0f7d7a5..fd5dbc8807d 100644 --- a/examples/src/bin/rmt_tx.rs +++ b/examples/src/bin/rmt_tx.rs @@ -20,7 +20,7 @@ use esp_hal::{ #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/examples/src/bin/rng.rs b/examples/src/bin/rng.rs index ac240de253d..e981faac46a 100644 --- a/examples/src/bin/rng.rs +++ b/examples/src/bin/rng.rs @@ -11,7 +11,7 @@ use esp_println::println; #[entry] fn main() -> ! { - let (peripherals, _clocks) = esp_hal::init(Config::default()); + let (peripherals, _clocks) = esp_hal::init(esp_hal::Config::default()); let mut rng = Rng::new(peripherals.RNG); // Generate a random word (u32): diff --git a/examples/src/bin/rtc_time.rs b/examples/src/bin/rtc_time.rs index 662531c9a0b..4c0e9c4d189 100644 --- a/examples/src/bin/rtc_time.rs +++ b/examples/src/bin/rtc_time.rs @@ -10,7 +10,7 @@ use esp_hal::{delay::Delay, prelude::*, rtc_cntl::Rtc}; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let rtc = Rtc::new(peripherals.LPWR); let delay = Delay::new(&clocks); diff --git a/examples/src/bin/rtc_watchdog.rs b/examples/src/bin/rtc_watchdog.rs index badda73d47f..e197bd13038 100644 --- a/examples/src/bin/rtc_watchdog.rs +++ b/examples/src/bin/rtc_watchdog.rs @@ -24,7 +24,7 @@ static RWDT: Mutex>> = Mutex::new(RefCell::new(None)); #[entry] fn main() -> ! { - let (peripherals, _clocks) = esp_hal::init(Config::default()); + let (peripherals, _clocks) = esp_hal::init(esp_hal::Config::default()); let mut rtc = Rtc::new(peripherals.LPWR); rtc.set_interrupt_handler(interrupt_handler); diff --git a/examples/src/bin/serial_interrupts.rs b/examples/src/bin/serial_interrupts.rs index 901ac58c4b1..729f5a3d3a9 100644 --- a/examples/src/bin/serial_interrupts.rs +++ b/examples/src/bin/serial_interrupts.rs @@ -17,7 +17,7 @@ use esp_hal::{ peripherals::UART0, prelude::*, uart::{ - config::{AtCmdConfig, Config as UartConfig}, + config::{AtCmdConfig, Config}, Uart, }, Blocking, @@ -27,7 +27,7 @@ static SERIAL: Mutex>>> = Mutex::new(RefCel #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let delay = Delay::new(&clocks); @@ -49,7 +49,7 @@ fn main() -> ! { let (tx_pin, rx_pin) = (io.pins.gpio43, io.pins.gpio44); } } - let config = UartConfig::default().rx_fifo_full_threshold(30); + let config = Config::default().rx_fifo_full_threshold(30); let mut uart0 = Uart::new_with_config(peripherals.UART0, config, &clocks, tx_pin, rx_pin).unwrap(); diff --git a/examples/src/bin/sleep_timer.rs b/examples/src/bin/sleep_timer.rs index 1e9cbe2a29f..1a0db0116ef 100644 --- a/examples/src/bin/sleep_timer.rs +++ b/examples/src/bin/sleep_timer.rs @@ -11,7 +11,6 @@ use esp_backtrace as _; use esp_hal::{ delay::Delay, entry, - prelude::*, rtc_cntl::{get_reset_reason, get_wakeup_cause, sleep::TimerWakeupSource, Rtc, SocResetReason}, Cpu, }; @@ -19,7 +18,7 @@ use esp_println::println; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let delay = Delay::new(&clocks); let mut rtc = Rtc::new(peripherals.LPWR); diff --git a/examples/src/bin/sleep_timer_ext0.rs b/examples/src/bin/sleep_timer_ext0.rs index 7b9f62f1ae5..4fef91badb2 100644 --- a/examples/src/bin/sleep_timer_ext0.rs +++ b/examples/src/bin/sleep_timer_ext0.rs @@ -15,7 +15,6 @@ use esp_hal::{ delay::Delay, entry, gpio::Io, - prelude::*, rtc_cntl::{ get_reset_reason, get_wakeup_cause, @@ -29,7 +28,7 @@ use esp_println::println; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let mut rtc = Rtc::new(peripherals.LPWR); diff --git a/examples/src/bin/sleep_timer_ext1.rs b/examples/src/bin/sleep_timer_ext1.rs index 7add24dfa99..bf1c0f881bf 100644 --- a/examples/src/bin/sleep_timer_ext1.rs +++ b/examples/src/bin/sleep_timer_ext1.rs @@ -15,7 +15,6 @@ use esp_hal::{ delay::Delay, entry, gpio::{Io, RtcPin}, - prelude::*, rtc_cntl::{ get_reset_reason, get_wakeup_cause, @@ -29,7 +28,7 @@ use esp_println::println; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let mut rtc = Rtc::new(peripherals.LPWR); diff --git a/examples/src/bin/sleep_timer_lpio.rs b/examples/src/bin/sleep_timer_lpio.rs index 136f9d3b900..05f8a8e04f7 100644 --- a/examples/src/bin/sleep_timer_lpio.rs +++ b/examples/src/bin/sleep_timer_lpio.rs @@ -16,7 +16,6 @@ use esp_hal::{ delay::Delay, entry, gpio::{Io, RtcPinWithResistors}, - prelude::*, rtc_cntl::{ get_reset_reason, get_wakeup_cause, @@ -30,7 +29,7 @@ use esp_println::println; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let mut rtc = Rtc::new(peripherals.LPWR); diff --git a/examples/src/bin/sleep_timer_rtcio.rs b/examples/src/bin/sleep_timer_rtcio.rs index 47df5af827f..65045571a3c 100644 --- a/examples/src/bin/sleep_timer_rtcio.rs +++ b/examples/src/bin/sleep_timer_rtcio.rs @@ -34,7 +34,7 @@ use esp_println::println; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let mut io = Io::new(peripherals.GPIO, peripherals.IO_MUX); let mut rtc = Rtc::new(peripherals.LPWR); diff --git a/examples/src/bin/software_interrupts.rs b/examples/src/bin/software_interrupts.rs index a26eadd9392..48c1a88bc74 100644 --- a/examples/src/bin/software_interrupts.rs +++ b/examples/src/bin/software_interrupts.rs @@ -26,7 +26,7 @@ static SWINT3: Mutex>>> = Mutex::new(RefCell #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let mut sw_ints = SoftwareInterruptControl::new(peripherals.SW_INTERRUPT); diff --git a/examples/src/bin/spi_halfduplex_read_manufacturer_id.rs b/examples/src/bin/spi_halfduplex_read_manufacturer_id.rs index 3eba959f865..cd10f9a0cd4 100644 --- a/examples/src/bin/spi_halfduplex_read_manufacturer_id.rs +++ b/examples/src/bin/spi_halfduplex_read_manufacturer_id.rs @@ -42,7 +42,7 @@ use esp_println::println; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); cfg_if::cfg_if! { diff --git a/examples/src/bin/spi_loopback.rs b/examples/src/bin/spi_loopback.rs index aff017521b3..17248269422 100644 --- a/examples/src/bin/spi_loopback.rs +++ b/examples/src/bin/spi_loopback.rs @@ -29,7 +29,7 @@ use esp_println::println; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); let sclk = io.pins.gpio0; diff --git a/examples/src/bin/spi_loopback_dma.rs b/examples/src/bin/spi_loopback_dma.rs index 419d1ea46ff..b13dd875bb4 100644 --- a/examples/src/bin/spi_loopback_dma.rs +++ b/examples/src/bin/spi_loopback_dma.rs @@ -31,7 +31,7 @@ use esp_println::println; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); let sclk = io.pins.gpio0; diff --git a/examples/src/bin/spi_slave_dma.rs b/examples/src/bin/spi_slave_dma.rs index da583f91cd4..f821c49f168 100644 --- a/examples/src/bin/spi_slave_dma.rs +++ b/examples/src/bin/spi_slave_dma.rs @@ -45,7 +45,7 @@ use esp_println::println; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); let slave_sclk = io.pins.gpio0; diff --git a/examples/src/bin/systimer.rs b/examples/src/bin/systimer.rs index 508ea7e98e6..72d1931ef9c 100644 --- a/examples/src/bin/systimer.rs +++ b/examples/src/bin/systimer.rs @@ -47,7 +47,7 @@ static ALARM2: Mutex< #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let systimer = SystemTimer::new(peripherals.SYSTIMER); println!("SYSTIMER Current value = {}", SystemTimer::now()); diff --git a/examples/src/bin/timer_interrupt.rs b/examples/src/bin/timer_interrupt.rs index 1126ba58a4e..aec50184183 100644 --- a/examples/src/bin/timer_interrupt.rs +++ b/examples/src/bin/timer_interrupt.rs @@ -23,7 +23,7 @@ static TIMER0: Mutex, esp_hal::Blocking>>>> = #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let timg0 = TimerGroup::new(peripherals.TIMG0, &clocks); let timer0 = timg0.timer0; diff --git a/examples/src/bin/touch.rs b/examples/src/bin/touch.rs index 88c15097ded..eef73f705d0 100644 --- a/examples/src/bin/touch.rs +++ b/examples/src/bin/touch.rs @@ -48,7 +48,7 @@ fn interrupt_handler() { #[entry] fn main() -> ! { esp_println::logger::init_logger_from_env(); - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/examples/src/bin/twai.rs b/examples/src/bin/twai.rs index 380cbf63192..9620ae508dc 100644 --- a/examples/src/bin/twai.rs +++ b/examples/src/bin/twai.rs @@ -35,7 +35,7 @@ use nb::block; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/examples/src/bin/ulp_riscv_core_basic.rs b/examples/src/bin/ulp_riscv_core_basic.rs index 77e89ae8c23..dcdac147257 100644 --- a/examples/src/bin/ulp_riscv_core_basic.rs +++ b/examples/src/bin/ulp_riscv_core_basic.rs @@ -21,7 +21,7 @@ use esp_println::{print, println}; #[entry] fn main() -> ! { - let (peripherals, _clocks) = esp_hal::init(Config::default()); + let (peripherals, _clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); let pin = LowPowerOutput::new(io.pins.gpio1); diff --git a/examples/src/bin/usb_serial.rs b/examples/src/bin/usb_serial.rs index 96d8fad6d15..236d5a10bb2 100644 --- a/examples/src/bin/usb_serial.rs +++ b/examples/src/bin/usb_serial.rs @@ -26,7 +26,7 @@ static mut EP_MEMORY: [u32; 1024] = [0; 1024]; #[entry] fn main() -> ! { - let (peripherals, _clocks) = esp_hal::init(Config::default()); + let (peripherals, _clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/examples/src/bin/usb_serial_jtag.rs b/examples/src/bin/usb_serial_jtag.rs index 2b81ba5492c..a75d0dd486b 100644 --- a/examples/src/bin/usb_serial_jtag.rs +++ b/examples/src/bin/usb_serial_jtag.rs @@ -23,7 +23,7 @@ static USB_SERIAL: Mutex>>> = #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let delay = Delay::new(&clocks); diff --git a/examples/src/bin/watchdog.rs b/examples/src/bin/watchdog.rs index 78cd2c252c6..220e9ad4abf 100644 --- a/examples/src/bin/watchdog.rs +++ b/examples/src/bin/watchdog.rs @@ -14,7 +14,7 @@ use esp_println::println; #[entry] fn main() -> ! { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let delay = Delay::new(&clocks); diff --git a/examples/src/bin/wifi_80211_tx.rs b/examples/src/bin/wifi_80211_tx.rs index b129f288641..90c95060055 100644 --- a/examples/src/bin/wifi_80211_tx.rs +++ b/examples/src/bin/wifi_80211_tx.rs @@ -35,7 +35,7 @@ const MAC_ADDRESS: [u8; 6] = [0x00, 0x80, 0x41, 0x13, 0x37, 0x42]; fn main() -> ! { esp_println::logger::init_logger_from_env(); let (peripherals, clocks) = esp_hal::init({ - let mut config = Config::default(); + let mut config = esp_hal::Config::default(); config.cpu_clock = CpuClock::max(); config }); diff --git a/examples/src/bin/wifi_access_point.rs b/examples/src/bin/wifi_access_point.rs index b79f2dcf54b..e1e01ec525d 100644 --- a/examples/src/bin/wifi_access_point.rs +++ b/examples/src/bin/wifi_access_point.rs @@ -35,7 +35,7 @@ use smoltcp::iface::SocketStorage; fn main() -> ! { esp_println::logger::init_logger_from_env(); let (peripherals, clocks) = esp_hal::init({ - let mut config = Config::default(); + let mut config = esp_hal::Config::default(); config.cpu_clock = CpuClock::max(); config }); diff --git a/examples/src/bin/wifi_access_point_with_sta.rs b/examples/src/bin/wifi_access_point_with_sta.rs index 69005fd16eb..f58349849e6 100644 --- a/examples/src/bin/wifi_access_point_with_sta.rs +++ b/examples/src/bin/wifi_access_point_with_sta.rs @@ -42,7 +42,7 @@ const PASSWORD: &str = env!("PASSWORD"); fn main() -> ! { esp_println::logger::init_logger(log::LevelFilter::Info); let (peripherals, clocks) = esp_hal::init({ - let mut config = Config::default(); + let mut config = esp_hal::Config::default(); config.cpu_clock = CpuClock::max(); config }); diff --git a/examples/src/bin/wifi_bench.rs b/examples/src/bin/wifi_bench.rs index b2ebbad932b..844f291a066 100644 --- a/examples/src/bin/wifi_bench.rs +++ b/examples/src/bin/wifi_bench.rs @@ -52,7 +52,7 @@ const UPLOAD_DOWNLOAD_PORT: u16 = 4323; fn main() -> ! { esp_println::logger::init_logger_from_env(); let (peripherals, clocks) = esp_hal::init({ - let mut config = Config::default(); + let mut config = esp_hal::Config::default(); config.cpu_clock = CpuClock::max(); config }); diff --git a/examples/src/bin/wifi_ble.rs b/examples/src/bin/wifi_ble.rs index 105034d8192..c71bdb0ec6f 100644 --- a/examples/src/bin/wifi_ble.rs +++ b/examples/src/bin/wifi_ble.rs @@ -36,7 +36,7 @@ use esp_wifi::{ble::controller::BleConnector, initialize, EspWifiInitFor}; fn main() -> ! { esp_println::logger::init_logger_from_env(); let (peripherals, clocks) = esp_hal::init({ - let mut config = Config::default(); + let mut config = esp_hal::Config::default(); config.cpu_clock = CpuClock::max(); config }); diff --git a/examples/src/bin/wifi_coex.rs b/examples/src/bin/wifi_coex.rs index a62eec72c79..0bd4a4549f7 100644 --- a/examples/src/bin/wifi_coex.rs +++ b/examples/src/bin/wifi_coex.rs @@ -48,7 +48,7 @@ const PASSWORD: &str = env!("PASSWORD"); fn main() -> ! { esp_println::logger::init_logger_from_env(); let (peripherals, clocks) = esp_hal::init({ - let mut config = Config::default(); + let mut config = esp_hal::Config::default(); config.cpu_clock = CpuClock::max(); config }); diff --git a/examples/src/bin/wifi_dhcp.rs b/examples/src/bin/wifi_dhcp.rs index 1819d551048..a02b52dd2b7 100644 --- a/examples/src/bin/wifi_dhcp.rs +++ b/examples/src/bin/wifi_dhcp.rs @@ -41,7 +41,7 @@ const PASSWORD: &str = env!("PASSWORD"); fn main() -> ! { esp_println::logger::init_logger_from_env(); let (peripherals, clocks) = esp_hal::init({ - let mut config = Config::default(); + let mut config = esp_hal::Config::default(); config.cpu_clock = CpuClock::max(); config }); diff --git a/examples/src/bin/wifi_embassy_access_point.rs b/examples/src/bin/wifi_embassy_access_point.rs index 4cda2e8cc98..22e65a8e5bc 100644 --- a/examples/src/bin/wifi_embassy_access_point.rs +++ b/examples/src/bin/wifi_embassy_access_point.rs @@ -56,7 +56,7 @@ macro_rules! mk_static { async fn main(spawner: Spawner) -> ! { esp_println::logger::init_logger_from_env(); let (peripherals, clocks) = esp_hal::init({ - let mut config = Config::default(); + let mut config = esp_hal::Config::default(); config.cpu_clock = CpuClock::max(); config }); 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 4524aa76368..42d2d2e43e9 100644 --- a/examples/src/bin/wifi_embassy_access_point_with_sta.rs +++ b/examples/src/bin/wifi_embassy_access_point_with_sta.rs @@ -64,7 +64,7 @@ macro_rules! mk_static { async fn main(spawner: Spawner) -> ! { esp_println::logger::init_logger_from_env(); let (peripherals, clocks) = esp_hal::init({ - let mut config = Config::default(); + let mut config = esp_hal::Config::default(); config.cpu_clock = CpuClock::max(); config }); diff --git a/examples/src/bin/wifi_embassy_bench.rs b/examples/src/bin/wifi_embassy_bench.rs index 661e5f7eb83..5a53e8fd4f9 100644 --- a/examples/src/bin/wifi_embassy_bench.rs +++ b/examples/src/bin/wifi_embassy_bench.rs @@ -67,7 +67,7 @@ static mut TX_BUFFER: [u8; TX_BUFFER_SIZE] = [0; TX_BUFFER_SIZE]; async fn main(spawner: Spawner) -> ! { esp_println::logger::init_logger_from_env(); let (peripherals, clocks) = esp_hal::init({ - let mut config = Config::default(); + let mut config = esp_hal::Config::default(); config.cpu_clock = CpuClock::max(); config }); diff --git a/examples/src/bin/wifi_embassy_ble.rs b/examples/src/bin/wifi_embassy_ble.rs index 52dc06c4446..282d6e6a17b 100644 --- a/examples/src/bin/wifi_embassy_ble.rs +++ b/examples/src/bin/wifi_embassy_ble.rs @@ -39,7 +39,7 @@ use esp_wifi::{ble::controller::asynch::BleConnector, initialize, EspWifiInitFor async fn main(_spawner: Spawner) -> ! { esp_println::logger::init_logger_from_env(); let (peripherals, clocks) = esp_hal::init({ - let mut config = Config::default(); + let mut config = esp_hal::Config::default(); config.cpu_clock = CpuClock::max(); config }); diff --git a/examples/src/bin/wifi_embassy_dhcp.rs b/examples/src/bin/wifi_embassy_dhcp.rs index dfc3cc072c4..96d17d926fb 100644 --- a/examples/src/bin/wifi_embassy_dhcp.rs +++ b/examples/src/bin/wifi_embassy_dhcp.rs @@ -50,7 +50,7 @@ const PASSWORD: &str = env!("PASSWORD"); async fn main(spawner: Spawner) -> ! { esp_println::logger::init_logger_from_env(); let (peripherals, clocks) = esp_hal::init({ - let mut config = Config::default(); + let mut config = esp_hal::Config::default(); config.cpu_clock = CpuClock::max(); config }); diff --git a/examples/src/bin/wifi_embassy_esp_now.rs b/examples/src/bin/wifi_embassy_esp_now.rs index 743c4b66587..d14d95e0d95 100644 --- a/examples/src/bin/wifi_embassy_esp_now.rs +++ b/examples/src/bin/wifi_embassy_esp_now.rs @@ -26,7 +26,7 @@ use esp_wifi::{ async fn main(_spawner: Spawner) -> ! { esp_println::logger::init_logger_from_env(); let (peripherals, clocks) = esp_hal::init({ - let mut config = Config::default(); + let mut config = esp_hal::Config::default(); config.cpu_clock = CpuClock::max(); config }); diff --git a/examples/src/bin/wifi_embassy_esp_now_duplex.rs b/examples/src/bin/wifi_embassy_esp_now_duplex.rs index f994e26a7f4..773389ac155 100644 --- a/examples/src/bin/wifi_embassy_esp_now_duplex.rs +++ b/examples/src/bin/wifi_embassy_esp_now_duplex.rs @@ -36,7 +36,7 @@ macro_rules! mk_static { async fn main(spawner: Spawner) -> ! { esp_println::logger::init_logger_from_env(); let (peripherals, clocks) = esp_hal::init({ - let mut config = Config::default(); + let mut config = esp_hal::Config::default(); config.cpu_clock = CpuClock::max(); config }); diff --git a/examples/src/bin/wifi_esp_now.rs b/examples/src/bin/wifi_esp_now.rs index ae3f8b8c12a..938068aaf95 100644 --- a/examples/src/bin/wifi_esp_now.rs +++ b/examples/src/bin/wifi_esp_now.rs @@ -22,7 +22,7 @@ use esp_wifi::{ fn main() -> ! { esp_println::logger::init_logger_from_env(); let (peripherals, clocks) = esp_hal::init({ - let mut config = Config::default(); + let mut config = esp_hal::Config::default(); config.cpu_clock = CpuClock::max(); config }); diff --git a/examples/src/bin/wifi_sniffer.rs b/examples/src/bin/wifi_sniffer.rs index f9d81b19e21..2f277af11a0 100644 --- a/examples/src/bin/wifi_sniffer.rs +++ b/examples/src/bin/wifi_sniffer.rs @@ -34,7 +34,7 @@ static KNOWN_SSIDS: Mutex>> = Mutex::new(RefCell::new(B fn main() -> ! { esp_println::logger::init_logger_from_env(); let (peripherals, clocks) = esp_hal::init({ - let mut config = Config::default(); + let mut config = esp_hal::Config::default(); config.cpu_clock = CpuClock::max(); config }); diff --git a/examples/src/bin/wifi_static_ip.rs b/examples/src/bin/wifi_static_ip.rs index 917043e915d..2c82dcea886 100644 --- a/examples/src/bin/wifi_static_ip.rs +++ b/examples/src/bin/wifi_static_ip.rs @@ -41,7 +41,7 @@ const GATEWAY_IP: &str = env!("GATEWAY_IP"); fn main() -> ! { esp_println::logger::init_logger_from_env(); let (peripherals, clocks) = esp_hal::init({ - let mut config = Config::default(); + let mut config = esp_hal::Config::default(); config.cpu_clock = CpuClock::max(); config }); diff --git a/hil-test/tests/aes.rs b/hil-test/tests/aes.rs index 00cfcdbedb2..7e9c694884e 100644 --- a/hil-test/tests/aes.rs +++ b/hil-test/tests/aes.rs @@ -25,7 +25,7 @@ mod tests { #[init] fn init() -> Context<'static> { let (peripherals, _clocks) = esp_hal::init({ - let mut config = Config::default(); + let mut config = esp_hal::Config::default(); config.cpu_clock = CpuClock::max(); config }); diff --git a/hil-test/tests/aes_dma.rs b/hil-test/tests/aes_dma.rs index 2bc940a9899..d3dccfe0ac5 100644 --- a/hil-test/tests/aes_dma.rs +++ b/hil-test/tests/aes_dma.rs @@ -29,7 +29,7 @@ mod tests { #[init] fn init() -> Peripherals { - let (peripherals, _clocks) = esp_hal::init(Config::default()); + let (peripherals, _clocks) = esp_hal::init(esp_hal::Config::default()); peripherals } diff --git a/hil-test/tests/clock_monitor.rs b/hil-test/tests/clock_monitor.rs index de3a94bdc72..724d9165459 100644 --- a/hil-test/tests/clock_monitor.rs +++ b/hil-test/tests/clock_monitor.rs @@ -5,7 +5,7 @@ #![no_std] #![no_main] -use esp_hal::{prelude::*, rtc_cntl::Rtc}; +use esp_hal::rtc_cntl::Rtc; use hil_test as _; struct Context<'a> { @@ -19,7 +19,7 @@ mod tests { #[init] fn init() -> Context<'static> { - let (peripherals, _clocks) = esp_hal::init(Config::default()); + let (peripherals, _clocks) = esp_hal::init(esp_hal::Config::default()); let rtc = Rtc::new(peripherals.LPWR); Context { rtc } diff --git a/hil-test/tests/delay.rs b/hil-test/tests/delay.rs index 8058574f2cb..f171263dc6b 100644 --- a/hil-test/tests/delay.rs +++ b/hil-test/tests/delay.rs @@ -6,7 +6,7 @@ #![no_main] use embedded_hal::delay::DelayNs; -use esp_hal::{delay::Delay, prelude::*}; +use esp_hal::delay::Delay; use hil_test as _; struct Context { @@ -20,7 +20,7 @@ mod tests { #[init] fn init() -> Context { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (_peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let delay = Delay::new(&clocks); Context { delay } diff --git a/hil-test/tests/dma_mem2mem.rs b/hil-test/tests/dma_mem2mem.rs index 14878ac4685..45e9c9ebcae 100644 --- a/hil-test/tests/dma_mem2mem.rs +++ b/hil-test/tests/dma_mem2mem.rs @@ -10,7 +10,6 @@ use esp_hal::{ dma_buffers, dma_buffers_chunk_size, dma_descriptors, - prelude::*, Blocking, }; use hil_test as _; @@ -39,7 +38,7 @@ mod tests { #[init] fn init() -> Context { - let (peripherals, _clocks) = esp_hal::init(Config::default()); + let (peripherals, _clocks) = esp_hal::init(esp_hal::Config::default()); let dma = Dma::new(peripherals.DMA); let channel = dma.channel0.configure(false, DmaPriority::Priority0); diff --git a/hil-test/tests/ecc.rs b/hil-test/tests/ecc.rs index c1b294cc135..5400ba84147 100644 --- a/hil-test/tests/ecc.rs +++ b/hil-test/tests/ecc.rs @@ -57,7 +57,7 @@ mod tests { #[init] fn init() -> Context<'static> { let (peripherals, _clocks) = esp_hal::init({ - let mut config = Config::default(); + let mut config = esp_hal::Config::default(); config.cpu_clock = CpuClock::max(); config }); diff --git a/hil-test/tests/embassy_interrupt_executor.rs b/hil-test/tests/embassy_interrupt_executor.rs index 117f78ca784..67e4f8107ee 100644 --- a/hil-test/tests/embassy_interrupt_executor.rs +++ b/hil-test/tests/embassy_interrupt_executor.rs @@ -14,7 +14,6 @@ use esp_hal::{ software::{SoftwareInterrupt, SoftwareInterruptControl}, Priority, }, - prelude::*, timer::timg::TimerGroup, }; use esp_hal_embassy::InterruptExecutor; @@ -45,7 +44,7 @@ mod test { #[init] fn init() -> SoftwareInterrupt<1> { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let timg0 = TimerGroup::new(peripherals.TIMG0, &clocks); esp_hal_embassy::init(&clocks, timg0.timer0); diff --git a/hil-test/tests/embassy_timers_executors.rs b/hil-test/tests/embassy_timers_executors.rs index 589a52a174e..7627b15a4f2 100644 --- a/hil-test/tests/embassy_timers_executors.rs +++ b/hil-test/tests/embassy_timers_executors.rs @@ -128,7 +128,7 @@ mod test { #[init] fn init() -> (Peripherals, Clocks<'static>) { - esp_hal::init(Config::default()) + esp_hal::init(esp_hal::Config::default()) } #[test] diff --git a/hil-test/tests/get_time.rs b/hil-test/tests/get_time.rs index ed71ea17c0a..6f34c6dd6eb 100644 --- a/hil-test/tests/get_time.rs +++ b/hil-test/tests/get_time.rs @@ -7,7 +7,7 @@ #[cfg(esp32)] use esp_hal::clock::Clocks; -use esp_hal::{delay::Delay, prelude::*}; +use esp_hal::delay::Delay; use hil_test as _; struct Context { @@ -31,7 +31,7 @@ mod tests { #[init] fn init() -> Context { - let (_peripherals, clocks) = esp_hal::init(Config::default()); + let (_peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let delay = Delay::new(&clocks); diff --git a/hil-test/tests/gpio.rs b/hil-test/tests/gpio.rs index bbc97fbafd8..f8f5325fede 100644 --- a/hil-test/tests/gpio.rs +++ b/hil-test/tests/gpio.rs @@ -1,8 +1,8 @@ //! GPIO Test //! //! Folowing pins are used: -//! - GPIO2 -//! - GPIO3 +//! GPIO2 +//! GPIO3 //% CHIPS: esp32 esp32c2 esp32c3 esp32c6 esp32h2 esp32s2 esp32s3 //% FEATURES: generic-queue @@ -17,7 +17,6 @@ use esp_hal::{ delay::Delay, gpio::{AnyPin, Gpio2, Gpio3, GpioPin, Input, Io, Level, Output, Pull}, macros::handler, - prelude::*, timer::timg::TimerGroup, InterruptConfigurable, }; @@ -55,7 +54,7 @@ mod tests { #[init] fn init() -> Context<'static> { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let mut io = Io::new(peripherals.GPIO, peripherals.IO_MUX); io.set_interrupt_handler(interrupt_handler); diff --git a/hil-test/tests/i2s.rs b/hil-test/tests/i2s.rs index 97a74e80e05..219eb91dcbb 100644 --- a/hil-test/tests/i2s.rs +++ b/hil-test/tests/i2s.rs @@ -53,7 +53,7 @@ mod tests { #[test] fn test_i2s_loopback() { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let peripherals = peripherals; let clocks = clocks; diff --git a/hil-test/tests/i2s_async.rs b/hil-test/tests/i2s_async.rs index 4aedc47e817..7a9aa0a5ffc 100644 --- a/hil-test/tests/i2s_async.rs +++ b/hil-test/tests/i2s_async.rs @@ -85,7 +85,7 @@ mod tests { async fn test_i2s_loopback() { let spawner = embassy_executor::Spawner::for_current_executor().await; - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let peripherals = peripherals; let clocks = clocks; diff --git a/hil-test/tests/interrupt.rs b/hil-test/tests/interrupt.rs index ea0173d9492..8f6d63ea618 100644 --- a/hil-test/tests/interrupt.rs +++ b/hil-test/tests/interrupt.rs @@ -65,7 +65,7 @@ mod tests { #[init] fn init() -> Context { let (peripherals, _clocks) = esp_hal::init({ - let mut config = Config::default(); + let mut config = esp_hal::Config::default(); config.cpu_clock = CpuClock::max(); config }); diff --git a/hil-test/tests/lcd_cam_i8080.rs b/hil-test/tests/lcd_cam_i8080.rs index 189b667e1a7..4237335deb1 100644 --- a/hil-test/tests/lcd_cam_i8080.rs +++ b/hil-test/tests/lcd_cam_i8080.rs @@ -11,7 +11,7 @@ use esp_hal::{ dma_buffers, gpio::DummyPin, lcd_cam::{ - lcd::i8080::{self, Command, TxEightBits, I8080}, + lcd::i8080::{Command, Config, TxEightBits, I8080}, LcdCam, }, prelude::*, @@ -35,7 +35,7 @@ mod tests { #[init] fn init() -> Context<'static> { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let dma = Dma::new(peripherals.DMA); let lcd_cam = LcdCam::new(peripherals.LCD_CAM); let (tx_buffer, tx_descriptors, _, _) = dma_buffers!(DATA_SIZE, 0); @@ -70,7 +70,7 @@ mod tests { ctx.tx_descriptors, pins, 20.MHz(), - i8080::Config::default(), + Config::default(), &ctx.clocks, ); @@ -103,7 +103,7 @@ mod tests { ctx.tx_descriptors, pins, 20.MHz(), - i8080::Config::default(), + Config::default(), &ctx.clocks, ); diff --git a/hil-test/tests/lcd_cam_i8080_async.rs b/hil-test/tests/lcd_cam_i8080_async.rs index 0114857bf94..a5b2c9ef487 100644 --- a/hil-test/tests/lcd_cam_i8080_async.rs +++ b/hil-test/tests/lcd_cam_i8080_async.rs @@ -12,10 +12,7 @@ use esp_hal::{ dma_buffers, gpio::DummyPin, lcd_cam::{ - lcd::{ - i8080, - i8080::{Command, TxEightBits, I8080}, - }, + lcd::i8080::{Command, Config, TxEightBits, I8080}, LcdCam, }, prelude::*, @@ -39,7 +36,7 @@ mod tests { #[init] async fn init() -> Context<'static> { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let dma = Dma::new(peripherals.DMA); let lcd_cam = LcdCam::new_async(peripherals.LCD_CAM); @@ -74,7 +71,7 @@ mod tests { ctx.tx_descriptors, pins, 20.MHz(), - i8080::Config::default(), + Config::default(), &ctx.clocks, ); @@ -107,7 +104,7 @@ mod tests { ctx.tx_descriptors, pins, 20.MHz(), - i8080::Config::default(), + Config::default(), &ctx.clocks, ); diff --git a/hil-test/tests/pcnt.rs b/hil-test/tests/pcnt.rs index 8c07f5ca3d4..dbf806c17f3 100644 --- a/hil-test/tests/pcnt.rs +++ b/hil-test/tests/pcnt.rs @@ -14,7 +14,6 @@ use esp_hal::{ channel::{EdgeMode, PcntInputConfig, PcntSource}, Pcnt, }, - prelude::*, }; use hil_test as _; @@ -32,7 +31,7 @@ mod tests { #[init] fn init() -> Context<'static> { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/hil-test/tests/qspi_read.rs b/hil-test/tests/qspi_read.rs index cae18ef39f7..6abeab451db 100644 --- a/hil-test/tests/qspi_read.rs +++ b/hil-test/tests/qspi_read.rs @@ -13,11 +13,10 @@ #![no_main] use esp_hal::{ - clock::{ClockControl, Clocks}, + clock::Clocks, dma::{Channel, Dma, DmaPriority, DmaRxBuf}, dma_buffers, gpio::{GpioPin, Io, Level, Output}, - peripherals::Peripherals, prelude::*, spi::{ master::{Address, Command, Spi, SpiDma}, @@ -25,7 +24,6 @@ use esp_hal::{ SpiDataMode, SpiMode, }, - system::SystemControl, Blocking, }; use hil_test as _; @@ -101,9 +99,7 @@ mod tests { #[init] fn init() -> Context { - let peripherals = Peripherals::take(); - let system = SystemControl::new(peripherals.SYSTEM); - let clocks = ClockControl::boot_defaults(system.clock_control).freeze(); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); let miso = io.pins.gpio2; diff --git a/hil-test/tests/qspi_write.rs b/hil-test/tests/qspi_write.rs index 70a35d411de..bc2b01f9273 100644 --- a/hil-test/tests/qspi_write.rs +++ b/hil-test/tests/qspi_write.rs @@ -15,7 +15,7 @@ #![no_main] use esp_hal::{ - clock::{ClockControl, Clocks}, + clock::Clocks, dma::{Channel, Dma, DmaPriority, DmaTxBuf}, dma_buffers, gpio::{Io, Pull}, @@ -24,7 +24,6 @@ use esp_hal::{ unit::Unit, Pcnt, }, - peripherals::Peripherals, prelude::*, spi::{ master::{Address, Command, Spi, SpiDma}, @@ -32,7 +31,6 @@ use esp_hal::{ SpiDataMode, SpiMode, }, - system::SystemControl, Blocking, }; use hil_test as _; @@ -112,9 +110,7 @@ mod tests { #[init] fn init() -> Context { - let peripherals = Peripherals::take(); - let system = SystemControl::new(peripherals.SYSTEM); - let clocks = ClockControl::boot_defaults(system.clock_control).freeze(); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); let mosi = io.pins.gpio2; diff --git a/hil-test/tests/qspi_write_read.rs b/hil-test/tests/qspi_write_read.rs index 4d98c7b9519..602a6a964f3 100644 --- a/hil-test/tests/qspi_write_read.rs +++ b/hil-test/tests/qspi_write_read.rs @@ -15,11 +15,10 @@ #![no_main] use esp_hal::{ - clock::{ClockControl, Clocks}, + clock::Clocks, dma::{Channel, Dma, DmaPriority, DmaRxBuf, DmaTxBuf}, dma_buffers, gpio::{GpioPin, Io, Level, Output}, - peripherals::Peripherals, prelude::*, spi::{ master::{Address, Command, Spi, SpiDma}, @@ -27,7 +26,6 @@ use esp_hal::{ SpiDataMode, SpiMode, }, - system::SystemControl, Blocking, }; use hil_test as _; @@ -103,9 +101,7 @@ mod tests { #[init] fn init() -> Context { - let peripherals = Peripherals::take(); - let system = SystemControl::new(peripherals.SYSTEM); - let clocks = ClockControl::boot_defaults(system.clock_control).freeze(); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); let mosi = io.pins.gpio2; diff --git a/hil-test/tests/rmt.rs b/hil-test/tests/rmt.rs index 5948a253214..722444a348a 100644 --- a/hil-test/tests/rmt.rs +++ b/hil-test/tests/rmt.rs @@ -25,7 +25,7 @@ mod tests { #[test] #[timeout(1)] fn rmt_loopback() { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/hil-test/tests/rsa.rs b/hil-test/tests/rsa.rs index 2cd431ea4f2..389fc01df31 100644 --- a/hil-test/tests/rsa.rs +++ b/hil-test/tests/rsa.rs @@ -57,7 +57,7 @@ mod tests { #[init] fn init() -> Context<'static> { - let (peripherals, _clocks) = esp_hal::init(Config::default()); + let (peripherals, _clocks) = esp_hal::init(esp_hal::Config::default()); let mut rsa = Rsa::new(peripherals.RSA); nb::block!(rsa.ready()).unwrap(); diff --git a/hil-test/tests/sha.rs b/hil-test/tests/sha.rs index 91278c5d0ef..adc7acc9190 100644 --- a/hil-test/tests/sha.rs +++ b/hil-test/tests/sha.rs @@ -166,9 +166,9 @@ mod tests { cfg_if::cfg_if! { if #[cfg(feature = "esp32")] { // FIXME: max speed fails...? - let config = Config::default(); + let config = esp_hal::Config::default(); } else { - let mut config = Config::default(); + let mut config = esp_hal::Config::default(); config.cpu_clock = CpuClock::max(); } } diff --git a/hil-test/tests/spi_full_duplex.rs b/hil-test/tests/spi_full_duplex.rs index fa14ea2b926..e38ba9833b0 100644 --- a/hil-test/tests/spi_full_duplex.rs +++ b/hil-test/tests/spi_full_duplex.rs @@ -34,7 +34,7 @@ mod tests { #[init] fn init() -> Context { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); let sclk = io.pins.gpio0; diff --git a/hil-test/tests/spi_full_duplex_dma.rs b/hil-test/tests/spi_full_duplex_dma.rs index 0081267a0cf..e1ef46c05ef 100644 --- a/hil-test/tests/spi_full_duplex_dma.rs +++ b/hil-test/tests/spi_full_duplex_dma.rs @@ -14,7 +14,6 @@ #![no_main] use esp_hal::{ - clock::Clocks, dma::{Dma, DmaPriority, DmaRxBuf, DmaTxBuf}, dma_buffers, gpio::Io, @@ -48,13 +47,12 @@ struct Context { #[embedded_test::tests] mod tests { use defmt::assert_eq; - use esp_hal::dma::{DmaRxBuf, DmaTxBuf}; use super::*; #[init] fn init() -> Context { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); let sclk = io.pins.gpio0; diff --git a/hil-test/tests/spi_full_duplex_dma_async.rs b/hil-test/tests/spi_full_duplex_dma_async.rs index 7159e8a7726..674ac477e7e 100644 --- a/hil-test/tests/spi_full_duplex_dma_async.rs +++ b/hil-test/tests/spi_full_duplex_dma_async.rs @@ -70,7 +70,7 @@ mod tests { #[init] fn init() -> Context { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); let pcnt = Pcnt::new(peripherals.PCNT); diff --git a/hil-test/tests/spi_full_duplex_dma_pcnt.rs b/hil-test/tests/spi_full_duplex_dma_pcnt.rs index 6fb816a0efc..0581e8e5746 100644 --- a/hil-test/tests/spi_full_duplex_dma_pcnt.rs +++ b/hil-test/tests/spi_full_duplex_dma_pcnt.rs @@ -64,7 +64,7 @@ mod tests { #[init] fn init() -> Context { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); let sclk = io.pins.gpio0; diff --git a/hil-test/tests/spi_half_duplex_read.rs b/hil-test/tests/spi_half_duplex_read.rs index 6d036f1f540..b8892c79dd2 100644 --- a/hil-test/tests/spi_half_duplex_read.rs +++ b/hil-test/tests/spi_half_duplex_read.rs @@ -54,7 +54,7 @@ mod tests { #[init] fn init() -> Context { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); let sclk = io.pins.gpio0; diff --git a/hil-test/tests/spi_half_duplex_write.rs b/hil-test/tests/spi_half_duplex_write.rs index 2185b252eaa..5d21e0297bd 100644 --- a/hil-test/tests/spi_half_duplex_write.rs +++ b/hil-test/tests/spi_half_duplex_write.rs @@ -63,7 +63,7 @@ mod tests { #[init] fn init() -> Context { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); let sclk = io.pins.gpio0; diff --git a/hil-test/tests/systimer.rs b/hil-test/tests/systimer.rs index 6dd3b95d1c0..ffaf473814f 100644 --- a/hil-test/tests/systimer.rs +++ b/hil-test/tests/systimer.rs @@ -104,7 +104,7 @@ mod tests { #[init] fn init() -> Context { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let systimer = SystemTimer::new(peripherals.SYSTIMER); static UNIT0: StaticCell> = StaticCell::new(); diff --git a/hil-test/tests/twai.rs b/hil-test/tests/twai.rs index 79b1aa9ac11..fe193c60255 100644 --- a/hil-test/tests/twai.rs +++ b/hil-test/tests/twai.rs @@ -35,7 +35,7 @@ mod tests { #[init] fn init() -> Context { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/hil-test/tests/uart.rs b/hil-test/tests/uart.rs index ce54367bda8..f5e0e4e4f1d 100644 --- a/hil-test/tests/uart.rs +++ b/hil-test/tests/uart.rs @@ -37,7 +37,7 @@ mod tests { #[init] fn init() -> Context { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/hil-test/tests/uart_async.rs b/hil-test/tests/uart_async.rs index e7fd7f12073..8a5ef5b4cb7 100644 --- a/hil-test/tests/uart_async.rs +++ b/hil-test/tests/uart_async.rs @@ -12,7 +12,7 @@ #![no_std] #![no_main] -use esp_hal::{gpio::Io, peripherals::UART0, prelude::*, uart::Uart, Async}; +use esp_hal::{gpio::Io, peripherals::UART0, uart::Uart, Async}; use hil_test as _; struct Context { @@ -28,7 +28,7 @@ mod tests { #[init] async fn init() -> Context { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/hil-test/tests/uart_tx_rx.rs b/hil-test/tests/uart_tx_rx.rs index ff0c599d173..a6ce3a7825c 100644 --- a/hil-test/tests/uart_tx_rx.rs +++ b/hil-test/tests/uart_tx_rx.rs @@ -35,7 +35,7 @@ mod tests { #[init] fn init() -> Context { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/hil-test/tests/uart_tx_rx_async.rs b/hil-test/tests/uart_tx_rx_async.rs index c92fa8090ef..0209a58a06d 100644 --- a/hil-test/tests/uart_tx_rx_async.rs +++ b/hil-test/tests/uart_tx_rx_async.rs @@ -15,7 +15,6 @@ use esp_hal::{ gpio::Io, peripherals::{UART0, UART1}, - prelude::*, uart::{UartRx, UartTx}, Async, }; @@ -35,7 +34,7 @@ mod tests { #[init] async fn init() -> Context { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let io = Io::new(peripherals.GPIO, peripherals.IO_MUX); diff --git a/hil-test/tests/usb_serial_jtag.rs b/hil-test/tests/usb_serial_jtag.rs index 854e65e4cb0..7e2216221a0 100644 --- a/hil-test/tests/usb_serial_jtag.rs +++ b/hil-test/tests/usb_serial_jtag.rs @@ -8,12 +8,12 @@ #[cfg(test)] #[embedded_test::tests] mod tests { - use esp_hal::{prelude::*, timer::timg::TimerGroup, usb_serial_jtag::UsbSerialJtag}; + use esp_hal::{timer::timg::TimerGroup, usb_serial_jtag::UsbSerialJtag}; use hil_test as _; #[test] fn creating_peripheral_does_not_break_debug_connection() { - let (peripherals, clocks) = esp_hal::init(Config::default()); + let (peripherals, clocks) = esp_hal::init(esp_hal::Config::default()); let timg0 = TimerGroup::new(peripherals.TIMG0, &clocks); esp_hal_embassy::init(&clocks, timg0.timer0);