aboutsummaryrefslogtreecommitdiff
path: root/book/en/src/internals/late-resources.md
diff options
context:
space:
mode:
authorHenrik Tjäder <henrik@tjaders.com>2020-10-02 09:33:28 +0000
committerHenrik Tjäder <henrik@tjaders.com>2020-10-02 09:33:28 +0000
commit9ca10b0d8c735a06a3a0a3623a7fc5d09b5e948c (patch)
treeb561ce3896bff52207d424982fec1fe859742a85 /book/en/src/internals/late-resources.md
parent163edd7579222560caf6598cf8071f4201c277c5 (diff)
Add migration to 0.6 along with updated documentation
Diffstat (limited to 'book/en/src/internals/late-resources.md')
-rw-r--r--book/en/src/internals/late-resources.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/book/en/src/internals/late-resources.md b/book/en/src/internals/late-resources.md
index ad2a5e5..f3a0b0a 100644
--- a/book/en/src/internals/late-resources.md
+++ b/book/en/src/internals/late-resources.md
@@ -10,7 +10,7 @@ initialize late resources.
``` rust
#[rtic::app(device = ..)]
-const APP: () = {
+mod app {
struct Resources {
x: Thing,
}
@@ -34,7 +34,7 @@ const APP: () = {
}
// ..
-};
+}
```
The code generated by the framework looks like this:
@@ -69,7 +69,7 @@ pub mod foo {
}
/// Implementation details
-const APP: () = {
+mod app {
// uninitialized static
static mut x: MaybeUninit<Thing> = MaybeUninit::uninit();
@@ -101,7 +101,7 @@ const APP: () = {
// ..
})
}
-};
+}
```
An important detail here is that `interrupt::enable` behaves like a *compiler