diff --git a/Cargo.example.toml b/Cargo.example.toml index 3362d0bc0..f072c2f96 100644 --- a/Cargo.example.toml +++ b/Cargo.example.toml @@ -21,7 +21,7 @@ members = [ "embassy", "embassy-traits", "embassy-macros", - "embassy-extras", + "embassy-hal-common", "embassy-net", # Uncomment ONLY ONE of the groups below. diff --git a/embassy-extras/Cargo.toml b/embassy-hal-common/Cargo.toml similarity index 93% rename from embassy-extras/Cargo.toml rename to embassy-hal-common/Cargo.toml index 5d07901a9..4db536de4 100644 --- a/embassy-extras/Cargo.toml +++ b/embassy-hal-common/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "embassy-extras" +name = "embassy-hal-common" version = "0.1.0" authors = ["Dario Nieuwenhuis "] edition = "2018" diff --git a/embassy-extras/src/fmt.rs b/embassy-hal-common/src/fmt.rs similarity index 100% rename from embassy-extras/src/fmt.rs rename to embassy-hal-common/src/fmt.rs diff --git a/embassy-extras/src/interrupt.rs b/embassy-hal-common/src/interrupt.rs similarity index 100% rename from embassy-extras/src/interrupt.rs rename to embassy-hal-common/src/interrupt.rs diff --git a/embassy-extras/src/lib.rs b/embassy-hal-common/src/lib.rs similarity index 100% rename from embassy-extras/src/lib.rs rename to embassy-hal-common/src/lib.rs diff --git a/embassy-extras/src/macros.rs b/embassy-hal-common/src/macros.rs similarity index 100% rename from embassy-extras/src/macros.rs rename to embassy-hal-common/src/macros.rs diff --git a/embassy-extras/src/peripheral.rs b/embassy-hal-common/src/peripheral.rs similarity index 100% rename from embassy-extras/src/peripheral.rs rename to embassy-hal-common/src/peripheral.rs diff --git a/embassy-extras/src/peripheral_shared.rs b/embassy-hal-common/src/peripheral_shared.rs similarity index 100% rename from embassy-extras/src/peripheral_shared.rs rename to embassy-hal-common/src/peripheral_shared.rs diff --git a/embassy-extras/src/ring_buffer.rs b/embassy-hal-common/src/ring_buffer.rs similarity index 100% rename from embassy-extras/src/ring_buffer.rs rename to embassy-hal-common/src/ring_buffer.rs diff --git a/embassy-extras/src/usb/cdc_acm.rs b/embassy-hal-common/src/usb/cdc_acm.rs similarity index 100% rename from embassy-extras/src/usb/cdc_acm.rs rename to embassy-hal-common/src/usb/cdc_acm.rs diff --git a/embassy-extras/src/usb/mod.rs b/embassy-hal-common/src/usb/mod.rs similarity index 100% rename from embassy-extras/src/usb/mod.rs rename to embassy-hal-common/src/usb/mod.rs diff --git a/embassy-extras/src/usb/usb_serial.rs b/embassy-hal-common/src/usb/usb_serial.rs similarity index 100% rename from embassy-extras/src/usb/usb_serial.rs rename to embassy-hal-common/src/usb/usb_serial.rs diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml index 1fdc83fb3..c4054cd18 100644 --- a/embassy-nrf/Cargo.toml +++ b/embassy-nrf/Cargo.toml @@ -30,7 +30,7 @@ nrf52840 = ["nrf52840-pac"] [dependencies] embassy = { version = "0.1.0", path = "../embassy", features = ["time-tick-32768hz"] } embassy-macros = { version = "0.1.0", path = "../embassy-macros", features = ["nrf"]} -embassy-extras = {version = "0.1.0", path = "../embassy-extras" } +embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" } defmt = { version = "0.2.0", optional = true } log = { version = "0.4.11", optional = true } diff --git a/embassy-nrf/src/buffered_uarte.rs b/embassy-nrf/src/buffered_uarte.rs index 9be4d4d54..d6120bd0c 100644 --- a/embassy-nrf/src/buffered_uarte.rs +++ b/embassy-nrf/src/buffered_uarte.rs @@ -7,9 +7,9 @@ use core::task::{Context, Poll}; use embassy::interrupt::InterruptExt; use embassy::io::{AsyncBufRead, AsyncWrite, Result}; use embassy::util::{Unborrow, WakerRegistration}; -use embassy_extras::peripheral::{PeripheralMutex, PeripheralState}; -use embassy_extras::ring_buffer::RingBuffer; -use embassy_extras::{low_power_wait_until, unborrow}; +use embassy_hal_common::peripheral::{PeripheralMutex, PeripheralState}; +use embassy_hal_common::ring_buffer::RingBuffer; +use embassy_hal_common::{low_power_wait_until, unborrow}; use crate::gpio::sealed::Pin as _; use crate::gpio::{OptionalPin as GpioOptionalPin, Pin as GpioPin}; diff --git a/embassy-nrf/src/chips/nrf52805.rs b/embassy-nrf/src/chips/nrf52805.rs index 2b02c1afe..2034c67e0 100644 --- a/embassy-nrf/src/chips/nrf52805.rs +++ b/embassy-nrf/src/chips/nrf52805.rs @@ -3,7 +3,7 @@ pub use nrf52805_pac as pac; pub const EASY_DMA_SIZE: usize = (1 << 14) - 1; pub const FORCE_COPY_BUFFER_SIZE: usize = 256; -embassy_extras::peripherals! { +embassy_hal_common::peripherals! { // RTC RTC0, RTC1, diff --git a/embassy-nrf/src/chips/nrf52810.rs b/embassy-nrf/src/chips/nrf52810.rs index 4c93d5046..27e1f3d20 100644 --- a/embassy-nrf/src/chips/nrf52810.rs +++ b/embassy-nrf/src/chips/nrf52810.rs @@ -3,7 +3,7 @@ pub use nrf52810_pac as pac; pub const EASY_DMA_SIZE: usize = (1 << 10) - 1; pub const FORCE_COPY_BUFFER_SIZE: usize = 256; -embassy_extras::peripherals! { +embassy_hal_common::peripherals! { // RTC RTC0, RTC1, diff --git a/embassy-nrf/src/chips/nrf52811.rs b/embassy-nrf/src/chips/nrf52811.rs index f840214fa..0d0c5ac75 100644 --- a/embassy-nrf/src/chips/nrf52811.rs +++ b/embassy-nrf/src/chips/nrf52811.rs @@ -3,7 +3,7 @@ pub use nrf52811_pac as pac; pub const EASY_DMA_SIZE: usize = (1 << 14) - 1; pub const FORCE_COPY_BUFFER_SIZE: usize = 256; -embassy_extras::peripherals! { +embassy_hal_common::peripherals! { // RTC RTC0, RTC1, diff --git a/embassy-nrf/src/chips/nrf52820.rs b/embassy-nrf/src/chips/nrf52820.rs index 180861f71..9b5bdef16 100644 --- a/embassy-nrf/src/chips/nrf52820.rs +++ b/embassy-nrf/src/chips/nrf52820.rs @@ -3,7 +3,7 @@ pub use nrf52820_pac as pac; pub const EASY_DMA_SIZE: usize = (1 << 15) - 1; pub const FORCE_COPY_BUFFER_SIZE: usize = 512; -embassy_extras::peripherals! { +embassy_hal_common::peripherals! { // RTC RTC0, RTC1, diff --git a/embassy-nrf/src/chips/nrf52832.rs b/embassy-nrf/src/chips/nrf52832.rs index 1c38a7751..e79dba524 100644 --- a/embassy-nrf/src/chips/nrf52832.rs +++ b/embassy-nrf/src/chips/nrf52832.rs @@ -3,7 +3,7 @@ pub use nrf52832_pac as pac; pub const EASY_DMA_SIZE: usize = (1 << 8) - 1; pub const FORCE_COPY_BUFFER_SIZE: usize = 255; -embassy_extras::peripherals! { +embassy_hal_common::peripherals! { // RTC RTC0, RTC1, diff --git a/embassy-nrf/src/chips/nrf52833.rs b/embassy-nrf/src/chips/nrf52833.rs index bcb0fffc0..7c62a7fdc 100644 --- a/embassy-nrf/src/chips/nrf52833.rs +++ b/embassy-nrf/src/chips/nrf52833.rs @@ -3,7 +3,7 @@ pub use nrf52833_pac as pac; pub const EASY_DMA_SIZE: usize = (1 << 16) - 1; pub const FORCE_COPY_BUFFER_SIZE: usize = 512; -embassy_extras::peripherals! { +embassy_hal_common::peripherals! { // RTC RTC0, RTC1, diff --git a/embassy-nrf/src/chips/nrf52840.rs b/embassy-nrf/src/chips/nrf52840.rs index ee8b5a89c..00f6d49dd 100644 --- a/embassy-nrf/src/chips/nrf52840.rs +++ b/embassy-nrf/src/chips/nrf52840.rs @@ -3,7 +3,7 @@ pub use nrf52840_pac as pac; pub const EASY_DMA_SIZE: usize = (1 << 16) - 1; pub const FORCE_COPY_BUFFER_SIZE: usize = 512; -embassy_extras::peripherals! { +embassy_hal_common::peripherals! { // RTC RTC0, RTC1, diff --git a/embassy-nrf/src/gpio.rs b/embassy-nrf/src/gpio.rs index b02e77874..e30df7e7e 100644 --- a/embassy-nrf/src/gpio.rs +++ b/embassy-nrf/src/gpio.rs @@ -5,7 +5,7 @@ use core::hint::unreachable_unchecked; use core::marker::PhantomData; use embassy::util::Unborrow; -use embassy_extras::{unborrow, unsafe_impl_unborrow}; +use embassy_hal_common::{unborrow, unsafe_impl_unborrow}; use embedded_hal::digital::v2::{InputPin, OutputPin, StatefulOutputPin}; use gpio::pin_cnf::DRIVE_A; diff --git a/embassy-nrf/src/gpiote.rs b/embassy-nrf/src/gpiote.rs index 54d3dd012..847b2fbf3 100644 --- a/embassy-nrf/src/gpiote.rs +++ b/embassy-nrf/src/gpiote.rs @@ -5,7 +5,7 @@ use core::task::{Context, Poll}; use embassy::interrupt::{Interrupt, InterruptExt}; use embassy::traits::gpio::{WaitForAnyEdge, WaitForHigh, WaitForLow}; use embassy::util::AtomicWaker; -use embassy_extras::unsafe_impl_unborrow; +use embassy_hal_common::unsafe_impl_unborrow; use embedded_hal::digital::v2::{InputPin, StatefulOutputPin}; use futures::future::poll_fn; diff --git a/embassy-nrf/src/lib.rs b/embassy-nrf/src/lib.rs index 35815f792..1275a64f3 100644 --- a/embassy-nrf/src/lib.rs +++ b/embassy-nrf/src/lib.rs @@ -76,7 +76,7 @@ pub mod interrupt { pub use crate::chip::irqs::*; pub use cortex_m::interrupt::{CriticalSection, Mutex}; pub use embassy::interrupt::{declare, take, Interrupt}; - pub use embassy_extras::interrupt::Priority3 as Priority; + pub use embassy_hal_common::interrupt::Priority3 as Priority; } pub use embassy_macros::interrupt; diff --git a/embassy-nrf/src/ppi.rs b/embassy-nrf/src/ppi.rs index c91a69c10..61028c03a 100644 --- a/embassy-nrf/src/ppi.rs +++ b/embassy-nrf/src/ppi.rs @@ -12,7 +12,7 @@ use core::marker::PhantomData; use core::ptr::NonNull; use embassy::util::Unborrow; -use embassy_extras::{unborrow, unsafe_impl_unborrow}; +use embassy_hal_common::{unborrow, unsafe_impl_unborrow}; use crate::{pac, peripherals}; diff --git a/embassy-nrf/src/pwm.rs b/embassy-nrf/src/pwm.rs index 07509aef9..5e996e882 100644 --- a/embassy-nrf/src/pwm.rs +++ b/embassy-nrf/src/pwm.rs @@ -4,7 +4,7 @@ use core::cell::UnsafeCell; use core::marker::PhantomData; use core::sync::atomic::{compiler_fence, Ordering}; use embassy::util::Unborrow; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use crate::gpio::sealed::Pin as _; use crate::gpio::OptionalPin as GpioOptionalPin; diff --git a/embassy-nrf/src/qspi.rs b/embassy-nrf/src/qspi.rs index 42bf8f419..28becfd56 100644 --- a/embassy-nrf/src/qspi.rs +++ b/embassy-nrf/src/qspi.rs @@ -7,7 +7,7 @@ use core::task::Poll; use embassy::interrupt::{Interrupt, InterruptExt}; use embassy::traits::flash::{Error, Flash}; use embassy::util::{AtomicWaker, DropBomb, Unborrow}; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use futures::future::poll_fn; use crate::gpio::sealed::Pin as _; diff --git a/embassy-nrf/src/rng.rs b/embassy-nrf/src/rng.rs index a444c9b3f..6cdcccf3b 100644 --- a/embassy-nrf/src/rng.rs +++ b/embassy-nrf/src/rng.rs @@ -11,7 +11,7 @@ use embassy::traits; use embassy::util::AtomicWaker; use embassy::util::OnDrop; use embassy::util::Unborrow; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use futures::future::poll_fn; use rand_core::RngCore; diff --git a/embassy-nrf/src/saadc.rs b/embassy-nrf/src/saadc.rs index edb8aa21f..7bc38f1d3 100644 --- a/embassy-nrf/src/saadc.rs +++ b/embassy-nrf/src/saadc.rs @@ -3,7 +3,7 @@ use core::marker::PhantomData; use core::sync::atomic::{compiler_fence, Ordering}; use core::task::Poll; use embassy::util::{wake_on_interrupt, Unborrow}; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use futures::future::poll_fn; use crate::interrupt; diff --git a/embassy-nrf/src/spim.rs b/embassy-nrf/src/spim.rs index 221c52051..9a7fb4f67 100644 --- a/embassy-nrf/src/spim.rs +++ b/embassy-nrf/src/spim.rs @@ -7,7 +7,7 @@ use core::task::Poll; use embassy::interrupt::InterruptExt; use embassy::traits; use embassy::util::{AtomicWaker, Unborrow}; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use futures::future::poll_fn; use traits::spi::{FullDuplex, Read, Spi, Write}; diff --git a/embassy-nrf/src/timer.rs b/embassy-nrf/src/timer.rs index 7ff35c320..eab9a1416 100644 --- a/embassy-nrf/src/timer.rs +++ b/embassy-nrf/src/timer.rs @@ -7,7 +7,7 @@ use embassy::interrupt::Interrupt; use embassy::interrupt::InterruptExt; use embassy::util::OnDrop; use embassy::util::Unborrow; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use futures::future::poll_fn; use crate::pac; diff --git a/embassy-nrf/src/twim.rs b/embassy-nrf/src/twim.rs index b533c69c4..ac263bad7 100644 --- a/embassy-nrf/src/twim.rs +++ b/embassy-nrf/src/twim.rs @@ -13,7 +13,7 @@ use core::task::Poll; use embassy::interrupt::{Interrupt, InterruptExt}; use embassy::traits; use embassy::util::{AtomicWaker, Unborrow}; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use futures::future::poll_fn; use traits::i2c::I2c; diff --git a/embassy-nrf/src/uarte.rs b/embassy-nrf/src/uarte.rs index 985854a5f..b2b298661 100644 --- a/embassy-nrf/src/uarte.rs +++ b/embassy-nrf/src/uarte.rs @@ -9,7 +9,7 @@ use core::task::Poll; use embassy::interrupt::InterruptExt; use embassy::traits::uart::{Error, Read, ReadUntilIdle, Write}; use embassy::util::{AtomicWaker, OnDrop, Unborrow}; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use futures::future::poll_fn; use crate::chip::EASY_DMA_SIZE; diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml index c61b8c997..e2da226dd 100644 --- a/embassy-rp/Cargo.toml +++ b/embassy-rp/Cargo.toml @@ -20,7 +20,7 @@ defmt-error = [ ] [dependencies] embassy = { version = "0.1.0", path = "../embassy", features = [ "time-tick-1mhz" ] } -embassy-extras = {version = "0.1.0", path = "../embassy-extras" } +embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" } embassy-macros = { version = "0.1.0", path = "../embassy-macros", features = ["rp"]} defmt = { version = "0.2.0", optional = true } diff --git a/embassy-rp/src/gpio.rs b/embassy-rp/src/gpio.rs index 5edf47f52..4ea78016a 100644 --- a/embassy-rp/src/gpio.rs +++ b/embassy-rp/src/gpio.rs @@ -6,7 +6,7 @@ use crate::pac::SIO; use crate::peripherals; use embassy::util::Unborrow; -use embassy_extras::{unborrow, unsafe_impl_unborrow}; +use embassy_hal_common::{unborrow, unsafe_impl_unborrow}; use embedded_hal::digital::v2 as digital; /// Represents a digital input or output level. diff --git a/embassy-rp/src/interrupt.rs b/embassy-rp/src/interrupt.rs index a4e5959ab..109afcbc4 100644 --- a/embassy-rp/src/interrupt.rs +++ b/embassy-rp/src/interrupt.rs @@ -5,7 +5,7 @@ // Re-exports pub use embassy::interrupt::{declare, take, Interrupt}; -pub use embassy_extras::interrupt::Priority3 as Priority; +pub use embassy_hal_common::interrupt::Priority3 as Priority; mod irqs { use super::*; diff --git a/embassy-rp/src/lib.rs b/embassy-rp/src/lib.rs index c53d2e58d..10bf7158f 100644 --- a/embassy-rp/src/lib.rs +++ b/embassy-rp/src/lib.rs @@ -25,7 +25,7 @@ pub mod uart; mod clocks; mod reset; -embassy_extras::peripherals! { +embassy_hal_common::peripherals! { PIN_0, PIN_1, PIN_2, diff --git a/embassy-rp/src/spi.rs b/embassy-rp/src/spi.rs index 959ad9b0f..906fa23e9 100644 --- a/embassy-rp/src/spi.rs +++ b/embassy-rp/src/spi.rs @@ -1,7 +1,7 @@ use core::marker::PhantomData; use embassy::util::Unborrow; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use embedded_hal::blocking::spi as eh; use embedded_hal::spi as ehnb; diff --git a/embassy-rp/src/uart.rs b/embassy-rp/src/uart.rs index 6d354e7c4..3f5c49079 100644 --- a/embassy-rp/src/uart.rs +++ b/embassy-rp/src/uart.rs @@ -1,7 +1,7 @@ use core::marker::PhantomData; use embassy::util::Unborrow; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use gpio::Pin; use crate::{gpio, pac, peripherals}; diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index 4e4d7ff82..d94c9d523 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml @@ -8,7 +8,7 @@ resolver = "2" [dependencies] embassy = { version = "0.1.0", path = "../embassy", features = ["time-tick-32768hz"] } embassy-macros = { version = "0.1.0", path = "../embassy-macros", features = ["stm32"] } -embassy-extras = {version = "0.1.0", path = "../embassy-extras" } +embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" } embassy-traits = {version = "0.1.0", path = "../embassy-traits" } embassy-net = { version = "0.1.0", path = "../embassy-net", default-features = false, optional = true } diff --git a/embassy-stm32/gen.py b/embassy-stm32/gen.py index 01c778716..e589f2f06 100644 --- a/embassy-stm32/gen.py +++ b/embassy-stm32/gen.py @@ -85,4 +85,4 @@ with open(output_file, 'w') as f: for (channel_id, defn) in core['dma_channels'].items(): singletons.append( channel_id ) - f.write(f"embassy_extras::peripherals!({','.join(singletons)});") + f.write(f"embassy_hal_common::peripherals!({','.join(singletons)});") diff --git a/embassy-stm32/src/adc/v3.rs b/embassy-stm32/src/adc/v3.rs index 7480c4a36..db6a4e512 100644 --- a/embassy-stm32/src/adc/v3.rs +++ b/embassy-stm32/src/adc/v3.rs @@ -1,7 +1,7 @@ use crate::adc::{AdcPin, Instance}; use core::marker::PhantomData; use embassy::util::Unborrow; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use embedded_hal::blocking::delay::DelayUs; pub const VDDA_CALIB_MV: u32 = 3000; diff --git a/embassy-stm32/src/dac/v2.rs b/embassy-stm32/src/dac/v2.rs index 25a87db06..f46145b8d 100644 --- a/embassy-stm32/src/dac/v2.rs +++ b/embassy-stm32/src/dac/v2.rs @@ -3,7 +3,7 @@ use crate::gpio::AnyPin; use crate::pac::dac; use core::marker::PhantomData; use embassy::util::Unborrow; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; #[derive(Debug)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] diff --git a/embassy-stm32/src/eth/v2/mod.rs b/embassy-stm32/src/eth/v2/mod.rs index 129d2d02c..3f72fb35e 100644 --- a/embassy-stm32/src/eth/v2/mod.rs +++ b/embassy-stm32/src/eth/v2/mod.rs @@ -4,8 +4,8 @@ use core::sync::atomic::{fence, Ordering}; use core::task::Waker; use embassy::util::{AtomicWaker, Unborrow}; -use embassy_extras::peripheral::{PeripheralMutex, PeripheralState}; -use embassy_extras::unborrow; +use embassy_hal_common::peripheral::{PeripheralMutex, PeripheralState}; +use embassy_hal_common::unborrow; use embassy_net::{Device, DeviceCapabilities, LinkState, PacketBuf, MTU}; use crate::gpio::sealed::Pin as __GpioPin; diff --git a/embassy-stm32/src/exti/mod.rs b/embassy-stm32/src/exti/mod.rs index 217c8173b..bb9082f2e 100644 --- a/embassy-stm32/src/exti/mod.rs +++ b/embassy-stm32/src/exti/mod.rs @@ -42,7 +42,7 @@ mod _version; pub use _version::*; use crate::peripherals; -use embassy_extras::unsafe_impl_unborrow; +use embassy_hal_common::unsafe_impl_unborrow; pub(crate) mod sealed { pub trait Channel {} diff --git a/embassy-stm32/src/gpio.rs b/embassy-stm32/src/gpio.rs index 5145bd689..7812709ce 100644 --- a/embassy-stm32/src/gpio.rs +++ b/embassy-stm32/src/gpio.rs @@ -2,7 +2,7 @@ use core::convert::Infallible; use core::marker::PhantomData; use embassy::util::Unborrow; -use embassy_extras::{unborrow, unsafe_impl_unborrow}; +use embassy_hal_common::{unborrow, unsafe_impl_unborrow}; use embedded_hal::digital::v2::{toggleable, InputPin, OutputPin, StatefulOutputPin}; use crate::pac; diff --git a/embassy-stm32/src/i2c/v1.rs b/embassy-stm32/src/i2c/v1.rs index 8573f01f4..578536855 100644 --- a/embassy-stm32/src/i2c/v1.rs +++ b/embassy-stm32/src/i2c/v1.rs @@ -2,7 +2,7 @@ use crate::i2c::{Error, Instance, SclPin, SdaPin}; use crate::time::Hertz; use core::marker::PhantomData; use embassy::util::Unborrow; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use embedded_hal::blocking::i2c::Read; use embedded_hal::blocking::i2c::Write; use embedded_hal::blocking::i2c::WriteRead; diff --git a/embassy-stm32/src/i2c/v2.rs b/embassy-stm32/src/i2c/v2.rs index 3179211ec..9f7206107 100644 --- a/embassy-stm32/src/i2c/v2.rs +++ b/embassy-stm32/src/i2c/v2.rs @@ -1,7 +1,7 @@ use core::cmp; use core::marker::PhantomData; use embassy::util::Unborrow; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use embedded_hal::blocking::i2c::Read; use embedded_hal::blocking::i2c::Write; use embedded_hal::blocking::i2c::WriteRead; diff --git a/embassy-stm32/src/interrupt.rs b/embassy-stm32/src/interrupt.rs index a12cdf235..27e441644 100644 --- a/embassy-stm32/src/interrupt.rs +++ b/embassy-stm32/src/interrupt.rs @@ -1,7 +1,7 @@ pub use bare_metal::Mutex; pub use critical_section::CriticalSection; pub use embassy::interrupt::{take, Interrupt}; -pub use embassy_extras::interrupt::Priority4 as Priority; +pub use embassy_hal_common::interrupt::Priority4 as Priority; use crate::pac::Interrupt as InterruptEnum; use embassy::interrupt::declare; diff --git a/embassy-stm32/src/rcc/f4/mod.rs b/embassy-stm32/src/rcc/f4/mod.rs index 6000192b9..d47510da7 100644 --- a/embassy-stm32/src/rcc/f4/mod.rs +++ b/embassy-stm32/src/rcc/f4/mod.rs @@ -6,7 +6,7 @@ use crate::time::Hertz; use crate::time::U32Ext; use core::marker::PhantomData; use embassy::util::Unborrow; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use pac::rcc::vals::{Hpre, Ppre, Sw}; /// Most of clock setup is copied from stm32l0xx-hal, and adopted to the generated PAC, diff --git a/embassy-stm32/src/rcc/l0/mod.rs b/embassy-stm32/src/rcc/l0/mod.rs index 6107d5f55..ef8286e25 100644 --- a/embassy-stm32/src/rcc/l0/mod.rs +++ b/embassy-stm32/src/rcc/l0/mod.rs @@ -6,7 +6,7 @@ use crate::time::Hertz; use crate::time::U32Ext; use core::marker::PhantomData; use embassy::util::Unborrow; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use pac::rcc::vals::{Hpre, Msirange, Plldiv, Pllmul, Pllsrc, Ppre, Sw}; /// Most of clock setup is copied from stm32l0xx-hal, and adopted to the generated PAC, diff --git a/embassy-stm32/src/rcc/l4/mod.rs b/embassy-stm32/src/rcc/l4/mod.rs index e6662f59f..4247d8ffb 100644 --- a/embassy-stm32/src/rcc/l4/mod.rs +++ b/embassy-stm32/src/rcc/l4/mod.rs @@ -6,7 +6,7 @@ use crate::time::Hertz; use crate::time::U32Ext; use core::marker::PhantomData; use embassy::util::Unborrow; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; /// Most of clock setup is copied from stm32l0xx-hal, and adopted to the generated PAC, /// and with the addition of the init function to configure a system clock. diff --git a/embassy-stm32/src/rcc/wb55/mod.rs b/embassy-stm32/src/rcc/wb55/mod.rs index e6662f59f..4247d8ffb 100644 --- a/embassy-stm32/src/rcc/wb55/mod.rs +++ b/embassy-stm32/src/rcc/wb55/mod.rs @@ -6,7 +6,7 @@ use crate::time::Hertz; use crate::time::U32Ext; use core::marker::PhantomData; use embassy::util::Unborrow; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; /// Most of clock setup is copied from stm32l0xx-hal, and adopted to the generated PAC, /// and with the addition of the init function to configure a system clock. diff --git a/embassy-stm32/src/rcc/wl5x/mod.rs b/embassy-stm32/src/rcc/wl5x/mod.rs index 554a27ca2..6a4f99e0c 100644 --- a/embassy-stm32/src/rcc/wl5x/mod.rs +++ b/embassy-stm32/src/rcc/wl5x/mod.rs @@ -6,7 +6,7 @@ use crate::time::Hertz; use crate::time::U32Ext; use core::marker::PhantomData; use embassy::util::Unborrow; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; /// Most of clock setup is copied from stm32l0xx-hal, and adopted to the generated PAC, /// and with the addition of the init function to configure a system clock. diff --git a/embassy-stm32/src/rng.rs b/embassy-stm32/src/rng.rs index c2248c84d..d93a25f5a 100644 --- a/embassy-stm32/src/rng.rs +++ b/embassy-stm32/src/rng.rs @@ -4,7 +4,7 @@ use core::future::Future; use core::task::Poll; use embassy::traits; use embassy::util::{AtomicWaker, Unborrow}; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use futures::future::poll_fn; use rand_core::{CryptoRng, RngCore}; diff --git a/embassy-stm32/src/sdmmc/v2.rs b/embassy-stm32/src/sdmmc/v2.rs index 9c7bad4df..aa1d68ae7 100644 --- a/embassy-stm32/src/sdmmc/v2.rs +++ b/embassy-stm32/src/sdmmc/v2.rs @@ -6,7 +6,7 @@ use core::task::Poll; use embassy::interrupt::InterruptExt; use embassy::util::{AtomicWaker, OnDrop, Unborrow}; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use futures::future::poll_fn; use sdio_host::{BusWidth, CardCapacity, CardStatus, CurrentState, SDStatus, CID, CSD, OCR, SCR}; diff --git a/embassy-stm32/src/spi/v1.rs b/embassy-stm32/src/spi/v1.rs index 43489bb6f..554981ce7 100644 --- a/embassy-stm32/src/spi/v1.rs +++ b/embassy-stm32/src/spi/v1.rs @@ -12,7 +12,7 @@ use core::future::Future; use core::marker::PhantomData; use core::ptr; use embassy::util::Unborrow; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use embassy_traits::spi as traits; pub use embedded_hal::spi::{Mode, Phase, Polarity, MODE_0, MODE_1, MODE_2, MODE_3}; use futures::future::join3; diff --git a/embassy-stm32/src/spi/v2.rs b/embassy-stm32/src/spi/v2.rs index 2144dfcc8..496d100f7 100644 --- a/embassy-stm32/src/spi/v2.rs +++ b/embassy-stm32/src/spi/v2.rs @@ -14,7 +14,7 @@ use core::future::Future; use core::marker::PhantomData; use core::ptr; use embassy::util::Unborrow; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use embassy_traits::spi as traits; pub use embedded_hal::spi::{Mode, Phase, Polarity, MODE_0, MODE_1, MODE_2, MODE_3}; use futures::future::join3; diff --git a/embassy-stm32/src/spi/v3.rs b/embassy-stm32/src/spi/v3.rs index f433d7f9c..cfee54dac 100644 --- a/embassy-stm32/src/spi/v3.rs +++ b/embassy-stm32/src/spi/v3.rs @@ -14,7 +14,7 @@ use core::future::Future; use core::marker::PhantomData; use core::ptr; use embassy::util::Unborrow; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use embassy_traits::spi as traits; pub use embedded_hal::spi::{Mode, Phase, Polarity, MODE_0, MODE_1, MODE_2, MODE_3}; diff --git a/embassy-stm32/src/usart/v1.rs b/embassy-stm32/src/usart/v1.rs index 0f39c364b..d68215fea 100644 --- a/embassy-stm32/src/usart/v1.rs +++ b/embassy-stm32/src/usart/v1.rs @@ -1,7 +1,7 @@ use core::future::Future; use core::marker::PhantomData; use embassy::util::Unborrow; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use futures::TryFutureExt; use super::*; diff --git a/embassy-stm32/src/usart/v2.rs b/embassy-stm32/src/usart/v2.rs index 8a4d63b20..6ce3a338e 100644 --- a/embassy-stm32/src/usart/v2.rs +++ b/embassy-stm32/src/usart/v2.rs @@ -1,7 +1,7 @@ use core::future::Future; use core::marker::PhantomData; use embassy::util::Unborrow; -use embassy_extras::unborrow; +use embassy_hal_common::unborrow; use futures::TryFutureExt; use super::*; diff --git a/examples/stm32f4/Cargo.toml b/examples/stm32f4/Cargo.toml index 704a76390..693dac545 100644 --- a/examples/stm32f4/Cargo.toml +++ b/examples/stm32f4/Cargo.toml @@ -20,7 +20,7 @@ defmt-error = [] embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] } embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "defmt-trace", "stm32f429zi", "unstable-pac"] } -embassy-extras = {version = "0.1.0", path = "../../embassy-extras" } +embassy-hal-common = {version = "0.1.0", path = "../../embassy-hal-common" } defmt = "0.2.0" defmt-rtt = "0.2.0" diff --git a/examples/stm32h7/Cargo.toml b/examples/stm32h7/Cargo.toml index ebaa4e5db..278ab6f6b 100644 --- a/examples/stm32h7/Cargo.toml +++ b/examples/stm32h7/Cargo.toml @@ -20,7 +20,7 @@ defmt-error = [] embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] } embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "defmt-trace", "stm32h743zi", "net"] } -embassy-extras = {version = "0.1.0", path = "../../embassy-extras" } +embassy-hal-common = {version = "0.1.0", path = "../../embassy-hal-common" } embassy-net = { path = "../../embassy-net", default-features = false, features = ["defmt-debug", "defmt", "tcp", "medium-ethernet", "pool-16"] } stm32-metapac = { path = "../../stm32-metapac", features = ["stm32h743zi"] } embassy-macros = { path = "../../embassy-macros" } diff --git a/examples/stm32l0/Cargo.toml b/examples/stm32l0/Cargo.toml index 68291b007..47d23d08f 100644 --- a/examples/stm32l0/Cargo.toml +++ b/examples/stm32l0/Cargo.toml @@ -20,7 +20,7 @@ defmt-error = [] embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] } embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "defmt-trace", "stm32l072cz"] } -embassy-extras = {version = "0.1.0", path = "../../embassy-extras" } +embassy-hal-common = {version = "0.1.0", path = "../../embassy-hal-common" } defmt = "0.2.0" defmt-rtt = "0.2.0" diff --git a/examples/stm32l4/Cargo.toml b/examples/stm32l4/Cargo.toml index cbf002291..ce4618290 100644 --- a/examples/stm32l4/Cargo.toml +++ b/examples/stm32l4/Cargo.toml @@ -20,7 +20,7 @@ defmt-error = [] embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] } embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "defmt-trace", "unstable-pac", "stm32l4s5vi"] } -embassy-extras = {version = "0.1.0", path = "../../embassy-extras" } +embassy-hal-common = {version = "0.1.0", path = "../../embassy-hal-common" } defmt = "0.2.0" defmt-rtt = "0.2.0" diff --git a/examples/stm32wb55/Cargo.toml b/examples/stm32wb55/Cargo.toml index 92813ccd0..4d6f7789c 100644 --- a/examples/stm32wb55/Cargo.toml +++ b/examples/stm32wb55/Cargo.toml @@ -20,7 +20,7 @@ defmt-error = [] embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] } embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] } embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "defmt-trace", "stm32wb55cc"] } -embassy-extras = {version = "0.1.0", path = "../../embassy-extras" } +embassy-hal-common = {version = "0.1.0", path = "../../embassy-hal-common" } defmt = "0.2.0" defmt-rtt = "0.2.0"