probe_rs::architecture::arm::ap

Trait ApAccess

Source
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§

Source

fn read_ap_register<PORT, R>(&mut self, port: &PORT) -> Result<R, ArmError>
where PORT: AccessPortType + ApRegAccess<R> + ?Sized, R: Register,

Read a register of the access port.

Source

fn read_ap_register_repeated<PORT, R>( &mut self, port: &PORT, values: &mut [u32], ) -> Result<(), ArmError>
where PORT: AccessPortType + ApRegAccess<R> + ?Sized, R: Register,

Read a register of the access port using a block transfer. This can be used to read multiple values from the same register.

Source

fn write_ap_register<PORT, R>( &mut self, port: &PORT, register: R, ) -> Result<(), ArmError>
where PORT: AccessPortType + ApRegAccess<R> + ?Sized, R: Register,

Write a register of the access port.

Source

fn write_ap_register_repeated<PORT, R>( &mut self, port: &PORT, values: &[u32], ) -> Result<(), ArmError>
where PORT: AccessPortType + ApRegAccess<R> + ?Sized, R: Register,

Write a register of the access port using a block transfer. This can be used to write multiple values to the same register.

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.

Implementors§