aboutsummaryrefslogtreecommitdiffstats
path: root/usbh/src/pipe/ctrl_pipe.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/ctrl_pipe.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/ctrl_pipe.rs')
-rw-r--r--usbh/src/pipe/ctrl_pipe.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/usbh/src/pipe/ctrl_pipe.rs b/usbh/src/pipe/ctrl_pipe.rs
index 63390df..179b615 100644
--- a/usbh/src/pipe/ctrl_pipe.rs
+++ b/usbh/src/pipe/ctrl_pipe.rs
@@ -4,7 +4,7 @@
/// Reset: 0xXXXX
/// Property: PAC Write-Protection, Write-Synchronized, Read-Synchronized
#[derive(Clone, Copy, Debug)]
-#[repr(C)]
+#[repr(C, packed)]
pub(crate) struct CtrlPipe(u16);
pub(crate) struct R {