aboutsummaryrefslogtreecommitdiff
path: root/examples/shared.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/shared.rs')
-rw-r--r--examples/shared.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/shared.rs b/examples/shared.rs
index 58d64e41..b43a19a3 100644
--- a/examples/shared.rs
+++ b/examples/shared.rs
@@ -2,6 +2,7 @@
#![deny(unsafe_code)]
#![deny(warnings)]
+#![deny(missing_docs)]
#![no_main]
#![no_std]
@@ -15,7 +16,9 @@ mod app {
#[shared]
struct Shared {
+ /// Producer
p: Producer<'static, u32, 5>,
+ /// Consumer
c: Consumer<'static, u32, 5>,
}
g'> The basepri register appears to be aviable on thumbv8m.main but not thumbv8m.base. At the very least, attempting to compile against a Cortex-M23 based Microchip ATSAML10E16A generates an error: ``` error[E0432]: unresolved import `cortex_m::register::basepri` --> /Users/dwatson/.cargo/registry/src/github.com-1ecc6299db9ec823/cortex-m-rtic-1.1.3/src/export.rs:25:5 | 25 | use cortex_m::register::basepri; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `basepri` in `register` ``` This is an attempt to account for the fact that thumbv8m.base (M23) MCUs don't have the BASEPRI register but have more than 32 interrupts. This moves away from the architecture specific config flags and switches to a more functional flag. Make the mask size depend on the max interrupt id Rather than assuming a fixed interrupt count of 32 this code uses an array of u32 bitmasks to calculate the priority mask. The size of this array is calculated at compile time based on the size of the largest interrupt id being used in the target code. For thumbv6m this should be equivalent to the previous version that used a single u32 mask. For thumbv8m.base it will be larger depending on the interrupts used. Don't write 0s to the ISER and ICER registers Writing 0s to these registers is a no-op. Since these masks should be calculated at compile time, this conditional should result in writes being optimized out of the code. Prevent panic on non-arm targets Panicking on unknown targets was breaking things like the doc build on linux. This change should only panic when building on unknown arm targets. 2022-07-27Update CHANGELOG.mdGravatar Gabriel Górski 1-0/+2 2022-07-27Fix missing formattingGravatar Gabriel Górski 2-4/+2 2022-07-06Allow custom `link_section` attributes for late resourcesGravatar Gabriel Górski 2-3/+17 This commit makes RTIC aware of user-provided `link_section` attributes, letting user override default section mapping. 2022-06-23Release RTIC v1.1.3Gravatar Henrik Tjäder 2-20/+13 2022-06-23Bump rtic-syntax to v1.0.2 and fix ChangelogGravatar Henrik Tjäder 3-4/+35 2022-06-07fix ci: use SYST::PTRGravatar Jorge Aparicio 1-2/+2 SYST::ptr has been deprecated in cortex-m v0.7.5 SYST::PTR is available since cortex-m v0.7.0 2022-05-24Fix macros to Rust 2021Gravatar Emil Fresk 2-3/+3 2022-05-24Fix clash with defmtGravatar Emil Fresk 4-6/+12 2022-05-17More ergonomic error from static asserts messagesGravatar Emil Fresk 2-6/+33 2022-05-10Fixed warning from Rust AnalyzerGravatar Emil Fresk 2-3/+3 2022-05-09Prepare v1.1.2Gravatar Emil Fresk 3-5/+15