pub trait ApAccess {
    // Required methods
    fn read_ap_register<PORT, R>(&mut self, port: PORT) -> Result<R, ArmError>
       where PORT: AccessPort,
             R: ApRegister<PORT>;
    fn read_ap_register_repeated<PORT, R>(
        &mut self,
        port: impl Into<PORT> + Clone,
        register: R,
        values: &mut [u32]
    ) -> Result<(), ArmError>
       where PORT: AccessPort,
             R: ApRegister<PORT>;
    fn write_ap_register<PORT, R>(
        &mut self,
        port: impl Into<PORT>,
        register: R
    ) -> Result<(), ArmError>
       where PORT: AccessPort,
             R: ApRegister<PORT>;
    fn write_ap_register_repeated<PORT, R>(
        &mut self,
        port: impl Into<PORT> + Clone,
        register: R,
        values: &[u32]
    ) -> Result<(), ArmError>
       where PORT: AccessPort,
             R: ApRegister<PORT>;
}
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: AccessPort, R: ApRegister<PORT>,

Read a register of the access port.

source

fn read_ap_register_repeated<PORT, R>( &mut self, port: impl Into<PORT> + Clone, register: R, values: &mut [u32] ) -> Result<(), ArmError>
where PORT: AccessPort, R: ApRegister<PORT>,

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: impl Into<PORT>, register: R ) -> Result<(), ArmError>
where PORT: AccessPort, R: ApRegister<PORT>,

Write a register of the access port.

source

fn write_ap_register_repeated<PORT, R>( &mut self, port: impl Into<PORT> + Clone, register: R, values: &[u32] ) -> Result<(), ArmError>
where PORT: AccessPort, R: ApRegister<PORT>,

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

Object Safety§

This trait is not object safe.

Implementors§