pub trait DpAccess {
// Required methods
fn read_dp_register<R: DpRegister>(
&mut self,
dp: DpAddress,
) -> Result<R, ArmError>;
fn write_dp_register<R: DpRegister>(
&mut self,
dp: DpAddress,
register: R,
) -> Result<(), ArmError>;
}
Expand description
A typed interface to be implemented on drivers that can control a debug port.
Required Methods§
Sourcefn read_dp_register<R: DpRegister>(
&mut self,
dp: DpAddress,
) -> Result<R, ArmError>
fn read_dp_register<R: DpRegister>( &mut self, dp: DpAddress, ) -> Result<R, ArmError>
Reads a debug port register.
If the target device has multiple debug ports, this will change the active debug port if necessary. In this case all pending operations will be run, and errors returned by this function can also be from these operations.
Sourcefn write_dp_register<R: DpRegister>(
&mut self,
dp: DpAddress,
register: R,
) -> Result<(), ArmError>
fn write_dp_register<R: DpRegister>( &mut self, dp: DpAddress, register: R, ) -> Result<(), ArmError>
Write a debug port register.
If the target device has multiple debug ports, this will change the active debug port if necessary. In this case all pending operations will be run, and errors returned by this function can also be from these operations.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.