aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/examples/_0_zero_tasks.rs2
-rw-r--r--src/examples/_1_one_task.rs1
-rw-r--r--src/examples/_2_two_tasks.rs1
-rw-r--r--src/examples/_3_preemption.rs1
-rw-r--r--src/examples/_4_nested.rs12
-rw-r--r--src/examples/_5_late_resources.rs1
-rw-r--r--src/examples/_6_safe_static_mut_ref.rs1
-rw-r--r--src/examples/_7_generics.rs3
-rw-r--r--src/examples/_8_full_syntax.rs3
-rw-r--r--src/lib.rs1
10 files changed, 9 insertions, 17 deletions
diff --git a/src/examples/_0_zero_tasks.rs b/src/examples/_0_zero_tasks.rs
index 90f16d48..0484bb9d 100644
--- a/src/examples/_0_zero_tasks.rs
+++ b/src/examples/_0_zero_tasks.rs
@@ -3,8 +3,6 @@
//! ```
//! #![deny(unsafe_code)]
//! #![deny(warnings)]
-//! // IMPORTANT always include this feature gate
-//! #![feature(proc_macro)]
//! #![no_std]
//!
//! extern crate cortex_m_rtfm as rtfm; // IMPORTANT always do this rename
diff --git a/src/examples/_1_one_task.rs b/src/examples/_1_one_task.rs
index c9004e86..b9075a59 100644
--- a/src/examples/_1_one_task.rs
+++ b/src/examples/_1_one_task.rs
@@ -3,7 +3,6 @@
//! ```
//! #![deny(unsafe_code)]
//! #![deny(warnings)]
-//! #![feature(proc_macro)]
//! #![no_std]
//!
//! extern crate cortex_m;
diff --git a/src/examples/_2_two_tasks.rs b/src/examples/_2_two_tasks.rs
index cf6b33d6..516ff0c9 100644
--- a/src/examples/_2_two_tasks.rs
+++ b/src/examples/_2_two_tasks.rs
@@ -3,7 +3,6 @@
//! ```
//! #![deny(unsafe_code)]
//! #![deny(warnings)]
-//! #![feature(proc_macro)]
//! #![no_std]
//!
//! extern crate cortex_m_rtfm as rtfm;
diff --git a/src/examples/_3_preemption.rs b/src/examples/_3_preemption.rs
index 4360185a..14c9d925 100644
--- a/src/examples/_3_preemption.rs
+++ b/src/examples/_3_preemption.rs
@@ -3,7 +3,6 @@
//! ```
//! #![deny(unsafe_code)]
//! #![deny(warnings)]
-//! #![feature(proc_macro)]
//! #![no_std]
//!
//! extern crate cortex_m_rtfm as rtfm;
diff --git a/src/examples/_4_nested.rs b/src/examples/_4_nested.rs
index e211cf87..26f8fd84 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
diff --git a/src/examples/_5_late_resources.rs b/src/examples/_5_late_resources.rs
index 8958e854..7ab90a4e 100644
--- a/src/examples/_5_late_resources.rs
+++ b/src/examples/_5_late_resources.rs
@@ -3,7 +3,6 @@
//! ```
//! #![deny(unsafe_code)]
//! #![deny(warnings)]
-//! #![feature(proc_macro)]
//! #![no_std]
//!
//! extern crate cortex_m_rtfm as rtfm;
diff --git a/src/examples/_6_safe_static_mut_ref.rs b/src/examples/_6_safe_static_mut_ref.rs
index 32eb3d98..8f7267f5 100644
--- a/src/examples/_6_safe_static_mut_ref.rs
+++ b/src/examples/_6_safe_static_mut_ref.rs
@@ -3,7 +3,6 @@
//! ```
//! #![deny(unsafe_code)]
//! #![deny(warnings)]
-//! #![feature(proc_macro)]
//! #![no_std]
//!
//! extern crate cortex_m_rtfm as rtfm;
diff --git a/src/examples/_7_generics.rs b/src/examples/_7_generics.rs
index 22bb777a..5dafdbf2 100644
--- a/src/examples/_7_generics.rs
+++ b/src/examples/_7_generics.rs
@@ -3,14 +3,13 @@
//! ```
//! #![deny(unsafe_code)]
//! #![deny(warnings)]
-//! #![feature(proc_macro)]
//! #![no_std]
//!
//! extern crate cortex_m_rtfm as rtfm;
//! extern crate stm32f103xx;
//!
//! use rtfm::{app, Resource, Threshold};
-//! use stm32f103xx::{SPI1, GPIOA};
+//! use stm32f103xx::{GPIOA, SPI1};
//!
//! app! {
//! device: stm32f103xx,
diff --git a/src/examples/_8_full_syntax.rs b/src/examples/_8_full_syntax.rs
index f8db4087..cc7fbc22 100644
--- a/src/examples/_8_full_syntax.rs
+++ b/src/examples/_8_full_syntax.rs
@@ -3,7 +3,6 @@
//! ```
//! #![deny(unsafe_code)]
//! #![deny(warnings)]
-//! #![feature(proc_macro)]
//! #![no_std]
//!
//! extern crate cortex_m_rtfm as rtfm;
@@ -62,7 +61,7 @@
//!
//! pub fn idle(t: &mut Threshold, mut r: ::idle::Resources) -> ! {
//! loop {
-//! *r.OWNED != *r.OWNED;
+//! *r.OWNED = !*r.OWNED;
//!
//! if *r.OWNED {
//! if r.SHARED.claim(t, |shared, _| *shared) {
diff --git a/src/lib.rs b/src/lib.rs
index 8e5884ca..9d558875 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -79,7 +79,6 @@
//! [rtfm]: http://www.diva-portal.org/smash/get/diva2:1005680/FULLTEXT01.pdf
#![deny(missing_docs)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m;