aboutsummaryrefslogtreecommitdiff
path: root/book/en/src/migration
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-04-22 12:57:54 +0000
committerGitHub <noreply@github.com>2021-04-22 12:57:54 +0000
commitfecbe85381d45f813e464b3e3a7ae86244936f7e (patch)
treee27b299dd215b00979dd2291e3fa550f4d0baa3d /book/en/src/migration
parent426662b1982e5ab1e3ddad8ef6fa702a74cd0280 (diff)
parent1d5f1295443a5ebc2ed63dd368996d13845d07c6 (diff)
Merge #480
480: book/migration/v5: update init signature, fix example syntax r=korken89 a=tmplt From the comment in #478. The example now migrates from v5 to v6 instead of an incorrect v6 syntax to a another incorrect v6 syntax. Co-authored-by: Viktor Sonesten <v@tmplt.dev>
Diffstat (limited to 'book/en/src/migration')
-rw-r--r--book/en/src/migration/migration_v5.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/book/en/src/migration/migration_v5.md b/book/en/src/migration/migration_v5.md
index 8edefd2..04cb20e 100644
--- a/book/en/src/migration/migration_v5.md
+++ b/book/en/src/migration/migration_v5.md
@@ -71,14 +71,14 @@ From this:
``` rust
#[rtic::app(device = lm3s6965)]
-mod app {
+const APP: () = {
#[init]
fn init(_: init::Context) {
rtic::pend(Interrupt::UART0);
}
// [more code]
-}
+};
```
to this:
@@ -87,10 +87,10 @@ to this:
#[rtic::app(device = lm3s6965)]
mod app {
#[init]
- fn init(_: init::Context) -> init::LateResources {
+ fn init(_: init::Context) -> (init::LateResources, init::Monotonics) {
rtic::pend(Interrupt::UART0);
- init::LateResources {}
+ (init::LateResources {}, init::Monotonics())
}
// [more code]