aboutsummaryrefslogtreecommitdiff
path: root/embassy-rp/src/lib.rs
diff options
context:
space:
mode:
authorCaleb Jamison <[email protected]>2024-08-12 04:32:31 -0400
committerCaleb Jamison <[email protected]>2024-08-12 04:32:31 -0400
commit778241fd71b8a0cb541d23b69c3f9e47ec2753ff (patch)
tree101e75f936463a8d3dc6a6f123d4484210717be4 /embassy-rp/src/lib.rs
parent9dc4375f185d5098d9b61116bb5c5279e7298222 (diff)
Fix CI, rename private feature, address comments from dirbaio.
Diffstat (limited to 'embassy-rp/src/lib.rs')
-rw-r--r--embassy-rp/src/lib.rs18
1 files changed, 13 insertions, 5 deletions
diff --git a/embassy-rp/src/lib.rs b/embassy-rp/src/lib.rs
index 0bcc58b86..dc54c1bfe 100644
--- a/embassy-rp/src/lib.rs
+++ b/embassy-rp/src/lib.rs
@@ -15,9 +15,9 @@ mod critical_section_impl;
15mod intrinsics; 15mod intrinsics;
16 16
17pub mod adc; 17pub mod adc;
18#[cfg(feature = "rp235x")] 18#[cfg(feature = "_rp235x")]
19pub mod binary_info; 19pub mod binary_info;
20#[cfg(feature = "rp235x")] 20#[cfg(feature = "_rp235x")]
21pub mod block; 21pub mod block;
22#[cfg(feature = "rp2040")] 22#[cfg(feature = "rp2040")]
23pub mod bootsel; 23pub mod bootsel;
@@ -92,7 +92,7 @@ embassy_hal_internal::interrupt_mod!(
92 SWI_IRQ_5, 92 SWI_IRQ_5,
93); 93);
94 94
95#[cfg(feature = "rp235x")] 95#[cfg(feature = "_rp235x")]
96embassy_hal_internal::interrupt_mod!( 96embassy_hal_internal::interrupt_mod!(
97 TIMER0_IRQ_0, 97 TIMER0_IRQ_0,
98 TIMER0_IRQ_1, 98 TIMER0_IRQ_1,
@@ -267,7 +267,7 @@ embassy_hal_internal::peripherals! {
267 BOOTSEL, 267 BOOTSEL,
268} 268}
269 269
270#[cfg(feature = "rp235x")] 270#[cfg(feature = "_rp235x")]
271embassy_hal_internal::peripherals! { 271embassy_hal_internal::peripherals! {
272 PIN_0, 272 PIN_0,
273 PIN_1, 273 PIN_1,
@@ -497,7 +497,7 @@ fn install_stack_guard(stack_bottom: *mut usize) -> Result<(), ()> {
497 Ok(()) 497 Ok(())
498} 498}
499 499
500#[cfg(feature = "rp235x")] 500#[cfg(all(feature = "_rp235x", armv8m))]
501#[inline(always)] 501#[inline(always)]
502fn install_stack_guard(stack_bottom: *mut usize) -> Result<(), ()> { 502fn install_stack_guard(stack_bottom: *mut usize) -> Result<(), ()> {
503 let core = unsafe { cortex_m::Peripherals::steal() }; 503 let core = unsafe { cortex_m::Peripherals::steal() };
@@ -515,6 +515,14 @@ fn install_stack_guard(stack_bottom: *mut usize) -> Result<(), ()> {
515 Ok(()) 515 Ok(())
516} 516}
517 517
518// This is to hack around cortex_m defaulting to ARMv7 when building tests,
519// so the compile fails when we try to use ARMv8 peripherals.
520#[cfg(all(feature = "_rp235x", not(armv8m)))]
521#[inline(always)]
522fn install_stack_guard(stack_bottom: *mut usize) -> Result<(), ()> {
523 Ok(())
524}
525
518/// HAL configuration for RP. 526/// HAL configuration for RP.
519pub mod config { 527pub mod config {
520 use crate::clocks::ClockConfig; 528 use crate::clocks::ClockConfig;