Rename embassy-extras to embassy-hal-common
This commit is contained in:
parent
c8a48d726a
commit
7bfb763e09
@ -21,7 +21,7 @@ members = [
|
|||||||
"embassy",
|
"embassy",
|
||||||
"embassy-traits",
|
"embassy-traits",
|
||||||
"embassy-macros",
|
"embassy-macros",
|
||||||
"embassy-extras",
|
"embassy-hal-common",
|
||||||
"embassy-net",
|
"embassy-net",
|
||||||
|
|
||||||
# Uncomment ONLY ONE of the groups below.
|
# Uncomment ONLY ONE of the groups below.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "embassy-extras"
|
name = "embassy-hal-common"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Dario Nieuwenhuis <dirbaio@dirbaio.net>"]
|
authors = ["Dario Nieuwenhuis <dirbaio@dirbaio.net>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
@ -30,7 +30,7 @@ nrf52840 = ["nrf52840-pac"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
embassy = { version = "0.1.0", path = "../embassy", features = ["time-tick-32768hz"] }
|
embassy = { version = "0.1.0", path = "../embassy", features = ["time-tick-32768hz"] }
|
||||||
embassy-macros = { version = "0.1.0", path = "../embassy-macros", features = ["nrf"]}
|
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 }
|
defmt = { version = "0.2.0", optional = true }
|
||||||
log = { version = "0.4.11", optional = true }
|
log = { version = "0.4.11", optional = true }
|
||||||
|
@ -7,9 +7,9 @@ use core::task::{Context, Poll};
|
|||||||
use embassy::interrupt::InterruptExt;
|
use embassy::interrupt::InterruptExt;
|
||||||
use embassy::io::{AsyncBufRead, AsyncWrite, Result};
|
use embassy::io::{AsyncBufRead, AsyncWrite, Result};
|
||||||
use embassy::util::{Unborrow, WakerRegistration};
|
use embassy::util::{Unborrow, WakerRegistration};
|
||||||
use embassy_extras::peripheral::{PeripheralMutex, PeripheralState};
|
use embassy_hal_common::peripheral::{PeripheralMutex, PeripheralState};
|
||||||
use embassy_extras::ring_buffer::RingBuffer;
|
use embassy_hal_common::ring_buffer::RingBuffer;
|
||||||
use embassy_extras::{low_power_wait_until, unborrow};
|
use embassy_hal_common::{low_power_wait_until, unborrow};
|
||||||
|
|
||||||
use crate::gpio::sealed::Pin as _;
|
use crate::gpio::sealed::Pin as _;
|
||||||
use crate::gpio::{OptionalPin as GpioOptionalPin, Pin as GpioPin};
|
use crate::gpio::{OptionalPin as GpioOptionalPin, Pin as GpioPin};
|
||||||
|
@ -3,7 +3,7 @@ pub use nrf52805_pac as pac;
|
|||||||
pub const EASY_DMA_SIZE: usize = (1 << 14) - 1;
|
pub const EASY_DMA_SIZE: usize = (1 << 14) - 1;
|
||||||
pub const FORCE_COPY_BUFFER_SIZE: usize = 256;
|
pub const FORCE_COPY_BUFFER_SIZE: usize = 256;
|
||||||
|
|
||||||
embassy_extras::peripherals! {
|
embassy_hal_common::peripherals! {
|
||||||
// RTC
|
// RTC
|
||||||
RTC0,
|
RTC0,
|
||||||
RTC1,
|
RTC1,
|
||||||
|
@ -3,7 +3,7 @@ pub use nrf52810_pac as pac;
|
|||||||
pub const EASY_DMA_SIZE: usize = (1 << 10) - 1;
|
pub const EASY_DMA_SIZE: usize = (1 << 10) - 1;
|
||||||
pub const FORCE_COPY_BUFFER_SIZE: usize = 256;
|
pub const FORCE_COPY_BUFFER_SIZE: usize = 256;
|
||||||
|
|
||||||
embassy_extras::peripherals! {
|
embassy_hal_common::peripherals! {
|
||||||
// RTC
|
// RTC
|
||||||
RTC0,
|
RTC0,
|
||||||
RTC1,
|
RTC1,
|
||||||
|
@ -3,7 +3,7 @@ pub use nrf52811_pac as pac;
|
|||||||
pub const EASY_DMA_SIZE: usize = (1 << 14) - 1;
|
pub const EASY_DMA_SIZE: usize = (1 << 14) - 1;
|
||||||
pub const FORCE_COPY_BUFFER_SIZE: usize = 256;
|
pub const FORCE_COPY_BUFFER_SIZE: usize = 256;
|
||||||
|
|
||||||
embassy_extras::peripherals! {
|
embassy_hal_common::peripherals! {
|
||||||
// RTC
|
// RTC
|
||||||
RTC0,
|
RTC0,
|
||||||
RTC1,
|
RTC1,
|
||||||
|
@ -3,7 +3,7 @@ pub use nrf52820_pac as pac;
|
|||||||
pub const EASY_DMA_SIZE: usize = (1 << 15) - 1;
|
pub const EASY_DMA_SIZE: usize = (1 << 15) - 1;
|
||||||
pub const FORCE_COPY_BUFFER_SIZE: usize = 512;
|
pub const FORCE_COPY_BUFFER_SIZE: usize = 512;
|
||||||
|
|
||||||
embassy_extras::peripherals! {
|
embassy_hal_common::peripherals! {
|
||||||
// RTC
|
// RTC
|
||||||
RTC0,
|
RTC0,
|
||||||
RTC1,
|
RTC1,
|
||||||
|
@ -3,7 +3,7 @@ pub use nrf52832_pac as pac;
|
|||||||
pub const EASY_DMA_SIZE: usize = (1 << 8) - 1;
|
pub const EASY_DMA_SIZE: usize = (1 << 8) - 1;
|
||||||
pub const FORCE_COPY_BUFFER_SIZE: usize = 255;
|
pub const FORCE_COPY_BUFFER_SIZE: usize = 255;
|
||||||
|
|
||||||
embassy_extras::peripherals! {
|
embassy_hal_common::peripherals! {
|
||||||
// RTC
|
// RTC
|
||||||
RTC0,
|
RTC0,
|
||||||
RTC1,
|
RTC1,
|
||||||
|
@ -3,7 +3,7 @@ pub use nrf52833_pac as pac;
|
|||||||
pub const EASY_DMA_SIZE: usize = (1 << 16) - 1;
|
pub const EASY_DMA_SIZE: usize = (1 << 16) - 1;
|
||||||
pub const FORCE_COPY_BUFFER_SIZE: usize = 512;
|
pub const FORCE_COPY_BUFFER_SIZE: usize = 512;
|
||||||
|
|
||||||
embassy_extras::peripherals! {
|
embassy_hal_common::peripherals! {
|
||||||
// RTC
|
// RTC
|
||||||
RTC0,
|
RTC0,
|
||||||
RTC1,
|
RTC1,
|
||||||
|
@ -3,7 +3,7 @@ pub use nrf52840_pac as pac;
|
|||||||
pub const EASY_DMA_SIZE: usize = (1 << 16) - 1;
|
pub const EASY_DMA_SIZE: usize = (1 << 16) - 1;
|
||||||
pub const FORCE_COPY_BUFFER_SIZE: usize = 512;
|
pub const FORCE_COPY_BUFFER_SIZE: usize = 512;
|
||||||
|
|
||||||
embassy_extras::peripherals! {
|
embassy_hal_common::peripherals! {
|
||||||
// RTC
|
// RTC
|
||||||
RTC0,
|
RTC0,
|
||||||
RTC1,
|
RTC1,
|
||||||
|
@ -5,7 +5,7 @@ use core::hint::unreachable_unchecked;
|
|||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
|
|
||||||
use embassy::util::Unborrow;
|
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 embedded_hal::digital::v2::{InputPin, OutputPin, StatefulOutputPin};
|
||||||
use gpio::pin_cnf::DRIVE_A;
|
use gpio::pin_cnf::DRIVE_A;
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ use core::task::{Context, Poll};
|
|||||||
use embassy::interrupt::{Interrupt, InterruptExt};
|
use embassy::interrupt::{Interrupt, InterruptExt};
|
||||||
use embassy::traits::gpio::{WaitForAnyEdge, WaitForHigh, WaitForLow};
|
use embassy::traits::gpio::{WaitForAnyEdge, WaitForHigh, WaitForLow};
|
||||||
use embassy::util::AtomicWaker;
|
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 embedded_hal::digital::v2::{InputPin, StatefulOutputPin};
|
||||||
use futures::future::poll_fn;
|
use futures::future::poll_fn;
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ pub mod interrupt {
|
|||||||
pub use crate::chip::irqs::*;
|
pub use crate::chip::irqs::*;
|
||||||
pub use cortex_m::interrupt::{CriticalSection, Mutex};
|
pub use cortex_m::interrupt::{CriticalSection, Mutex};
|
||||||
pub use embassy::interrupt::{declare, take, Interrupt};
|
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;
|
pub use embassy_macros::interrupt;
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use core::ptr::NonNull;
|
use core::ptr::NonNull;
|
||||||
use embassy::util::Unborrow;
|
use embassy::util::Unborrow;
|
||||||
use embassy_extras::{unborrow, unsafe_impl_unborrow};
|
use embassy_hal_common::{unborrow, unsafe_impl_unborrow};
|
||||||
|
|
||||||
use crate::{pac, peripherals};
|
use crate::{pac, peripherals};
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ use core::cell::UnsafeCell;
|
|||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use core::sync::atomic::{compiler_fence, Ordering};
|
use core::sync::atomic::{compiler_fence, Ordering};
|
||||||
use embassy::util::Unborrow;
|
use embassy::util::Unborrow;
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
|
|
||||||
use crate::gpio::sealed::Pin as _;
|
use crate::gpio::sealed::Pin as _;
|
||||||
use crate::gpio::OptionalPin as GpioOptionalPin;
|
use crate::gpio::OptionalPin as GpioOptionalPin;
|
||||||
|
@ -7,7 +7,7 @@ use core::task::Poll;
|
|||||||
use embassy::interrupt::{Interrupt, InterruptExt};
|
use embassy::interrupt::{Interrupt, InterruptExt};
|
||||||
use embassy::traits::flash::{Error, Flash};
|
use embassy::traits::flash::{Error, Flash};
|
||||||
use embassy::util::{AtomicWaker, DropBomb, Unborrow};
|
use embassy::util::{AtomicWaker, DropBomb, Unborrow};
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use futures::future::poll_fn;
|
use futures::future::poll_fn;
|
||||||
|
|
||||||
use crate::gpio::sealed::Pin as _;
|
use crate::gpio::sealed::Pin as _;
|
||||||
|
@ -11,7 +11,7 @@ use embassy::traits;
|
|||||||
use embassy::util::AtomicWaker;
|
use embassy::util::AtomicWaker;
|
||||||
use embassy::util::OnDrop;
|
use embassy::util::OnDrop;
|
||||||
use embassy::util::Unborrow;
|
use embassy::util::Unborrow;
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use futures::future::poll_fn;
|
use futures::future::poll_fn;
|
||||||
use rand_core::RngCore;
|
use rand_core::RngCore;
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ use core::marker::PhantomData;
|
|||||||
use core::sync::atomic::{compiler_fence, Ordering};
|
use core::sync::atomic::{compiler_fence, Ordering};
|
||||||
use core::task::Poll;
|
use core::task::Poll;
|
||||||
use embassy::util::{wake_on_interrupt, Unborrow};
|
use embassy::util::{wake_on_interrupt, Unborrow};
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use futures::future::poll_fn;
|
use futures::future::poll_fn;
|
||||||
|
|
||||||
use crate::interrupt;
|
use crate::interrupt;
|
||||||
|
@ -7,7 +7,7 @@ use core::task::Poll;
|
|||||||
use embassy::interrupt::InterruptExt;
|
use embassy::interrupt::InterruptExt;
|
||||||
use embassy::traits;
|
use embassy::traits;
|
||||||
use embassy::util::{AtomicWaker, Unborrow};
|
use embassy::util::{AtomicWaker, Unborrow};
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use futures::future::poll_fn;
|
use futures::future::poll_fn;
|
||||||
use traits::spi::{FullDuplex, Read, Spi, Write};
|
use traits::spi::{FullDuplex, Read, Spi, Write};
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ use embassy::interrupt::Interrupt;
|
|||||||
use embassy::interrupt::InterruptExt;
|
use embassy::interrupt::InterruptExt;
|
||||||
use embassy::util::OnDrop;
|
use embassy::util::OnDrop;
|
||||||
use embassy::util::Unborrow;
|
use embassy::util::Unborrow;
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use futures::future::poll_fn;
|
use futures::future::poll_fn;
|
||||||
|
|
||||||
use crate::pac;
|
use crate::pac;
|
||||||
|
@ -13,7 +13,7 @@ use core::task::Poll;
|
|||||||
use embassy::interrupt::{Interrupt, InterruptExt};
|
use embassy::interrupt::{Interrupt, InterruptExt};
|
||||||
use embassy::traits;
|
use embassy::traits;
|
||||||
use embassy::util::{AtomicWaker, Unborrow};
|
use embassy::util::{AtomicWaker, Unborrow};
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use futures::future::poll_fn;
|
use futures::future::poll_fn;
|
||||||
use traits::i2c::I2c;
|
use traits::i2c::I2c;
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ use core::task::Poll;
|
|||||||
use embassy::interrupt::InterruptExt;
|
use embassy::interrupt::InterruptExt;
|
||||||
use embassy::traits::uart::{Error, Read, ReadUntilIdle, Write};
|
use embassy::traits::uart::{Error, Read, ReadUntilIdle, Write};
|
||||||
use embassy::util::{AtomicWaker, OnDrop, Unborrow};
|
use embassy::util::{AtomicWaker, OnDrop, Unborrow};
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use futures::future::poll_fn;
|
use futures::future::poll_fn;
|
||||||
|
|
||||||
use crate::chip::EASY_DMA_SIZE;
|
use crate::chip::EASY_DMA_SIZE;
|
||||||
|
@ -20,7 +20,7 @@ defmt-error = [ ]
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
embassy = { version = "0.1.0", path = "../embassy", features = [ "time-tick-1mhz" ] }
|
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"]}
|
embassy-macros = { version = "0.1.0", path = "../embassy-macros", features = ["rp"]}
|
||||||
|
|
||||||
defmt = { version = "0.2.0", optional = true }
|
defmt = { version = "0.2.0", optional = true }
|
||||||
|
@ -6,7 +6,7 @@ use crate::pac::SIO;
|
|||||||
use crate::peripherals;
|
use crate::peripherals;
|
||||||
|
|
||||||
use embassy::util::Unborrow;
|
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;
|
use embedded_hal::digital::v2 as digital;
|
||||||
|
|
||||||
/// Represents a digital input or output level.
|
/// Represents a digital input or output level.
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
// Re-exports
|
// Re-exports
|
||||||
pub use embassy::interrupt::{declare, take, Interrupt};
|
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 {
|
mod irqs {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
@ -25,7 +25,7 @@ pub mod uart;
|
|||||||
mod clocks;
|
mod clocks;
|
||||||
mod reset;
|
mod reset;
|
||||||
|
|
||||||
embassy_extras::peripherals! {
|
embassy_hal_common::peripherals! {
|
||||||
PIN_0,
|
PIN_0,
|
||||||
PIN_1,
|
PIN_1,
|
||||||
PIN_2,
|
PIN_2,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
|
|
||||||
use embassy::util::Unborrow;
|
use embassy::util::Unborrow;
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use embedded_hal::blocking::spi as eh;
|
use embedded_hal::blocking::spi as eh;
|
||||||
use embedded_hal::spi as ehnb;
|
use embedded_hal::spi as ehnb;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
|
|
||||||
use embassy::util::Unborrow;
|
use embassy::util::Unborrow;
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use gpio::Pin;
|
use gpio::Pin;
|
||||||
|
|
||||||
use crate::{gpio, pac, peripherals};
|
use crate::{gpio, pac, peripherals};
|
||||||
|
@ -8,7 +8,7 @@ resolver = "2"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
embassy = { version = "0.1.0", path = "../embassy", features = ["time-tick-32768hz"] }
|
embassy = { version = "0.1.0", path = "../embassy", features = ["time-tick-32768hz"] }
|
||||||
embassy-macros = { version = "0.1.0", path = "../embassy-macros", features = ["stm32"] }
|
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-traits = {version = "0.1.0", path = "../embassy-traits" }
|
||||||
embassy-net = { version = "0.1.0", path = "../embassy-net", default-features = false, optional = true }
|
embassy-net = { version = "0.1.0", path = "../embassy-net", default-features = false, optional = true }
|
||||||
|
|
||||||
|
@ -85,4 +85,4 @@ with open(output_file, 'w') as f:
|
|||||||
for (channel_id, defn) in core['dma_channels'].items():
|
for (channel_id, defn) in core['dma_channels'].items():
|
||||||
singletons.append( channel_id )
|
singletons.append( channel_id )
|
||||||
|
|
||||||
f.write(f"embassy_extras::peripherals!({','.join(singletons)});")
|
f.write(f"embassy_hal_common::peripherals!({','.join(singletons)});")
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use crate::adc::{AdcPin, Instance};
|
use crate::adc::{AdcPin, Instance};
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use embassy::util::Unborrow;
|
use embassy::util::Unborrow;
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use embedded_hal::blocking::delay::DelayUs;
|
use embedded_hal::blocking::delay::DelayUs;
|
||||||
|
|
||||||
pub const VDDA_CALIB_MV: u32 = 3000;
|
pub const VDDA_CALIB_MV: u32 = 3000;
|
||||||
|
@ -3,7 +3,7 @@ use crate::gpio::AnyPin;
|
|||||||
use crate::pac::dac;
|
use crate::pac::dac;
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use embassy::util::Unborrow;
|
use embassy::util::Unborrow;
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
|
@ -4,8 +4,8 @@ use core::sync::atomic::{fence, Ordering};
|
|||||||
use core::task::Waker;
|
use core::task::Waker;
|
||||||
|
|
||||||
use embassy::util::{AtomicWaker, Unborrow};
|
use embassy::util::{AtomicWaker, Unborrow};
|
||||||
use embassy_extras::peripheral::{PeripheralMutex, PeripheralState};
|
use embassy_hal_common::peripheral::{PeripheralMutex, PeripheralState};
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use embassy_net::{Device, DeviceCapabilities, LinkState, PacketBuf, MTU};
|
use embassy_net::{Device, DeviceCapabilities, LinkState, PacketBuf, MTU};
|
||||||
|
|
||||||
use crate::gpio::sealed::Pin as __GpioPin;
|
use crate::gpio::sealed::Pin as __GpioPin;
|
||||||
|
@ -42,7 +42,7 @@ mod _version;
|
|||||||
pub use _version::*;
|
pub use _version::*;
|
||||||
|
|
||||||
use crate::peripherals;
|
use crate::peripherals;
|
||||||
use embassy_extras::unsafe_impl_unborrow;
|
use embassy_hal_common::unsafe_impl_unborrow;
|
||||||
|
|
||||||
pub(crate) mod sealed {
|
pub(crate) mod sealed {
|
||||||
pub trait Channel {}
|
pub trait Channel {}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
use core::convert::Infallible;
|
use core::convert::Infallible;
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use embassy::util::Unborrow;
|
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 embedded_hal::digital::v2::{toggleable, InputPin, OutputPin, StatefulOutputPin};
|
||||||
|
|
||||||
use crate::pac;
|
use crate::pac;
|
||||||
|
@ -2,7 +2,7 @@ use crate::i2c::{Error, Instance, SclPin, SdaPin};
|
|||||||
use crate::time::Hertz;
|
use crate::time::Hertz;
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use embassy::util::Unborrow;
|
use embassy::util::Unborrow;
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use embedded_hal::blocking::i2c::Read;
|
use embedded_hal::blocking::i2c::Read;
|
||||||
use embedded_hal::blocking::i2c::Write;
|
use embedded_hal::blocking::i2c::Write;
|
||||||
use embedded_hal::blocking::i2c::WriteRead;
|
use embedded_hal::blocking::i2c::WriteRead;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use core::cmp;
|
use core::cmp;
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use embassy::util::Unborrow;
|
use embassy::util::Unborrow;
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use embedded_hal::blocking::i2c::Read;
|
use embedded_hal::blocking::i2c::Read;
|
||||||
use embedded_hal::blocking::i2c::Write;
|
use embedded_hal::blocking::i2c::Write;
|
||||||
use embedded_hal::blocking::i2c::WriteRead;
|
use embedded_hal::blocking::i2c::WriteRead;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
pub use bare_metal::Mutex;
|
pub use bare_metal::Mutex;
|
||||||
pub use critical_section::CriticalSection;
|
pub use critical_section::CriticalSection;
|
||||||
pub use embassy::interrupt::{take, Interrupt};
|
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 crate::pac::Interrupt as InterruptEnum;
|
||||||
use embassy::interrupt::declare;
|
use embassy::interrupt::declare;
|
||||||
|
@ -6,7 +6,7 @@ use crate::time::Hertz;
|
|||||||
use crate::time::U32Ext;
|
use crate::time::U32Ext;
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use embassy::util::Unborrow;
|
use embassy::util::Unborrow;
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use pac::rcc::vals::{Hpre, Ppre, Sw};
|
use pac::rcc::vals::{Hpre, Ppre, Sw};
|
||||||
|
|
||||||
/// Most of clock setup is copied from stm32l0xx-hal, and adopted to the generated PAC,
|
/// Most of clock setup is copied from stm32l0xx-hal, and adopted to the generated PAC,
|
||||||
|
@ -6,7 +6,7 @@ use crate::time::Hertz;
|
|||||||
use crate::time::U32Ext;
|
use crate::time::U32Ext;
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use embassy::util::Unborrow;
|
use embassy::util::Unborrow;
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use pac::rcc::vals::{Hpre, Msirange, Plldiv, Pllmul, Pllsrc, Ppre, Sw};
|
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,
|
/// Most of clock setup is copied from stm32l0xx-hal, and adopted to the generated PAC,
|
||||||
|
@ -6,7 +6,7 @@ use crate::time::Hertz;
|
|||||||
use crate::time::U32Ext;
|
use crate::time::U32Ext;
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use embassy::util::Unborrow;
|
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,
|
/// 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.
|
/// and with the addition of the init function to configure a system clock.
|
||||||
|
@ -6,7 +6,7 @@ use crate::time::Hertz;
|
|||||||
use crate::time::U32Ext;
|
use crate::time::U32Ext;
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use embassy::util::Unborrow;
|
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,
|
/// 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.
|
/// and with the addition of the init function to configure a system clock.
|
||||||
|
@ -6,7 +6,7 @@ use crate::time::Hertz;
|
|||||||
use crate::time::U32Ext;
|
use crate::time::U32Ext;
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use embassy::util::Unborrow;
|
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,
|
/// 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.
|
/// and with the addition of the init function to configure a system clock.
|
||||||
|
@ -4,7 +4,7 @@ use core::future::Future;
|
|||||||
use core::task::Poll;
|
use core::task::Poll;
|
||||||
use embassy::traits;
|
use embassy::traits;
|
||||||
use embassy::util::{AtomicWaker, Unborrow};
|
use embassy::util::{AtomicWaker, Unborrow};
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use futures::future::poll_fn;
|
use futures::future::poll_fn;
|
||||||
use rand_core::{CryptoRng, RngCore};
|
use rand_core::{CryptoRng, RngCore};
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ use core::task::Poll;
|
|||||||
|
|
||||||
use embassy::interrupt::InterruptExt;
|
use embassy::interrupt::InterruptExt;
|
||||||
use embassy::util::{AtomicWaker, OnDrop, Unborrow};
|
use embassy::util::{AtomicWaker, OnDrop, Unborrow};
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use futures::future::poll_fn;
|
use futures::future::poll_fn;
|
||||||
use sdio_host::{BusWidth, CardCapacity, CardStatus, CurrentState, SDStatus, CID, CSD, OCR, SCR};
|
use sdio_host::{BusWidth, CardCapacity, CardStatus, CurrentState, SDStatus, CID, CSD, OCR, SCR};
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ use core::future::Future;
|
|||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use core::ptr;
|
use core::ptr;
|
||||||
use embassy::util::Unborrow;
|
use embassy::util::Unborrow;
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use embassy_traits::spi as traits;
|
use embassy_traits::spi as traits;
|
||||||
pub use embedded_hal::spi::{Mode, Phase, Polarity, MODE_0, MODE_1, MODE_2, MODE_3};
|
pub use embedded_hal::spi::{Mode, Phase, Polarity, MODE_0, MODE_1, MODE_2, MODE_3};
|
||||||
use futures::future::join3;
|
use futures::future::join3;
|
||||||
|
@ -14,7 +14,7 @@ use core::future::Future;
|
|||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use core::ptr;
|
use core::ptr;
|
||||||
use embassy::util::Unborrow;
|
use embassy::util::Unborrow;
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use embassy_traits::spi as traits;
|
use embassy_traits::spi as traits;
|
||||||
pub use embedded_hal::spi::{Mode, Phase, Polarity, MODE_0, MODE_1, MODE_2, MODE_3};
|
pub use embedded_hal::spi::{Mode, Phase, Polarity, MODE_0, MODE_1, MODE_2, MODE_3};
|
||||||
use futures::future::join3;
|
use futures::future::join3;
|
||||||
|
@ -14,7 +14,7 @@ use core::future::Future;
|
|||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use core::ptr;
|
use core::ptr;
|
||||||
use embassy::util::Unborrow;
|
use embassy::util::Unborrow;
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use embassy_traits::spi as traits;
|
use embassy_traits::spi as traits;
|
||||||
pub use embedded_hal::spi::{Mode, Phase, Polarity, MODE_0, MODE_1, MODE_2, MODE_3};
|
pub use embedded_hal::spi::{Mode, Phase, Polarity, MODE_0, MODE_1, MODE_2, MODE_3};
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use core::future::Future;
|
use core::future::Future;
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use embassy::util::Unborrow;
|
use embassy::util::Unborrow;
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use futures::TryFutureExt;
|
use futures::TryFutureExt;
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use core::future::Future;
|
use core::future::Future;
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use embassy::util::Unborrow;
|
use embassy::util::Unborrow;
|
||||||
use embassy_extras::unborrow;
|
use embassy_hal_common::unborrow;
|
||||||
use futures::TryFutureExt;
|
use futures::TryFutureExt;
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
@ -20,7 +20,7 @@ defmt-error = []
|
|||||||
embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] }
|
embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] }
|
||||||
embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] }
|
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-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 = "0.2.0"
|
||||||
defmt-rtt = "0.2.0"
|
defmt-rtt = "0.2.0"
|
||||||
|
@ -20,7 +20,7 @@ defmt-error = []
|
|||||||
embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] }
|
embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] }
|
||||||
embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] }
|
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-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"] }
|
embassy-net = { path = "../../embassy-net", default-features = false, features = ["defmt-debug", "defmt", "tcp", "medium-ethernet", "pool-16"] }
|
||||||
stm32-metapac = { path = "../../stm32-metapac", features = ["stm32h743zi"] }
|
stm32-metapac = { path = "../../stm32-metapac", features = ["stm32h743zi"] }
|
||||||
embassy-macros = { path = "../../embassy-macros" }
|
embassy-macros = { path = "../../embassy-macros" }
|
||||||
|
@ -20,7 +20,7 @@ defmt-error = []
|
|||||||
embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] }
|
embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] }
|
||||||
embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] }
|
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-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 = "0.2.0"
|
||||||
defmt-rtt = "0.2.0"
|
defmt-rtt = "0.2.0"
|
||||||
|
@ -20,7 +20,7 @@ defmt-error = []
|
|||||||
embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] }
|
embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] }
|
||||||
embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] }
|
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-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 = "0.2.0"
|
||||||
defmt-rtt = "0.2.0"
|
defmt-rtt = "0.2.0"
|
||||||
|
@ -20,7 +20,7 @@ defmt-error = []
|
|||||||
embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] }
|
embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-trace"] }
|
||||||
embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] }
|
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-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 = "0.2.0"
|
||||||
defmt-rtt = "0.2.0"
|
defmt-rtt = "0.2.0"
|
||||||
|
Loading…
Reference in New Issue
Block a user