Skip to content

Commit f2e69e8

Browse files
committed
Locals -> Local
1 parent 05482a8 commit f2e69e8

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/generate.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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) => {

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -364,11 +364,11 @@
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
///

0 commit comments

Comments
 (0)