aboutsummaryrefslogtreecommitdiffstats
path: root/usbh/src/pipe/addr.rs
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2019-07-30 09:48:19 -0400
committerBrian Cully <bjc@kublai.com>2019-07-30 09:48:19 -0400
commitd94d88faa9c0e1a5c18b21962964dfdda3011a1d (patch)
treec6b55724f512b0ca221ccf5925006c7e568a2991 /usbh/src/pipe/addr.rs
parentc20e974373e9daeb81278794bc73033b88eb756c (diff)
downloadsamd21-demo-d94d88faa9c0e1a5c18b21962964dfdda3011a1d.tar.gz
samd21-demo-d94d88faa9c0e1a5c18b21962964dfdda3011a1d.zip
Use `repr(packed)` on pipe descriptors structure.
Ensure offsets and sizes are correct with tests.
Diffstat (limited to 'usbh/src/pipe/addr.rs')
-rw-r--r--usbh/src/pipe/addr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/usbh/src/pipe/addr.rs b/usbh/src/pipe/addr.rs
index 81cef5d..aa26048 100644
--- a/usbh/src/pipe/addr.rs
+++ b/usbh/src/pipe/addr.rs
@@ -5,7 +5,7 @@
/// Reset: 0xxxxxxxxx
/// Property: NA
#[derive(Clone, Copy, Debug)]
-#[repr(C)]
+#[repr(C, packed)]
pub(crate) struct Addr(u32);
pub(crate) struct R {