aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-rt/examples/state.rs
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2018-08-31 22:02:29 +0200
committerGravatar Jorge Aparicio <jorge@japaric.io> 2018-08-31 22:02:29 +0200
commitf68e65af8fa0bf915209ae7b3d75303c317ea109 (patch)
tree736cdd0a577040a0fd9ac3f26951305dabd2f43d /cortex-m-rt/examples/state.rs
parentf2a155a0715cb99cbace2eca7ab5fcfa93d106d2 (diff)
downloadcortex-m-f68e65af8fa0bf915209ae7b3d75303c317ea109.tar.gz
cortex-m-f68e65af8fa0bf915209ae7b3d75303c317ea109.tar.zst
cortex-m-f68e65af8fa0bf915209ae7b3d75303c317ea109.zip
fix soundness issue; change the syntax of the `exception` attribute
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;
}