Trait lpc55_hal::traits::reg_proxy::Reg[][src]

pub unsafe trait Reg {
    type Target;
    fn get() -> *const Self::Target;
}
Expand description

Implemented for registers that RegProxy can proxy

Use the reg! macro to implement this trait for a register from a crate generated by svd2rust.

Safety: The pointer returned by get must be valid for the duration of the program.

Associated Types

The type that RegProxy should derefence to

If only one instance of the register exists, this should be Self. If the same type in the svd2rust API is used to represent registers at multiple memory locations, this trait must be implemented for a type that represents a specific register at a specific location, and Target must be the common type.

Required methods

Return a pointer to the memory location of the register

Implementors