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
1 changed files with 3 additions and 5 deletions
|
@ -370,16 +370,14 @@ pub fn main(args: TokenStream, item: TokenStream) -> TokenStream {
|
|||
::core::mem::transmute(t)
|
||||
}
|
||||
|
||||
let mut executor = #embassy_path::executor::Executor::new();
|
||||
|
||||
let executor = unsafe { make_static(&mut executor) };
|
||||
|
||||
#chip_setup
|
||||
|
||||
let mut executor = #embassy_path::executor::Executor::new();
|
||||
let executor = unsafe { make_static(&mut executor) };
|
||||
|
||||
executor.run(|spawner| {
|
||||
spawner.must_spawn(__embassy_main(spawner, p));
|
||||
})
|
||||
|
||||
}
|
||||
};
|
||||
result.into()
|
||||
|
|
Loading…
Reference in a new issue