diff options
author | Brian Cully <bjc@kublai.com> | 2019-07-30 09:48:19 -0400 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2019-07-30 09:48:19 -0400 |
commit | d94d88faa9c0e1a5c18b21962964dfdda3011a1d (patch) | |
tree | c6b55724f512b0ca221ccf5925006c7e568a2991 /usbh/src/pipe/ctrl_pipe.rs | |
parent | c20e974373e9daeb81278794bc73033b88eb756c (diff) | |
download | samd21-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.rs | 2 |
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 { |