From 1be43fc489993e63577515063ceb8a83b14423b8 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Thu, 11 Jan 2018 20:56:45 +0100 Subject: adapt to changes in the cortex-m crate --- src/examples/_3_preemption.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/examples/_3_preemption.rs') diff --git a/src/examples/_3_preemption.rs b/src/examples/_3_preemption.rs index 9dc8983..4360185 100644 --- a/src/examples/_3_preemption.rs +++ b/src/examples/_3_preemption.rs @@ -2,6 +2,7 @@ //! //! ``` //! #![deny(unsafe_code)] +//! #![deny(warnings)] //! #![feature(proc_macro)] //! #![no_std] //! @@ -43,12 +44,12 @@ //! } //! } //! -//! fn sys_tick(_t: &mut Threshold, r: SYS_TICK::Resources) { +//! fn sys_tick(_t: &mut Threshold, mut r: SYS_TICK::Resources) { //! // .. //! //! // This task can't be preempted by `tim2` so it has direct access to the //! // resource data -//! **r.COUNTER += 1; +//! *r.COUNTER += 1; //! //! // .. //! } @@ -62,7 +63,7 @@ //! // lead to undefined behavior. //! r.COUNTER.claim_mut(t, |counter, _t| { //! // `claim_mut` creates a critical section -//! **counter += 1; +//! *counter += 1; //! }); //! //! // .. -- cgit v1.2.3