pub trait ApAccess {
// Required methods
fn read_ap_register<PORT, R>(&mut self, port: &PORT) -> Result<R, ArmError>
where PORT: AccessPortType + ApRegAccess<R> + ?Sized,
R: Register;
fn read_ap_register_repeated<PORT, R>(
&mut self,
port: &PORT,
values: &mut [u32],
) -> Result<(), ArmError>
where PORT: AccessPortType + ApRegAccess<R> + ?Sized,
R: Register;
fn write_ap_register<PORT, R>(
&mut self,
port: &PORT,
register: R,
) -> Result<(), ArmError>
where PORT: AccessPortType + ApRegAccess<R> + ?Sized,
R: Register;
fn write_ap_register_repeated<PORT, R>(
&mut self,
port: &PORT,
values: &[u32],
) -> Result<(), ArmError>
where PORT: AccessPortType + ApRegAccess<R> + ?Sized,
R: Register;
}
Expand description
A trait to be implemented by access port drivers to implement access port operations.
Required Methods§
Sourcefn read_ap_register<PORT, R>(&mut self, port: &PORT) -> Result<R, ArmError>
fn read_ap_register<PORT, R>(&mut self, port: &PORT) -> Result<R, ArmError>
Read a register of the access port.
Sourcefn read_ap_register_repeated<PORT, R>(
&mut self,
port: &PORT,
values: &mut [u32],
) -> Result<(), ArmError>
fn read_ap_register_repeated<PORT, R>( &mut self, port: &PORT, values: &mut [u32], ) -> Result<(), ArmError>
Read a register of the access port using a block transfer. This can be used to read multiple values from the same register.
Sourcefn write_ap_register<PORT, R>(
&mut self,
port: &PORT,
register: R,
) -> Result<(), ArmError>
fn write_ap_register<PORT, R>( &mut self, port: &PORT, register: R, ) -> Result<(), ArmError>
Write a register of the access port.
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.