diff options
Diffstat (limited to 'book/en/deprecated/migration/migration_v4.md')
| -rw-r--r-- | book/en/deprecated/migration/migration_v4.md | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/book/en/deprecated/migration/migration_v4.md b/book/en/deprecated/migration/migration_v4.md index d1a7ebe..f28b6d9 100644 --- a/book/en/deprecated/migration/migration_v4.md +++ b/book/en/deprecated/migration/migration_v4.md @@ -42,7 +42,7 @@ framework: `resources`, `spawn`, `schedule` -- these variables will become fields of the `Context` structure. Each function within the `#[rtfm::app]` item gets a different `Context` type. -``` rust +``` rust,noplayground #[rtfm::app(/* .. */)] const APP: () = { // change this @@ -90,7 +90,7 @@ const APP: () = { The syntax used to declare resources has changed from `static mut` variables to a `struct Resources`. -``` rust +``` rust,noplayground #[rtfm::app(/* .. */)] const APP: () = { // change this @@ -118,7 +118,7 @@ the `device` field of the `init::Context` structure. Change this: -``` rust +``` rust,noplayground #[rtfm::app(/* .. */)] const APP: () = { #[init] @@ -132,7 +132,7 @@ const APP: () = { Into this: -``` rust +``` rust,noplayground #[rtfm::app(/* .. */, peripherals = true)] // ^^^^^^^^^^^^^^^^^^ const APP: () = { @@ -155,7 +155,7 @@ attribute with the `binds` argument instead. Change this: -``` rust +``` rust,noplayground #[rtfm::app(/* .. */)] const APP: () = { // hardware tasks @@ -175,7 +175,7 @@ const APP: () = { Into this: -``` rust +``` rust,noplayground #[rtfm::app(/* .. */)] const APP: () = { #[task(binds = SVCall)] @@ -212,7 +212,7 @@ ensure it is enabled by the application inside `init`. Change this: -``` rust +``` rust,noplayground use rtfm::{Duration, Instant, U32Ext}; #[rtfm::app(/* .. */)] @@ -226,7 +226,7 @@ const APP: () = { Into this: -``` rust +``` rust,noplayground use rtfm::cyccnt::{Duration, Instant, U32Ext}; // ^^^^^^^^ |
