aboutsummaryrefslogtreecommitdiff
path: root/examples/full-syntax.rs
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2017-12-09 14:43:29 +0100
committerGravatar Jorge Aparicio <jorge@japaric.io> 2017-12-09 17:17:56 +0100
commita6dd004113fcbc03ffacacc519d742ee84886c1d (patch)
tree66b70421a0ab00ab8a2be2fb990c15223e495535 /examples/full-syntax.rs
parent219e17268018f397ff3c8a41519c8345aeab7f2f (diff)
downloadrtic-a6dd004113fcbc03ffacacc519d742ee84886c1d.tar.gz
rtic-a6dd004113fcbc03ffacacc519d742ee84886c1d.tar.zst
rtic-a6dd004113fcbc03ffacacc519d742ee84886c1d.zip
implement the Resource trait for owned resources
this unbreaks the "generics" example
Diffstat (limited to '')
-rw-r--r--examples/full-syntax.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/full-syntax.rs b/examples/full-syntax.rs
index b84077fb..5b274122 100644
--- a/examples/full-syntax.rs
+++ b/examples/full-syntax.rs
@@ -73,12 +73,12 @@ mod main {
}
}
-fn sys_tick(_t: &mut Threshold, r: SYS_TICK::Resources) {
+fn sys_tick(_t: &mut Threshold, mut r: SYS_TICK::Resources) {
*r.ON = !*r.ON;
*r.CO_OWNED += 1;
}
-fn tim2(_t: &mut Threshold, r: TIM2::Resources) {
+fn tim2(_t: &mut Threshold, mut r: TIM2::Resources) {
*r.CO_OWNED += 1;
}