forked from M-Labs/zynq-rs
replace #[repr(packed)] with #[repr(C)]
avoids warnings regarding unsafe behaviour
This commit is contained in:
parent
fdc6c38de6
commit
1e540a1175
|
@ -16,7 +16,7 @@ pub trait Register {
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! register {
|
macro_rules! register {
|
||||||
($mod_name: ident, $struct_name: ident, $inner: ty) => (
|
($mod_name: ident, $struct_name: ident, $inner: ty) => (
|
||||||
#[repr(packed)]
|
#[repr(C)]
|
||||||
pub struct $struct_name {
|
pub struct $struct_name {
|
||||||
inner: RW<$inner>,
|
inner: RW<$inner>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ pub enum ParityMode {
|
||||||
ForceTo1 = 0b011,
|
ForceTo1 = 0b011,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[repr(packed)]
|
#[repr(C)]
|
||||||
pub struct RegisterBlock {
|
pub struct RegisterBlock {
|
||||||
control: Control,
|
control: Control,
|
||||||
mode: Mode,
|
mode: Mode,
|
||||||
|
|
Loading…
Reference in New Issue