Add repr(transparent) to Reg struct
To guarantee that the register has the proper layout so that the cast
of an integer to a *const RegisterBlock is sound.
@@ -34,6 +34,7 @@ pub trait Resettable: RegisterSpec {
}
/// This structure provides volatile access to registers.
+#[repr(transparent)]
pub struct Reg<REG: RegisterSpec> {
register: vcell::VolatileCell<REG::Ux>,
_marker: marker::PhantomData<REG>,
