From e85d6e53c89cd1ea1da8826778c5a74154fb651d Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Thu, 27 Jul 2017 22:40:47 -0500 Subject: update examples --- examples/generics.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'examples/generics.rs') diff --git a/examples/generics.rs b/examples/generics.rs index 6c6e1d6..57c9b8e 100644 --- a/examples/generics.rs +++ b/examples/generics.rs @@ -1,5 +1,4 @@ //! Working with resources in a generic fashion - #![deny(unsafe_code)] #![feature(proc_macro)] #![no_std] @@ -36,7 +35,7 @@ fn idle() -> ! { } } -// a generic function to use resources in any task (regardless of its priority) +// A generic function that uses some resources fn work(t: &mut Threshold, gpioa: &G, spi1: &S) where G: Resource, @@ -53,12 +52,12 @@ where }); } -// this task needs critical sections to access the resources +// This task needs critical sections to access the resources fn exti0(t: &mut Threshold, r: EXTI0::Resources) { work(t, &r.GPIOA, &r.SPI1); } -// this task has direct access to the resources +// This task has direct access to the resources fn exti1(t: &mut Threshold, r: EXTI1::Resources) { work(t, r.GPIOA, r.SPI1); } -- cgit v1.2.3