ci: fix nrf, rp tests.
This commit is contained in:
@ -575,6 +575,7 @@ mod ram_helpers {
|
||||
#[inline(never)]
|
||||
#[link_section = ".data.ram_func"]
|
||||
unsafe fn read_flash_inner(cmd: FlashCommand, ptrs: *const FlashFunctionPointers) {
|
||||
#[cfg(target_arch = "arm")]
|
||||
core::arch::asm!(
|
||||
"mov r10, r0", // cmd
|
||||
"mov r5, r1", // ptrs
|
||||
|
@ -61,16 +61,17 @@ macro_rules! intrinsics_aliases {
|
||||
/// Like the compiler-builtins macro, it accepts a series of functions that
|
||||
/// looks like normal Rust code:
|
||||
///
|
||||
/// intrinsics! {
|
||||
/// extern "C" fn foo(a: i32) -> u32 {
|
||||
/// // ...
|
||||
/// }
|
||||
///
|
||||
/// #[nonstandard_attribute]
|
||||
/// extern "C" fn bar(a: i32) -> u32 {
|
||||
/// // ...
|
||||
/// }
|
||||
/// ```rust,ignore
|
||||
/// intrinsics! {
|
||||
/// extern "C" fn foo(a: i32) -> u32 {
|
||||
/// // ...
|
||||
/// }
|
||||
/// #[nonstandard_attribute]
|
||||
/// extern "C" fn bar(a: i32) -> u32 {
|
||||
/// // ...
|
||||
/// }
|
||||
/// }
|
||||
/// ```
|
||||
///
|
||||
/// Each function can also be decorated with nonstandard attributes to control
|
||||
/// additional behaviour:
|
||||
|
@ -9,22 +9,41 @@
|
||||
//! the `embassy-sync` primitives and `CriticalSectionRawMutex`.
|
||||
//!
|
||||
//! # Usage
|
||||
//!
|
||||
//! ```no_run
|
||||
//! # #![feature(type_alias_impl_trait)]
|
||||
//! use embassy_rp::multicore::Stack;
|
||||
//! use static_cell::StaticCell;
|
||||
//! use embassy_executor::Executor;
|
||||
//!
|
||||
//! static mut CORE1_STACK: Stack<4096> = Stack::new();
|
||||
//! static EXECUTOR0: StaticCell<Executor> = StaticCell::new();
|
||||
//! static EXECUTOR1: StaticCell<Executor> = StaticCell::new();
|
||||
//!
|
||||
//! # // workaround weird error: `main` function not found in crate `rust_out`
|
||||
//! # let _ = ();
|
||||
//!
|
||||
//! #[embassy_executor::task]
|
||||
//! async fn core0_task() {
|
||||
//! // ...
|
||||
//! }
|
||||
//!
|
||||
//! #[embassy_executor::task]
|
||||
//! async fn core1_task() {
|
||||
//! // ...
|
||||
//! }
|
||||
//!
|
||||
//! #[cortex_m_rt::entry]
|
||||
//! fn main() -> ! {
|
||||
//! let p = embassy_rp::init(Default::default());
|
||||
//!
|
||||
//! spawn_core1(p.CORE1, unsafe { &mut CORE1_STACK }, move || {
|
||||
//! embassy_rp::multicore::spawn_core1(p.CORE1, unsafe { &mut CORE1_STACK }, move || {
|
||||
//! let executor1 = EXECUTOR1.init(Executor::new());
|
||||
//! executor1.run(|spawner| unwrap!(spawner.spawn(core1_task())));
|
||||
//! executor1.run(|spawner| spawner.spawn(core1_task()).unwrap());
|
||||
//! });
|
||||
//!
|
||||
//! let executor0 = EXECUTOR0.init(Executor::new());
|
||||
//! executor0.run(|spawner| unwrap!(spawner.spawn(core0_task())));
|
||||
//! executor0.run(|spawner| spawner.spawn(core0_task()).unwrap())
|
||||
//! }
|
||||
//! ```
|
||||
|
||||
|
@ -121,7 +121,7 @@ impl<'d, T: Instance> RealTimeClock<'d, T> {
|
||||
/// # #[cfg(not(feature = "chrono"))]
|
||||
/// # fn main() {
|
||||
/// # use embassy_rp::rtc::{RealTimeClock, DateTimeFilter};
|
||||
/// # let mut real_time_clock: RealTimeClock = unsafe { core::mem::zeroed() };
|
||||
/// # let mut real_time_clock: RealTimeClock<embassy_rp::peripherals::RTC> = unsafe { core::mem::zeroed() };
|
||||
/// let now = real_time_clock.now().unwrap();
|
||||
/// real_time_clock.schedule_alarm(
|
||||
/// DateTimeFilter::default()
|
||||
|
Reference in New Issue
Block a user