From d94d88faa9c0e1a5c18b21962964dfdda3011a1d Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Tue, 30 Jul 2019 09:48:19 -0400 Subject: Use `repr(packed)` on pipe descriptors structure. Ensure offsets and sizes are correct with tests. --- usbh/src/pipe/ctrl_pipe.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usbh/src/pipe/ctrl_pipe.rs') 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 { -- cgit v1.2.3