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>) {
197
197
} ) => {
198
198
#[ allow( non_snake_case) ]
199
199
mod $NAME {
200
- pub struct Locals {
200
+ pub struct Local {
201
201
$(
202
202
pub $lvar: $lty,
203
203
) *
@@ -210,16 +210,16 @@ pub fn interrupt(peripherals: &[Peripheral], items: &mut Vec<Tokens>) {
210
210
// check that the handler exists
211
211
let _ = $crate :: interrupt:: Interrupt :: $NAME ;
212
212
213
- static mut LOCALS : self :: $NAME :: Locals =
214
- self :: $NAME :: Locals {
213
+ static mut LOCAL : self :: $NAME :: Local =
214
+ self :: $NAME :: Local {
215
215
$(
216
216
$lvar: $lval,
217
217
) *
218
218
} ;
219
219
220
220
// 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 } ) ;
223
223
}
224
224
} ;
225
225
( $NAME : ident, $f: ident) => {
Original file line number Diff line number Diff line change 364
364
/// function that will be used as the handler of that interrupt. That function
365
365
/// must have signature `fn()`.
366
366
///
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.
372
372
///
373
373
/// # Example
374
374
///
You can’t perform that action at this time.
0 commit comments