diff options
| author | Caleb Jamison <[email protected]> | 2024-08-12 05:47:16 -0400 |
|---|---|---|
| committer | Caleb Jamison <[email protected]> | 2024-08-12 05:47:16 -0400 |
| commit | 13cb4314725bb60d2252575f8fd06828e8661064 (patch) | |
| tree | 557ea01cb6545b7f3da792f617c1a9b10ff2b85a /embassy-rp/src/lib.rs | |
| parent | 752fbc662a43b677b7ffb7672b01772b28ff4e1f (diff) | |
Enable rp235x doc tests, fixup feature doc
The rp235x doc test requires an unfortunate workaround using a private
feature, "_test", in order compile.
Diffstat (limited to 'embassy-rp/src/lib.rs')
| -rw-r--r-- | embassy-rp/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/embassy-rp/src/lib.rs b/embassy-rp/src/lib.rs index f968572b3..1fc397107 100644 --- a/embassy-rp/src/lib.rs +++ b/embassy-rp/src/lib.rs | |||
| @@ -469,7 +469,7 @@ pub fn install_core0_stack_guard() -> Result<(), ()> { | |||
| 469 | unsafe { install_stack_guard(core::ptr::addr_of_mut!(_stack_end)) } | 469 | unsafe { install_stack_guard(core::ptr::addr_of_mut!(_stack_end)) } |
| 470 | } | 470 | } |
| 471 | 471 | ||
| 472 | #[cfg(feature = "rp2040")] | 472 | #[cfg(all(feature = "rp2040", not(feature = "_test")))] |
| 473 | #[inline(always)] | 473 | #[inline(always)] |
| 474 | fn install_stack_guard(stack_bottom: *mut usize) -> Result<(), ()> { | 474 | fn install_stack_guard(stack_bottom: *mut usize) -> Result<(), ()> { |
| 475 | let core = unsafe { cortex_m::Peripherals::steal() }; | 475 | let core = unsafe { cortex_m::Peripherals::steal() }; |
| @@ -497,7 +497,7 @@ fn install_stack_guard(stack_bottom: *mut usize) -> Result<(), ()> { | |||
| 497 | Ok(()) | 497 | Ok(()) |
| 498 | } | 498 | } |
| 499 | 499 | ||
| 500 | #[cfg(all(feature = "_rp235x", not(test)))] | 500 | #[cfg(all(feature = "_rp235x", not(feature = "_test")))] |
| 501 | #[inline(always)] | 501 | #[inline(always)] |
| 502 | fn install_stack_guard(stack_bottom: *mut usize) -> Result<(), ()> { | 502 | fn install_stack_guard(stack_bottom: *mut usize) -> Result<(), ()> { |
| 503 | let core = unsafe { cortex_m::Peripherals::steal() }; | 503 | let core = unsafe { cortex_m::Peripherals::steal() }; |
| @@ -517,7 +517,7 @@ fn install_stack_guard(stack_bottom: *mut usize) -> Result<(), ()> { | |||
| 517 | 517 | ||
| 518 | // This is to hack around cortex_m defaulting to ARMv7 when building tests, | 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. | 519 | // so the compile fails when we try to use ARMv8 peripherals. |
| 520 | #[cfg(test)] | 520 | #[cfg(feature = "_test")] |
| 521 | #[inline(always)] | 521 | #[inline(always)] |
| 522 | fn install_stack_guard(_stack_bottom: *mut usize) -> Result<(), ()> { | 522 | fn install_stack_guard(_stack_bottom: *mut usize) -> Result<(), ()> { |
| 523 | Ok(()) | 523 | Ok(()) |
