aboutsummaryrefslogtreecommitdiff
path: root/examples/one-task.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/one-task.rs')
-rw-r--r--examples/one-task.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/one-task.rs b/examples/one-task.rs
index 2e776768..07def59b 100644
--- a/examples/one-task.rs
+++ b/examples/one-task.rs
@@ -77,11 +77,11 @@ fn idle() -> ! {
// `r` is the set of resources this task has access to. `SYS_TICK::Resources`
// has one field per resource declared in `app!`.
#[allow(unsafe_code)]
-fn sys_tick(_t: &mut Threshold, r: SYS_TICK::Resources) {
+fn sys_tick(_t: &mut Threshold, mut r: SYS_TICK::Resources) {
// toggle state
- **r.ON = !**r.ON;
+ *r.ON = !*r.ON;
- if **r.ON {
+ if *r.ON {
// set the pin PC13 high
// NOTE(unsafe) atomic write to a stateless register
unsafe {