Skip to content

Commit

Permalink
Fixes after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
MabezDev committed Dec 12, 2022
1 parent 080f4ae commit 3b515b7
Show file tree
Hide file tree
Showing 35 changed files with 43 additions and 43 deletions.
4 changes: 2 additions & 2 deletions esp-hal-common/src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub use crate::{
},
},
macros::*,
serial::{Instance as _esp_hal_serial_Instance, UartPins as _esp_hal_serial_UartPins},
uart::{Instance as _esp_hal_uart_Instance, UartPins as _esp_hal_uart_UartPins},
spi::{
dma::WithDmaSpi2 as _esp_hal_spi_dma_WithDmaSpi2,
Instance as _esp_hal_spi_Instance,
Expand Down Expand Up @@ -132,7 +132,7 @@ pub mod eh1 {
},
},
macros::*,
serial::{Instance as _esp_hal_serial_Instance, UartPins as _esp_hal_serial_UartPins},
uart::{Instance as _esp_hal_serial_Instance, UartPins as _esp_hal_serial_UartPins},
spi::{
dma::WithDmaSpi2 as _esp_hal_spi_dma_WithDmaSpi2,
Instance as _esp_hal_spi_Instance,
Expand Down
2 changes: 1 addition & 1 deletion esp-hal-common/src/pulse_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
//!
//! ### Example (for ESP32-C3)
//! ```
//! let mut peripherals = pac::Peripherals::take().unwrap();
//! let mut peripherals = peripherals::Peripherals::take().unwrap();
//!
//! // Configure RMT peripheral globally
//! let pulse = PulseControl::new(
Expand Down
2 changes: 1 addition & 1 deletion esp32-hal/examples/embassy_hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use esp32_hal::{
clock::ClockControl,
prelude::*,
timer::TimerGroup,
Rtc, embassy, pac::Peripherals,
Rtc, embassy, peripherals::Peripherals,
};
use esp_backtrace as _;
use static_cell::StaticCell;
Expand Down
2 changes: 1 addition & 1 deletion esp32-hal/examples/hello_rgb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

use esp32_hal::{
clock::ClockControl,
pac,
peripherals,
prelude::*,
timer::TimerGroup,
utils::{smartLedAdapter, SmartLedsAdapter},
Expand Down
2 changes: 1 addition & 1 deletion esp32-hal/examples/i2c_bmp180_calibration_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use esp32_hal::{
clock::ClockControl,
gpio::IO,
i2c::I2C,
pac::Peripherals,
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Rtc,
Expand Down
2 changes: 1 addition & 1 deletion esp32-hal/examples/i2s_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use esp32_hal::{
dma::{DmaPriority},
pdma::Dma,
i2s::{DataFormat, I2s, NoMclk, Standard, I2s0New, PinsBclkWsDin, I2sReadDma},
pac::Peripherals,
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Rtc,
Expand Down
2 changes: 1 addition & 1 deletion esp32-hal/examples/i2s_sound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use esp32_hal::{
dma::DmaPriority,
pdma::Dma,
i2s::{DataFormat, I2s, I2sWriteDma, NoMclk, PinsBclkWsDout, Standard, I2s0New},
pac::Peripherals,
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Rtc,
Expand Down
2 changes: 1 addition & 1 deletion esp32-hal/examples/mcpwm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use esp32_hal::{
operator::PwmPinConfig,
timer::PwmWorkingMode,
},
pac::Peripherals,
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Rtc,
Expand Down
2 changes: 1 addition & 1 deletion esp32-hal/examples/sha.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use esp32_hal::{
clock::ClockControl,
pac::Peripherals,
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Rtc,
Expand Down
2 changes: 1 addition & 1 deletion esp32-hal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub use esp_hal_common::{
Rng,
Rtc,
Rwdt,
sha
sha,
Uart,
};

Expand Down
2 changes: 1 addition & 1 deletion esp32c2-hal/examples/embassy_hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use embassy_time::{Duration, Timer};
use esp32c2_hal::{
clock::ClockControl,
embassy,
pac::Peripherals,
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Rtc,
Expand Down
2 changes: 1 addition & 1 deletion esp32c2-hal/examples/i2c_bmp180_calibration_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use esp32c2_hal::{
clock::ClockControl,
gpio::IO,
i2c::I2C,
pac::Peripherals,
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Rtc,
Expand Down
2 changes: 1 addition & 1 deletion esp32c2-hal/examples/sha.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use esp32c2_hal::{
clock::ClockControl,
pac::Peripherals,
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Rtc,
Expand Down
2 changes: 1 addition & 1 deletion esp32c3-hal/examples/embassy_hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use esp32c3_hal::{
clock::ClockControl,
prelude::*,
timer::TimerGroup,
Rtc, embassy, pac::Peripherals,
Rtc, embassy, peripherals::Peripherals,
};
use esp_backtrace as _;
use static_cell::StaticCell;
Expand Down
2 changes: 1 addition & 1 deletion esp32c3-hal/examples/hello_rgb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use esp32c3_hal::{
clock::ClockControl,
pac,
peripherals,
prelude::*,
pulse_control::ClockSource,
timer::TimerGroup,
Expand Down
2 changes: 1 addition & 1 deletion esp32c3-hal/examples/i2c_bmp180_calibration_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use esp32c3_hal::{
clock::ClockControl,
gpio::IO,
i2c::I2C,
pac::Peripherals,
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Rtc,
Expand Down
2 changes: 1 addition & 1 deletion esp32c3-hal/examples/i2s_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use esp32c3_hal::{
dma::DmaPriority,
gdma::Gdma,
i2s::{DataFormat, I2s, I2sReadDma, MclkPin, PinsBclkWsDin, Standard, I2s0New},
pac::Peripherals,
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Rtc,
Expand Down
2 changes: 1 addition & 1 deletion esp32c3-hal/examples/i2s_sound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use esp32c3_hal::{
dma::DmaPriority,
gdma::Gdma,
i2s::{DataFormat, I2s, I2sWriteDma, MclkPin, PinsBclkWsDout, Standard, I2s0New},
pac::Peripherals,
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Rtc,
Expand Down
2 changes: 1 addition & 1 deletion esp32c3-hal/examples/sha.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use esp32c3_hal::{
clock::ClockControl,
pac::Peripherals,
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Rtc,
Expand Down
4 changes: 2 additions & 2 deletions esp32c3-hal/examples/usb_serial_jtag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use critical_section::Mutex;
use esp32c3_hal::{
clock::ClockControl,
interrupt,
pac::{self, USB_DEVICE},
peripherals::{self, USB_DEVICE},
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Expand Down Expand Up @@ -55,7 +55,7 @@ fn main() -> ! {
critical_section::with(|cs| USB_SERIAL.borrow_ref_mut(cs).replace(usb_serial));

interrupt::enable(
pac::Interrupt::USB_SERIAL_JTAG,
peripherals::Interrupt::USB_SERIAL_JTAG,
interrupt::Priority::Priority1,
)
.unwrap();
Expand Down
2 changes: 1 addition & 1 deletion esp32c3-hal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ unsafe fn configure_mmu() {
0,
);

let peripherals = pac::Peripherals::steal();
let peripherals = peripherals::Peripherals::steal();
peripherals.EXTMEM.icache_ctrl1.modify(|_, w| {
w.icache_shut_ibus()
.clear_bit()
Expand Down
2 changes: 1 addition & 1 deletion esp32s2-hal/examples/embassy_hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use esp32s2_hal::{
clock::ClockControl,
prelude::*,
timer::TimerGroup,
Rtc, embassy, pac::Peripherals,
Rtc, embassy, peripherals::Peripherals,
};
use esp_backtrace as _;
use xtensa_atomic_emulation_trap as _;
Expand Down
2 changes: 1 addition & 1 deletion esp32s2-hal/examples/i2c_bmp180_calibration_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use esp32s2_hal::{
clock::ClockControl,
gpio::IO,
i2c::I2C,
pac::Peripherals,
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Rtc,
Expand Down
2 changes: 1 addition & 1 deletion esp32s2-hal/examples/i2s_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use esp32s2_hal::{
dma::{DmaPriority},
pdma::Dma,
i2s::{DataFormat, I2s, NoMclk, Standard, I2s0New, PinsBclkWsDin, I2sReadDma},
pac::Peripherals,
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Rtc,
Expand Down
2 changes: 1 addition & 1 deletion esp32s2-hal/examples/i2s_sound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use esp32s2_hal::{
dma::DmaPriority,
pdma::Dma,
i2s::{DataFormat, I2s, I2sWriteDma, MclkPin, PinsBclkWsDout, Standard, I2s0New},
pac::Peripherals,
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Rtc,
Expand Down
2 changes: 1 addition & 1 deletion esp32s2-hal/examples/sha.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use esp32s2_hal::{
clock::ClockControl,
pac::Peripherals,
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Rtc,
Expand Down
2 changes: 1 addition & 1 deletion esp32s2-hal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub use esp_hal_common::{
Rng,
Rtc,
Rwdt,
sha
sha,
Uart,
};

Expand Down
2 changes: 1 addition & 1 deletion esp32s3-hal/examples/embassy_hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use esp32s3_hal::{
clock::ClockControl,
prelude::*,
timer::TimerGroup,
Rtc, embassy, pac::Peripherals,
Rtc, embassy, peripherals::Peripherals,
};
use esp_backtrace as _;
use static_cell::StaticCell;
Expand Down
2 changes: 1 addition & 1 deletion esp32s3-hal/examples/i2c_bmp180_calibration_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#![no_main]

use esp32s3_hal::{
clock::ClockControl, gpio::IO, i2c::I2C, pac::Peripherals, prelude::*, timer::TimerGroup, Rtc,
clock::ClockControl, gpio::IO, i2c::I2C, peripherals::Peripherals, prelude::*, timer::TimerGroup, Rtc,
};
use esp_backtrace as _;
use esp_println::println;
Expand Down
2 changes: 1 addition & 1 deletion esp32s3-hal/examples/i2s_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use esp32s3_hal::{
dma::DmaPriority,
gdma::Gdma,
i2s::{DataFormat, I2s, I2sReadDma, MclkPin, PinsBclkWsDin, Standard, I2s0New},
pac::Peripherals,
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Rtc,
Expand Down
2 changes: 1 addition & 1 deletion esp32s3-hal/examples/i2s_sound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use esp32s3_hal::{
dma::DmaPriority,
gdma::Gdma,
i2s::{DataFormat, I2s, I2sWriteDma, MclkPin, PinsBclkWsDout, Standard, I2s0New},
pac::Peripherals,
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Rtc,
Expand Down
2 changes: 1 addition & 1 deletion esp32s3-hal/examples/mcpwm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use esp32s3_hal::{
operator::PwmPinConfig,
timer::PwmWorkingMode,
},
pac::Peripherals,
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Rtc,
Expand Down
2 changes: 1 addition & 1 deletion esp32s3-hal/examples/sha.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use esp32s3_hal::{
clock::ClockControl,
pac::Peripherals,
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Rtc,
Expand Down
4 changes: 2 additions & 2 deletions esp32s3-hal/examples/usb_serial_jtag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use critical_section::Mutex;
use esp32s3_hal::{
clock::ClockControl,
interrupt,
pac::{self, USB_DEVICE},
peripherals::{self, USB_DEVICE},
peripherals::Peripherals,
prelude::*,
timer::TimerGroup,
Expand Down Expand Up @@ -50,7 +50,7 @@ fn main() -> ! {

critical_section::with(|cs| USB_SERIAL.borrow_ref_mut(cs).replace(usb_serial));

interrupt::enable(pac::Interrupt::USB_DEVICE, interrupt::Priority::Priority1).unwrap();
interrupt::enable(peripherals::Interrupt::USB_DEVICE, interrupt::Priority::Priority1).unwrap();

loop {
critical_section::with(|cs| {
Expand Down
12 changes: 6 additions & 6 deletions esp32s3-hal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,24 +142,24 @@ pub unsafe fn startup_direct_boot() -> ! {
// do some configurations for compatability with the 2nd stage bootloader
// this is a workaround and ideally we should deal with these settings in other
// places
(&*crate::pac::TIMG0::PTR)
(&*crate::peripherals::TIMG0::PTR)
.int_ena_timers
.modify(|_, w| w.t0_int_ena().set_bit().t1_int_ena().set_bit());
(&*crate::pac::TIMG1::PTR)
(&*crate::peripherals::TIMG1::PTR)
.int_ena_timers
.modify(|_, w| w.t0_int_ena().set_bit().t1_int_ena().set_bit());

(&*crate::pac::RTC_CNTL::PTR)
(&*crate::peripherals::RTC_CNTL::PTR)
.swd_wprotect
.write(|w| w.bits(0x8f1d312a));
(&*crate::pac::RTC_CNTL::PTR)
(&*crate::peripherals::RTC_CNTL::PTR)
.swd_conf
.modify(|_, w| w.swd_disable().set_bit());
(&*crate::pac::RTC_CNTL::PTR)
(&*crate::peripherals::RTC_CNTL::PTR)
.swd_wprotect
.write(|w| w.bits(0));

(&*crate::pac::SYSTEM::PTR)
(&*crate::peripherals::SYSTEM::PTR)
.sysclk_conf
.modify(|_, w| w.soc_clk_sel().bits(1));

Expand Down

0 comments on commit 3b515b7

Please sign in to comment.