aboutsummaryrefslogtreecommitdiff
path: root/board/src/teensy4.rs
diff options
context:
space:
mode:
Diffstat (limited to 'board/src/teensy4.rs')
-rw-r--r--board/src/teensy4.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/board/src/teensy4.rs b/board/src/teensy4.rs
index 28587cd..2aaee82 100644
--- a/board/src/teensy4.rs
+++ b/board/src/teensy4.rs
@@ -35,3 +35,18 @@ pub fn prepare(timer_delay_microseconds: u32) -> Option<crate::Resources> {
pit,
})
}
+
+/// Dummy DCD section containing a single NOP command (for testing linker scripts).
+#[cfg(feature = "__dcd")]
+#[link_section = ".dcd"]
+#[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]
+#[used]
+pub static DEVICE_CONFIGURATION_DATA: [u8; 7] = [0xD2, 0x00, 0x08, 0x41, 0xC0, 0x00, 0x04];