diff options
author | Brian Cully <bjc@kublai.com> | 2019-09-23 12:45:09 -0400 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2019-09-24 10:55:25 -0400 |
commit | fcc6951c707144ba423b81e03bc2f34b6cfa7286 (patch) | |
tree | 574f64eb11e23920343137e352eb1279f1940a5d /src/pipe.rs | |
parent | 77d1fdf044326cfb039728bf94a998f1dd1e8d1e (diff) | |
download | atsamd-usb-host-fcc6951c707144ba423b81e03bc2f34b6cfa7286.tar.gz atsamd-usb-host-fcc6951c707144ba423b81e03bc2f34b6cfa7286.zip |
Mark pipe descriptor register memory as volatile.
Most of the values in the descriptor memory can be modified by the
hardware, so we need to tell Rust that.
Also, refactor the common register setup code into `register.rs`.
Diffstat (limited to 'src/pipe.rs')
-rw-r--r-- | src/pipe.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pipe.rs b/src/pipe.rs index 3715149..84e4435 100644 --- a/src/pipe.rs +++ b/src/pipe.rs @@ -6,6 +6,7 @@ pub mod ctrl_pipe; pub mod ext_reg; #[allow(unused)] pub mod pck_size; +pub mod register; #[allow(unused)] pub mod status_bk; #[allow(unused)] @@ -728,7 +729,7 @@ impl PipeDesc { } } -#[repr(C, packed)] +#[repr(C)] // 16 bytes per bank. pub(crate) struct BankDesc { pub addr: Addr, |