aboutsummaryrefslogtreecommitdiff
path: root/embassy-rp/src
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-07-28 13:23:22 +0200
committerGitHub <[email protected]>2023-07-28 13:23:22 +0200
commit036e6ae30c9e772ef8ef20439f121e108b9106f0 (patch)
tree7c654de04304274a11d44733b51c5012aeec9e3c /embassy-rp/src
parent0ced8400d00da30abe76438ef26224c7ed649708 (diff)
Rename embassy-hal-common to embassy-hal-internal, document it's for internal use only. (#1700)
Diffstat (limited to 'embassy-rp/src')
-rw-r--r--embassy-rp/src/adc.rs2
-rw-r--r--embassy-rp/src/clocks.rs2
-rw-r--r--embassy-rp/src/dma.rs2
-rw-r--r--embassy-rp/src/flash.rs2
-rw-r--r--embassy-rp/src/gpio.rs2
-rw-r--r--embassy-rp/src/i2c.rs2
-rw-r--r--embassy-rp/src/lib.rs8
-rw-r--r--embassy-rp/src/pio.rs2
-rw-r--r--embassy-rp/src/pwm.rs2
-rw-r--r--embassy-rp/src/rtc/mod.rs2
-rw-r--r--embassy-rp/src/spi.rs2
-rw-r--r--embassy-rp/src/uart/buffered.rs2
-rw-r--r--embassy-rp/src/uart/mod.rs2
13 files changed, 16 insertions, 16 deletions
diff --git a/embassy-rp/src/adc.rs b/embassy-rp/src/adc.rs
index 95780c068..4fba31169 100644
--- a/embassy-rp/src/adc.rs
+++ b/embassy-rp/src/adc.rs
@@ -3,7 +3,7 @@ use core::marker::PhantomData;
3use core::sync::atomic::{compiler_fence, Ordering}; 3use core::sync::atomic::{compiler_fence, Ordering};
4use core::task::Poll; 4use core::task::Poll;
5 5
6use embassy_hal_common::{into_ref, PeripheralRef}; 6use embassy_hal_internal::{into_ref, PeripheralRef};
7use embassy_sync::waitqueue::AtomicWaker; 7use embassy_sync::waitqueue::AtomicWaker;
8 8
9use crate::gpio::sealed::Pin as GpioPin; 9use crate::gpio::sealed::Pin as GpioPin;
diff --git a/embassy-rp/src/clocks.rs b/embassy-rp/src/clocks.rs
index acb21dce5..976d06de7 100644
--- a/embassy-rp/src/clocks.rs
+++ b/embassy-rp/src/clocks.rs
@@ -1,7 +1,7 @@
1use core::marker::PhantomData; 1use core::marker::PhantomData;
2use core::sync::atomic::{AtomicU16, AtomicU32, Ordering}; 2use core::sync::atomic::{AtomicU16, AtomicU32, Ordering};
3 3
4use embassy_hal_common::{into_ref, PeripheralRef}; 4use embassy_hal_internal::{into_ref, PeripheralRef};
5use pac::clocks::vals::*; 5use pac::clocks::vals::*;
6 6
7use crate::gpio::sealed::Pin; 7use crate::gpio::sealed::Pin;
diff --git a/embassy-rp/src/dma.rs b/embassy-rp/src/dma.rs
index 1a458778c..c8f741804 100644
--- a/embassy-rp/src/dma.rs
+++ b/embassy-rp/src/dma.rs
@@ -4,7 +4,7 @@ use core::pin::Pin;
4use core::sync::atomic::{compiler_fence, Ordering}; 4use core::sync::atomic::{compiler_fence, Ordering};
5use core::task::{Context, Poll}; 5use core::task::{Context, Poll};
6 6
7use embassy_hal_common::{impl_peripheral, into_ref, Peripheral, PeripheralRef}; 7use embassy_hal_internal::{impl_peripheral, into_ref, Peripheral, PeripheralRef};
8use embassy_sync::waitqueue::AtomicWaker; 8use embassy_sync::waitqueue::AtomicWaker;
9use pac::dma::vals::DataSize; 9use pac::dma::vals::DataSize;
10 10
diff --git a/embassy-rp/src/flash.rs b/embassy-rp/src/flash.rs
index 96d2d4541..0ed6808eb 100644
--- a/embassy-rp/src/flash.rs
+++ b/embassy-rp/src/flash.rs
@@ -1,6 +1,6 @@
1use core::marker::PhantomData; 1use core::marker::PhantomData;
2 2
3use embassy_hal_common::Peripheral; 3use embassy_hal_internal::Peripheral;
4use embedded_storage::nor_flash::{ 4use embedded_storage::nor_flash::{
5 check_erase, check_read, check_write, ErrorType, MultiwriteNorFlash, NorFlash, NorFlashError, NorFlashErrorKind, 5 check_erase, check_read, check_write, ErrorType, MultiwriteNorFlash, NorFlash, NorFlashError, NorFlashErrorKind,
6 ReadNorFlash, 6 ReadNorFlash,
diff --git a/embassy-rp/src/gpio.rs b/embassy-rp/src/gpio.rs
index a3d330cdc..2807eb678 100644
--- a/embassy-rp/src/gpio.rs
+++ b/embassy-rp/src/gpio.rs
@@ -3,7 +3,7 @@ use core::future::Future;
3use core::pin::Pin as FuturePin; 3use core::pin::Pin as FuturePin;
4use core::task::{Context, Poll}; 4use core::task::{Context, Poll};
5 5
6use embassy_hal_common::{impl_peripheral, into_ref, PeripheralRef}; 6use embassy_hal_internal::{impl_peripheral, into_ref, PeripheralRef};
7use embassy_sync::waitqueue::AtomicWaker; 7use embassy_sync::waitqueue::AtomicWaker;
8 8
9use crate::interrupt::InterruptExt; 9use crate::interrupt::InterruptExt;
diff --git a/embassy-rp/src/i2c.rs b/embassy-rp/src/i2c.rs
index 9b85b2345..536ad747d 100644
--- a/embassy-rp/src/i2c.rs
+++ b/embassy-rp/src/i2c.rs
@@ -2,7 +2,7 @@ use core::future;
2use core::marker::PhantomData; 2use core::marker::PhantomData;
3use core::task::Poll; 3use core::task::Poll;
4 4
5use embassy_hal_common::{into_ref, PeripheralRef}; 5use embassy_hal_internal::{into_ref, PeripheralRef};
6use embassy_sync::waitqueue::AtomicWaker; 6use embassy_sync::waitqueue::AtomicWaker;
7use pac::i2c; 7use pac::i2c;
8 8
diff --git a/embassy-rp/src/lib.rs b/embassy-rp/src/lib.rs
index 50f028d4c..ebec9fec6 100644
--- a/embassy-rp/src/lib.rs
+++ b/embassy-rp/src/lib.rs
@@ -36,7 +36,7 @@ pub mod pio_instr_util;
36pub mod relocate; 36pub mod relocate;
37 37
38// Reexports 38// Reexports
39pub use embassy_hal_common::{into_ref, Peripheral, PeripheralRef}; 39pub use embassy_hal_internal::{into_ref, Peripheral, PeripheralRef};
40#[cfg(feature = "unstable-pac")] 40#[cfg(feature = "unstable-pac")]
41pub use rp_pac as pac; 41pub use rp_pac as pac;
42#[cfg(not(feature = "unstable-pac"))] 42#[cfg(not(feature = "unstable-pac"))]
@@ -45,7 +45,7 @@ pub(crate) use rp_pac as pac;
45#[cfg(feature = "rt")] 45#[cfg(feature = "rt")]
46pub use crate::pac::NVIC_PRIO_BITS; 46pub use crate::pac::NVIC_PRIO_BITS;
47 47
48embassy_hal_common::interrupt_mod!( 48embassy_hal_internal::interrupt_mod!(
49 TIMER_IRQ_0, 49 TIMER_IRQ_0,
50 TIMER_IRQ_1, 50 TIMER_IRQ_1,
51 TIMER_IRQ_2, 51 TIMER_IRQ_2,
@@ -85,7 +85,7 @@ embassy_hal_common::interrupt_mod!(
85/// This defines the right interrupt handlers, and creates a unit struct (like `struct Irqs;`) 85/// This defines the right interrupt handlers, and creates a unit struct (like `struct Irqs;`)
86/// and implements the right [`Binding`]s for it. You can pass this struct to drivers to 86/// and implements the right [`Binding`]s for it. You can pass this struct to drivers to
87/// prove at compile-time that the right interrupts have been bound. 87/// prove at compile-time that the right interrupts have been bound.
88// developer note: this macro can't be in `embassy-hal-common` due to the use of `$crate`. 88// developer note: this macro can't be in `embassy-hal-internal` due to the use of `$crate`.
89#[macro_export] 89#[macro_export]
90macro_rules! bind_interrupts { 90macro_rules! bind_interrupts {
91 ($vis:vis struct $name:ident { $($irq:ident => $($handler:ty),*;)* }) => { 91 ($vis:vis struct $name:ident { $($irq:ident => $($handler:ty),*;)* }) => {
@@ -107,7 +107,7 @@ macro_rules! bind_interrupts {
107 }; 107 };
108} 108}
109 109
110embassy_hal_common::peripherals! { 110embassy_hal_internal::peripherals! {
111 PIN_0, 111 PIN_0,
112 PIN_1, 112 PIN_1,
113 PIN_2, 113 PIN_2,
diff --git a/embassy-rp/src/pio.rs b/embassy-rp/src/pio.rs
index 72a2f44ed..464988b27 100644
--- a/embassy-rp/src/pio.rs
+++ b/embassy-rp/src/pio.rs
@@ -5,7 +5,7 @@ use core::sync::atomic::{compiler_fence, Ordering};
5use core::task::{Context, Poll}; 5use core::task::{Context, Poll};
6 6
7use atomic_polyfill::{AtomicU32, AtomicU8}; 7use atomic_polyfill::{AtomicU32, AtomicU8};
8use embassy_hal_common::{into_ref, Peripheral, PeripheralRef}; 8use embassy_hal_internal::{into_ref, Peripheral, PeripheralRef};
9use embassy_sync::waitqueue::AtomicWaker; 9use embassy_sync::waitqueue::AtomicWaker;
10use fixed::types::extra::U8; 10use fixed::types::extra::U8;
11use fixed::FixedU32; 11use fixed::FixedU32;
diff --git a/embassy-rp/src/pwm.rs b/embassy-rp/src/pwm.rs
index 20bb88446..c0ddb2a90 100644
--- a/embassy-rp/src/pwm.rs
+++ b/embassy-rp/src/pwm.rs
@@ -1,6 +1,6 @@
1//! Pulse Width Modulation (PWM) 1//! Pulse Width Modulation (PWM)
2 2
3use embassy_hal_common::{into_ref, Peripheral, PeripheralRef}; 3use embassy_hal_internal::{into_ref, Peripheral, PeripheralRef};
4use fixed::traits::ToFixed; 4use fixed::traits::ToFixed;
5use fixed::FixedU16; 5use fixed::FixedU16;
6use pac::pwm::regs::{ChDiv, Intr}; 6use pac::pwm::regs::{ChDiv, Intr};
diff --git a/embassy-rp/src/rtc/mod.rs b/embassy-rp/src/rtc/mod.rs
index 1b33fdf8d..60ca8627b 100644
--- a/embassy-rp/src/rtc/mod.rs
+++ b/embassy-rp/src/rtc/mod.rs
@@ -1,6 +1,6 @@
1mod filter; 1mod filter;
2 2
3use embassy_hal_common::{into_ref, Peripheral, PeripheralRef}; 3use embassy_hal_internal::{into_ref, Peripheral, PeripheralRef};
4 4
5pub use self::filter::DateTimeFilter; 5pub use self::filter::DateTimeFilter;
6 6
diff --git a/embassy-rp/src/spi.rs b/embassy-rp/src/spi.rs
index af101cf4a..544b542e8 100644
--- a/embassy-rp/src/spi.rs
+++ b/embassy-rp/src/spi.rs
@@ -3,7 +3,7 @@ use core::marker::PhantomData;
3 3
4use embassy_embedded_hal::SetConfig; 4use embassy_embedded_hal::SetConfig;
5use embassy_futures::join::join; 5use embassy_futures::join::join;
6use embassy_hal_common::{into_ref, PeripheralRef}; 6use embassy_hal_internal::{into_ref, PeripheralRef};
7pub use embedded_hal_02::spi::{Phase, Polarity}; 7pub use embedded_hal_02::spi::{Phase, Polarity};
8 8
9use crate::dma::{AnyChannel, Channel}; 9use crate::dma::{AnyChannel, Channel};
diff --git a/embassy-rp/src/uart/buffered.rs b/embassy-rp/src/uart/buffered.rs
index 30eeb5476..9d96db12c 100644
--- a/embassy-rp/src/uart/buffered.rs
+++ b/embassy-rp/src/uart/buffered.rs
@@ -3,7 +3,7 @@ use core::slice;
3use core::task::Poll; 3use core::task::Poll;
4 4
5use atomic_polyfill::{AtomicU8, Ordering}; 5use atomic_polyfill::{AtomicU8, Ordering};
6use embassy_hal_common::atomic_ring_buffer::RingBuffer; 6use embassy_hal_internal::atomic_ring_buffer::RingBuffer;
7use embassy_sync::waitqueue::AtomicWaker; 7use embassy_sync::waitqueue::AtomicWaker;
8use embassy_time::{Duration, Timer}; 8use embassy_time::{Duration, Timer};
9 9
diff --git a/embassy-rp/src/uart/mod.rs b/embassy-rp/src/uart/mod.rs
index 7b94bce5e..69c6ac2f1 100644
--- a/embassy-rp/src/uart/mod.rs
+++ b/embassy-rp/src/uart/mod.rs
@@ -4,7 +4,7 @@ use core::task::Poll;
4 4
5use atomic_polyfill::{AtomicU16, Ordering}; 5use atomic_polyfill::{AtomicU16, Ordering};
6use embassy_futures::select::{select, Either}; 6use embassy_futures::select::{select, Either};
7use embassy_hal_common::{into_ref, PeripheralRef}; 7use embassy_hal_internal::{into_ref, PeripheralRef};
8use embassy_sync::waitqueue::AtomicWaker; 8use embassy_sync::waitqueue::AtomicWaker;
9use embassy_time::{Duration, Timer}; 9use embassy_time::{Duration, Timer};
10use pac::uart::regs::Uartris; 10use pac::uart::regs::Uartris;