Trait probe_rs::architecture::arm::DapAccess [−][src]
pub trait DapAccess { fn read_register(
&mut self,
port: PortType,
addr: u8
) -> Result<u32, DebugProbeError>; fn write_register(
&mut self,
port: PortType,
addr: u8,
value: u32
) -> Result<(), DebugProbeError>; fn read_block(
&mut self,
port: PortType,
addr: u8,
values: &mut [u32]
) -> Result<(), DebugProbeError> { ... } fn write_block(
&mut self,
port: PortType,
addr: u8,
values: &[u32]
) -> Result<(), DebugProbeError> { ... } fn flush(&mut self) -> Result<(), DebugProbeError> { ... } }
Required methods
fn read_register(
&mut self,
port: PortType,
addr: u8
) -> Result<u32, DebugProbeError>
fn read_register(
&mut self,
port: PortType,
addr: u8
) -> Result<u32, DebugProbeError>
Reads the DAP register on the specified port and address
fn write_register(
&mut self,
port: PortType,
addr: u8,
value: u32
) -> Result<(), DebugProbeError>
fn write_register(
&mut self,
port: PortType,
addr: u8,
value: u32
) -> Result<(), DebugProbeError>
Writes a value to the DAP register on the specified port and address
Provided methods
fn read_block(
&mut self,
port: PortType,
addr: u8,
values: &mut [u32]
) -> Result<(), DebugProbeError>
fn read_block(
&mut self,
port: PortType,
addr: u8,
values: &mut [u32]
) -> Result<(), DebugProbeError>
Read multiple values from the same DAP register.
If possible, this uses optimized read functions, otherwise it
falls back to the read_register
function.
fn write_block(
&mut self,
port: PortType,
addr: u8,
values: &[u32]
) -> Result<(), DebugProbeError>
fn write_block(
&mut self,
port: PortType,
addr: u8,
values: &[u32]
) -> Result<(), DebugProbeError>
Write multiple values to the same DAP register.
If possible, this uses optimized write functions, otherwise it
falls back to the write_register
function.
fn flush(&mut self) -> Result<(), DebugProbeError>
fn flush(&mut self) -> Result<(), DebugProbeError>
Flush any outstanding writes.
By default, this does nothing – but in probes that implement write batching, this needs to flush any pending writes.