aboutsummaryrefslogtreecommitdiff
path: root/examples/periodic.rs
diff options
context:
space:
mode:
authorJorge Aparicio <jorge@japaric.io>2019-08-21 10:17:27 +0200
committerJorge Aparicio <jorge@japaric.io>2019-08-21 10:17:27 +0200
commit07b2b4d83078d0fd260d5f0812e8d5a34d02b793 (patch)
treedba2a8e8316e8cd868ccb7b46a80d63c5f61a224 /examples/periodic.rs
parent0e146f8d1142672725b6abb38478f503a9261c80 (diff)
doc up
Diffstat (limited to 'examples/periodic.rs')
-rw-r--r--examples/periodic.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/periodic.rs b/examples/periodic.rs
index b8910db..ec110e1 100644
--- a/examples/periodic.rs
+++ b/examples/periodic.rs
@@ -15,16 +15,16 @@ const PERIOD: u32 = 8_000_000;
#[rtfm::app(device = lm3s6965, monotonic = rtfm::cyccnt::CYCCNT)]
const APP: () = {
#[init(schedule = [foo])]
- fn init(c: init::Context) {
- c.schedule.foo(Instant::now() + PERIOD.cycles()).unwrap();
+ fn init(cx: init::Context) {
+ cx.schedule.foo(Instant::now() + PERIOD.cycles()).unwrap();
}
#[task(schedule = [foo])]
- fn foo(c: foo::Context) {
+ fn foo(cx: foo::Context) {
let now = Instant::now();
- hprintln!("foo(scheduled = {:?}, now = {:?})", c.scheduled, now).unwrap();
+ hprintln!("foo(scheduled = {:?}, now = {:?})", cx.scheduled, now).unwrap();
- c.schedule.foo(c.scheduled + PERIOD.cycles()).unwrap();
+ cx.schedule.foo(cx.scheduled + PERIOD.cycles()).unwrap();
}
extern "C" {