diff options
| author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-08-24 14:36:59 +0000 |
|---|---|---|
| committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-08-24 14:36:59 +0000 |
| commit | 62a232f5c64890e2d666d23227df1c21675fc863 (patch) | |
| tree | 78dc3e80181da30d331e0ac3634dfa99c4784498 /src/examples/_4_nested.rs | |
| parent | 53dbbad891e1c223ba5b1939e114b37667011f11 (diff) | |
| parent | 90c9f64c5a010944bc1bc4efb308f18e0af9100a (diff) | |
Merge #85
85: fix master r=japaric a=japaric
closes #80
Co-authored-by: Ferdia McKeogh <chocol4te@users.noreply.github.com>
Co-authored-by: Jorge Aparicio <jorge@japaric.io>
Diffstat (limited to 'src/examples/_4_nested.rs')
| -rw-r--r-- | src/examples/_4_nested.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/examples/_4_nested.rs b/src/examples/_4_nested.rs index e211cf8..26f8fd8 100644 --- a/src/examples/_4_nested.rs +++ b/src/examples/_4_nested.rs @@ -6,14 +6,13 @@ //! ``` //! #![deny(unsafe_code)] //! #![deny(warnings)] -//! #![feature(proc_macro)] //! #![no_std] //! //! extern crate cortex_m_rtfm as rtfm; //! extern crate stm32f103xx; //! -//! use stm32f103xx::Interrupt; //! use rtfm::{app, Resource, Threshold}; +//! use stm32f103xx::Interrupt; //! //! app! { //! device: stm32f103xx, @@ -64,7 +63,10 @@ //! #[allow(non_snake_case)] //! fn exti0( //! t: &mut Threshold, -//! EXTI0::Resources { mut LOW, mut HIGH }: EXTI0::Resources, +//! EXTI0::Resources { +//! LOW: mut low, +//! HIGH: mut high, +//! }: EXTI0::Resources, //! ) { //! // Because this task has a priority of 1 the preemption threshold `t` also //! // starts at 1 @@ -76,7 +78,7 @@ //! rtfm::set_pending(Interrupt::EXTI1); // ~> exti1 //! //! // A claim creates a critical section -//! LOW.claim_mut(t, |_low, t| { +//! low.claim_mut(t, |_low, t| { //! // This claim increases the preemption threshold to 2 //! // //! // 2 is just high enough to not race with task `exti1` for access to the @@ -97,7 +99,7 @@ //! rtfm::bkpt(); //! //! // Claims can be nested -//! HIGH.claim_mut(t, |_high, _| { +//! high.claim_mut(t, |_high, _| { //! // This claim increases the preemption threshold to 3 //! //! // Now `exti2` can't preempt this task |
