aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-rt/examples/state.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cortex-m-rt/examples/state.rs')
-rw-r--r--cortex-m-rt/examples/state.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/cortex-m-rt/examples/state.rs b/cortex-m-rt/examples/state.rs
index 72ca194..573914f 100644
--- a/cortex-m-rt/examples/state.rs
+++ b/cortex-m-rt/examples/state.rs
@@ -16,7 +16,9 @@ fn main() -> ! {
}
// exception handler with state
-#[exception(SysTick, static STATE: u32 = 0)]
-fn sys_tick() {
+#[exception]
+fn SysTick() {
+ static mut STATE: u32 = 0;
+
*STATE += 1;
}