diff options
Diffstat (limited to 'board')
| -rw-r--r-- | board/Cargo.toml | 2 | ||||
| -rw-r--r-- | board/src/shared/imxrt10xx.rs | 2 | ||||
| -rw-r--r-- | board/src/shared/imxrt11xx.rs | 2 | ||||
| -rw-r--r-- | board/src/teensy4.rs | 8 |
4 files changed, 7 insertions, 7 deletions
diff --git a/board/Cargo.toml b/board/Cargo.toml index 9afdfb0..836230c 100644 --- a/board/Cargo.toml +++ b/board/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "board" version = "0.1.0" -edition = "2021" +edition = "2024" publish = false [dependencies.cfg-if] diff --git a/board/src/shared/imxrt10xx.rs b/board/src/shared/imxrt10xx.rs index 5ba44eb..71a9065 100644 --- a/board/src/shared/imxrt10xx.rs +++ b/board/src/shared/imxrt10xx.rs @@ -4,7 +4,7 @@ use crate::ral; pub(crate) fn prepare_pit(timer_delay_microseconds: u32) -> Option<crate::Pit> { #[cfg(feature = "rtic")] { - extern "C" { + unsafe extern "C" { // Not actually mut in cortex-m. But, no one is reading it... static __INTERRUPTS: [core::cell::UnsafeCell<unsafe extern "C" fn()>; 240]; fn PIT(); diff --git a/board/src/shared/imxrt11xx.rs b/board/src/shared/imxrt11xx.rs index e0d1074..2620157 100644 --- a/board/src/shared/imxrt11xx.rs +++ b/board/src/shared/imxrt11xx.rs @@ -5,7 +5,7 @@ use crate::ral; pub(crate) fn prepare_pit(timer_delay_microseconds: u32) -> Option<crate::Pit> { #[cfg(feature = "rtic")] { - extern "C" { + unsafe extern "C" { // Not actually mut in cortex-m. But, no one is reading it... static __INTERRUPTS: [core::cell::UnsafeCell<unsafe extern "C" fn()>; 240]; fn PIT(); diff --git a/board/src/teensy4.rs b/board/src/teensy4.rs index 2aaee82..cf1f734 100644 --- a/board/src/teensy4.rs +++ b/board/src/teensy4.rs @@ -38,15 +38,15 @@ pub fn prepare(timer_delay_microseconds: u32) -> Option<crate::Resources> { /// Dummy DCD section containing a single NOP command (for testing linker scripts). #[cfg(feature = "__dcd")] -#[link_section = ".dcd"] -#[no_mangle] +#[unsafe(link_section = ".dcd")] +#[unsafe(no_mangle)] #[used] pub static DEVICE_CONFIGURATION_DATA: [u8; 8] = [0xD2, 0x00, 0x08, 0x41, 0xC0, 0x00, 0x04, 0x00]; /// Ditto but incorrect size (not a multiple of 4 bytes). The linker script should catch this error /// and fail the build. #[cfg(feature = "__dcd_missize")] -#[link_section = ".dcd"] -#[no_mangle] +#[unsafe(link_section = ".dcd")] +#[unsafe(no_mangle)] #[used] pub static DEVICE_CONFIGURATION_DATA: [u8; 7] = [0xD2, 0x00, 0x08, 0x41, 0xC0, 0x00, 0x04]; |
