This commit is contained in:
Emil Fresk 2020-12-13 17:48:11 +01:00
parent 6277183906
commit aaa92ea2fa
3 changed files with 47 additions and 63 deletions

View file

@ -204,10 +204,6 @@ pub fn codegen(
items.push(quote!(
#(#cfgs)*
pub fn spawn(#(#args,)*) -> Result<(), #ty> {
// #let_instant // do we need it?
use rtic::Mutex as _;
use rtic::mutex_prelude::*;
let input = #tupled;
unsafe {
@ -277,9 +273,6 @@ pub fn codegen(
#(,#args)*
) -> Result<(), #ty> {
unsafe {
use rtic::Mutex as _;
use rtic::mutex_prelude::*;
let input = #tupled;
if let Some(index) = rtic::export::interrupt::free(|_| #app_path::#fq.dequeue()) {
#app_path::#inputs

View file

@ -68,8 +68,6 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
// Timer queue handler
{
let enum_ = util::interrupt_ident();
let app_name = &app.name;
let app_path = quote! {crate::#app_name};
let rt_err = util::rt_err_ident();
let arms = app
@ -111,8 +109,6 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
items.push(quote!(
#[no_mangle]
unsafe fn #bound_interrupt() {
use rtic::Mutex as _;
while let Some((task, index)) = rtic::export::interrupt::free(|_| #tq.dequeue(
|| #enable_isr,
))