update examples

This commit is contained in:
Jorge Aparicio 2017-07-23 20:51:52 -05:00
parent f3b397f460
commit 05feb7b018
2 changed files with 2 additions and 16 deletions

View file

@ -25,9 +25,6 @@ app! {
}, },
idle: { idle: {
locals: {
static COUNTER: u32 = 0;
},
path: idle_, // this is a path to the "idle" function path: idle_, // this is a path to the "idle" function
resources: [OWNED, SHARED], resources: [OWNED, SHARED],
}, },
@ -48,10 +45,8 @@ app! {
fn init_(_p: init::Peripherals, _r: init::Resources) {} fn init_(_p: init::Peripherals, _r: init::Resources) {}
fn idle_(t: &mut Threshold, l: &mut idle::Locals, mut r: idle::Resources) -> ! { fn idle_(t: &mut Threshold, mut r: idle::Resources) -> ! {
loop { loop {
*l.COUNTER += 1;
**r.OWNED != **r.OWNED; **r.OWNED != **r.OWNED;
if **r.OWNED { if **r.OWNED {

View file

@ -25,9 +25,6 @@ app! {
}, },
idle: { idle: {
locals: {
static COUNTER: u32 = 0;
},
path: main::idle, path: main::idle,
resources: [OWNED, SHARED], resources: [OWNED, SHARED],
}, },
@ -51,14 +48,8 @@ mod main {
pub fn init(_p: ::init::Peripherals, _r: ::init::Resources) {} pub fn init(_p: ::init::Peripherals, _r: ::init::Resources) {}
pub fn idle( pub fn idle(t: &mut Threshold, mut r: ::idle::Resources) -> ! {
t: &mut Threshold,
l: &mut ::idle::Locals,
mut r: ::idle::Resources,
) -> ! {
loop { loop {
*l.COUNTER += 1;
**r.OWNED != **r.OWNED; **r.OWNED != **r.OWNED;
if **r.OWNED { if **r.OWNED {