File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ pub fn interrupt(peripherals: &[Peripheral], items: &mut Vec<Tokens>) {
197197 } ) => {
198198 #[ allow( non_snake_case) ]
199199 mod $NAME {
200- pub struct Locals {
200+ pub struct Local {
201201 $(
202202 pub $lvar: $lty,
203203 ) *
@@ -210,16 +210,16 @@ pub fn interrupt(peripherals: &[Peripheral], items: &mut Vec<Tokens>) {
210210 // check that the handler exists
211211 let _ = $crate :: interrupt:: Interrupt :: $NAME ;
212212
213- static mut LOCALS : self :: $NAME :: Locals =
214- self :: $NAME :: Locals {
213+ static mut LOCAL : self :: $NAME :: Local =
214+ self :: $NAME :: Local {
215215 $(
216216 $lvar: $lval,
217217 ) *
218218 } ;
219219
220220 // type checking
221- let f: fn ( & mut self :: $NAME :: Locals ) = $f;
222- f( unsafe { & mut LOCALS } ) ;
221+ let f: fn ( & mut self :: $NAME :: Local ) = $f;
222+ f( unsafe { & mut LOCAL } ) ;
223223 }
224224 } ;
225225 ( $NAME : ident, $f: ident) => {
Original file line number Diff line number Diff line change 364364/// function that will be used as the handler of that interrupt. That function
365365/// must have signature `fn()`.
366366///
367- /// Optionally a third argument may be used to declare static variables local to
368- /// this interrupt handler. The handler will have exclusive access to these
369- /// variables on each invocation. If the third argument is used then the
370- /// signature of the handler function must be `fn(&mut $NAME::Local)` where
371- /// `$NAME` is the first argument passed to the macro.
367+ /// Optionally, a third argument may be used to declare interrupt local data.
368+ /// The handler will have exclusive access to this data on each invocation. If
369+ /// the third argument is used then the signature of the handler function must
370+ /// be `fn(&mut $NAME::Local)` where `$NAME` is the first argument passed to the
371+ /// macro.
372372///
373373/// # Example
374374///
You can’t perform that action at this time.
0 commit comments