Skip to content

Commit 213d5e0

Browse files
committed
Use 'a lifetime instead of 'static in InterruptTable type
1 parent da39f95 commit 213d5e0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/interrupts/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ impl<T> InterruptHandle<T> {
124124
/// ```
125125
pub struct InterruptTable<'a> {
126126
_lifetime: PhantomData<&'a ()>,
127-
nvic: &'static mut NVIC,
128-
nvic_stir: &'static mut NVIC_STIR,
127+
nvic: &'a mut NVIC,
128+
nvic_stir: &'a mut NVIC_STIR,
129129
data: [*mut (); 98],
130130
}
131131

@@ -180,8 +180,8 @@ impl<'a> Drop for InterruptTable<'a> {
180180
/// # Panics
181181
/// Panics if an interrupt is enabled and is not disabled after use in `code()`
182182
pub fn scope<'a, F, C, R>(
183-
nvic: &'static mut NVIC,
184-
nvic_stir: &'static mut NVIC_STIR,
183+
nvic: &'a mut NVIC,
184+
nvic_stir: &'a mut NVIC_STIR,
185185
default_handler: F,
186186
code: C,
187187
) -> R

0 commit comments

Comments
 (0)