diff options
author | 2017-07-08 21:56:15 -0500 | |
---|---|---|
committer | 2017-07-08 21:56:15 -0500 | |
commit | e18eb9610ea2acab0116a211b6e3ed0d99a2570d (patch) | |
tree | 20b625457d40e14a24893ff1e8a1ff3e88ad5e19 | |
parent | 17b252a8b6ba535727d366e87df1f8ef67ca8540 (diff) | |
download | rtic-e18eb9610ea2acab0116a211b6e3ed0d99a2570d.tar.gz rtic-e18eb9610ea2acab0116a211b6e3ed0d99a2570d.tar.zst rtic-e18eb9610ea2acab0116a211b6e3ed0d99a2570d.zip |
fix unused variable warning around interrupt::free
-rw-r--r-- | macros/src/trans.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/macros/src/trans.rs b/macros/src/trans.rs index b1cf7e79..021cadb8 100644 --- a/macros/src/trans.rs +++ b/macros/src/trans.rs @@ -75,7 +75,7 @@ fn init(app: &App, main: &mut Vec<Tokens>, root: &mut Vec<Tokens>) { Kind::Exception => { if exceptions.is_empty() { exceptions.push(quote! { - let scb = #device::SCB.borrow(cs); + let scb = #device::SCB.borrow(_cs); }); } @@ -89,7 +89,7 @@ fn init(app: &App, main: &mut Vec<Tokens>, root: &mut Vec<Tokens>) { Kind::Interrupt { enabled } => { if interrupts.is_empty() { interrupts.push(quote! { - let nvic = #device::NVIC.borrow(cs); + let nvic = #device::NVIC.borrow(_cs); }); } @@ -118,7 +118,7 @@ fn init(app: &App, main: &mut Vec<Tokens>, root: &mut Vec<Tokens>) { // type check let init: fn(init::Peripherals, init::Resources) = #init; - #krate::atomic(|cs| unsafe { + #krate::atomic(|_cs| unsafe { init(init::Peripherals::all(), init::Resources::new()); #(#exceptions)* |