Skip to content

Commit ff5fa67

Browse files
committed
Fix example in doc comment
1 parent f8155a1 commit ff5fa67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rp2040-hal/src/multicore.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//! ```no_run
1111
//! use rp2040_hal::{pac, gpio::Pins, sio::Sio, multicore::{Multicore, Stack}};
1212
//!
13-
//! static mut CORE1_STACK: Stack<4096> = Stack::new();
13+
//! static CORE1_STACK: Stack<4096> = Stack::new();
1414
//!
1515
//! fn core1_task() {
1616
//! loop {}
@@ -23,7 +23,7 @@
2323
//! let mut mc = Multicore::new(&mut pac.PSM, &mut pac.PPB, &mut sio.fifo);
2424
//! let cores = mc.cores();
2525
//! let core1 = &mut cores[1];
26-
//! let _test = core1.spawn(unsafe { &mut CORE1_STACK.mem }, core1_task);
26+
//! let _test = core1.spawn(CORE1_STACK.take().unwrap(), core1_task);
2727
//! // The rest of your application below this line
2828
//! # loop {}
2929
//! }

0 commit comments

Comments
 (0)