parent
1db551dc9d
commit
e15a7c7bec
1 changed files with 33 additions and 27 deletions
10
src/main.rs
10
src/main.rs
|
@ -9,6 +9,8 @@ mod input_filter;
|
|||
mod stick;
|
||||
mod usb_comms;
|
||||
|
||||
use core::ptr::addr_of_mut;
|
||||
|
||||
use config::config_task;
|
||||
use defmt::info;
|
||||
use embassy_executor::Executor;
|
||||
|
@ -72,7 +74,10 @@ fn main() -> ! {
|
|||
let spi_acs = Output::new(AnyPin::from(p_acs), Level::High); // active low
|
||||
let spi_ccs = Output::new(AnyPin::from(p_ccs), Level::High); // active low
|
||||
|
||||
spawn_core1(p.CORE1, unsafe { &mut CORE1_STACK }, move || {
|
||||
spawn_core1(
|
||||
p.CORE1,
|
||||
unsafe { addr_of_mut!(CORE1_STACK).as_mut().unwrap() },
|
||||
move || {
|
||||
let executor1 = EXECUTOR1.init(Executor::new());
|
||||
executor1.run(|spawner| {
|
||||
spawner.spawn(usb_transfer_task(uid, driver)).unwrap();
|
||||
|
@ -98,7 +103,8 @@ fn main() -> ! {
|
|||
))
|
||||
.unwrap()
|
||||
});
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
let executor0 = EXECUTOR0.init(Executor::new());
|
||||
info!("Initialized.");
|
||||
|
|
Loading…
Add table
Reference in a new issue