diff options
author | 2020-10-03 15:30:15 +0200 | |
---|---|---|
committer | 2020-10-03 15:30:15 +0200 | |
commit | f0f982facadab2da5d8cdaf214829a9e19f4249e (patch) | |
tree | d78a35d13ca909718b0187377ef7127cbf0f3feb /examples/init.rs | |
parent | 97eae45fa571ba1c470e9ab649ba7570beb963b0 (diff) | |
download | rtic-f0f982facadab2da5d8cdaf214829a9e19f4249e.tar.gz rtic-f0f982facadab2da5d8cdaf214829a9e19f4249e.tar.zst rtic-f0f982facadab2da5d8cdaf214829a9e19f4249e.zip |
Updated documentation to include the critical section token in init
Diffstat (limited to '')
-rw-r--r-- | examples/init.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/init.rs b/examples/init.rs index 315969f0..1623ca7c 100644 --- a/examples/init.rs +++ b/examples/init.rs @@ -23,6 +23,10 @@ const APP: () = { // Safe access to local `static mut` variable let _x: &'static mut u32 = X; + // Access to the critical section token, + // to indicate that this is a critical seciton + let _cs_token: bare_metal::CriticalSection = cx.cs; + hprintln!("init").unwrap(); debug::exit(debug::EXIT_SUCCESS); |