macros: initialize chip before executor.
The executor will call into the chip's time-driver, which may need the chip to be initialized.
This commit is contained in:
parent
58e9dfbc00
commit
caf48d8a95
@ -370,16 +370,14 @@ pub fn main(args: TokenStream, item: TokenStream) -> TokenStream {
|
|||||||
::core::mem::transmute(t)
|
::core::mem::transmute(t)
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut executor = #embassy_path::executor::Executor::new();
|
|
||||||
|
|
||||||
let executor = unsafe { make_static(&mut executor) };
|
|
||||||
|
|
||||||
#chip_setup
|
#chip_setup
|
||||||
|
|
||||||
|
let mut executor = #embassy_path::executor::Executor::new();
|
||||||
|
let executor = unsafe { make_static(&mut executor) };
|
||||||
|
|
||||||
executor.run(|spawner| {
|
executor.run(|spawner| {
|
||||||
spawner.must_spawn(__embassy_main(spawner, p));
|
spawner.must_spawn(__embassy_main(spawner, p));
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
result.into()
|
result.into()
|
||||||
|
Loading…
Reference in New Issue
Block a user