aboutsummaryrefslogtreecommitdiff
path: root/book/en/src/internals/non-reentrancy.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/non-reentrancy.md
parent163edd7579222560caf6598cf8071f4201c277c5 (diff)
Add migration to 0.6 along with updated documentation
Diffstat (limited to 'book/en/src/internals/non-reentrancy.md')
-rw-r--r--book/en/src/internals/non-reentrancy.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/book/en/src/internals/non-reentrancy.md b/book/en/src/internals/non-reentrancy.md
index 0b0e4a7..17b34d0 100644
--- a/book/en/src/internals/non-reentrancy.md
+++ b/book/en/src/internals/non-reentrancy.md
@@ -12,7 +12,7 @@ are discouraged from directly invoking an interrupt handler.
``` rust
#[rtic::app(device = ..)]
-const APP: () = {
+mod app {
#[init]
fn init(c: init::Context) { .. }
@@ -39,7 +39,7 @@ const APP: () = {
// in aliasing of the static variable `X`
unsafe { UART0() }
}
-};
+}
```
The RTIC framework must generate the interrupt handler code that calls the user
@@ -57,7 +57,7 @@ fn bar(c: bar::Context) {
// .. user code ..
}
-const APP: () = {
+mod app {
// everything in this block is not visible to user code
#[no_mangle]
@@ -69,7 +69,7 @@ const APP: () = {
unsafe fn USART1() {
bar(..);
}
-};
+}
```
## By hardware