pub trait DapAccess {
    fn read_raw_dp_register(
        &mut self,
        dp: DpAddress,
        addr: u8
    ) -> Result<u32, DebugProbeError>; fn write_raw_dp_register(
        &mut self,
        dp: DpAddress,
        addr: u8,
        value: u32
    ) -> Result<(), DebugProbeError>; fn read_raw_ap_register(
        &mut self,
        ap: ApAddress,
        addr: u8
    ) -> Result<u32, DebugProbeError>; fn write_raw_ap_register(
        &mut self,
        ap: ApAddress,
        addr: u8,
        value: u32
    ) -> Result<(), DebugProbeError>; fn read_raw_ap_register_repeated(
        &mut self,
        ap: ApAddress,
        addr: u8,
        values: &mut [u32]
    ) -> Result<(), DebugProbeError> { ... } fn write_raw_ap_register_repeated(
        &mut self,
        ap: ApAddress,
        addr: u8,
        values: &[u32]
    ) -> Result<(), DebugProbeError> { ... } }
Expand description

High-level DAP register access.

Operations on this trait perform logical register reads/writes. Implementations are responsible for bank switching and AP selection, so one method call can result in multiple transactions on the wire, if necessary.

Required Methods

Read a Debug Port register.

Highest 4 bits of addr are interpreted as the bank number, implementations will do bank switching if necessary.

Write a Debug Port register.

Highest 4 bits of addr are interpreted as the bank number, implementations will do bank switching if necessary.

Read an Access Port register.

Highest 4 bits of addr are interpreted as the bank number, implementations will do bank switching if necessary.

Write an AP register.

Highest 4 bits of addr are interpreted as the bank number, implementations will do bank switching if necessary.

Provided Methods

Read multiple values from the same Access Port register.

If possible, this uses optimized read functions, otherwise it falls back to the read_raw_ap_register function.

Highest 4 bits of addr are interpreted as the bank number, implementations will do bank switching if necessary.

Write multiple values to the same Access Port register.

If possible, this uses optimized write functions, otherwise it falls back to the write_raw_ap_register function.

Highest 4 bits of addr are interpreted as the bank number, implementations will do bank switching if necessary.

Implementors