Struct probe_rs::architecture::arm::ArmCommunicationInterface
source · [−]pub struct ArmCommunicationInterface<S: ArmDebugState> { /* private fields */ }
Expand description
An implementation of the communication protocol between probe and target. Can be used to perform all sorts of generic debug access on ARM targets with probes that support low level access. (E.g. CMSIS-DAP and J-Link support this, ST-Link does not)
Implementations
sourceimpl<'interface> ArmCommunicationInterface<Initialized>
impl<'interface> ArmCommunicationInterface<Initialized>
sourcepub fn memory_interface(
&'interface mut self,
access_port: MemoryAp
) -> Result<Memory<'interface>, ProbeRsError>
pub fn memory_interface(
&'interface mut self,
access_port: MemoryAp
) -> Result<Memory<'interface>, ProbeRsError>
Tries to obtain a memory interface which can be used to read memory from ARM targets.
sourceimpl ArmCommunicationInterface<Initialized>
impl ArmCommunicationInterface<Initialized>
sourcepub fn read_chip_info_from_rom_table(
&mut self,
dp: DpAddress
) -> Result<Option<ArmChipInfo>, ProbeRsError>
pub fn read_chip_info_from_rom_table(
&mut self,
dp: DpAddress
) -> Result<Option<ArmChipInfo>, ProbeRsError>
Reads the chip info from the romtable of given debug port.
Trait Implementations
sourceimpl ArmProbeInterface for ArmCommunicationInterface<Initialized>
impl ArmProbeInterface for ArmCommunicationInterface<Initialized>
sourcefn memory_interface(
&mut self,
access_port: MemoryAp
) -> Result<Memory<'_>, ProbeRsError>
fn memory_interface(
&mut self,
access_port: MemoryAp
) -> Result<Memory<'_>, ProbeRsError>
Returns a memory interface to access the target’s memory.
sourcefn ap_information(
&mut self,
access_port: GenericAp
) -> Result<&ApInformation, ProbeRsError>
fn ap_information(
&mut self,
access_port: GenericAp
) -> Result<&ApInformation, ProbeRsError>
Returns information about a specific access port.
sourcefn read_chip_info_from_rom_table(
&mut self,
dp: DpAddress
) -> Result<Option<ArmChipInfo>, ProbeRsError>
fn read_chip_info_from_rom_table(
&mut self,
dp: DpAddress
) -> Result<Option<ArmChipInfo>, ProbeRsError>
Reads the chip info from the romtable of given debug port.
sourcefn num_access_ports(&mut self, dp: DpAddress) -> Result<usize, ProbeRsError>
fn num_access_ports(&mut self, dp: DpAddress) -> Result<usize, ProbeRsError>
Returns the number of access ports the debug port has.
sourceimpl CommunicationInterface for ArmCommunicationInterface<Initialized>
impl CommunicationInterface for ArmCommunicationInterface<Initialized>
sourcefn flush(&mut self) -> Result<(), DebugProbeError>
fn flush(&mut self) -> Result<(), DebugProbeError>
Flush all remaining commands if the target driver implements batching.
sourcefn get_arm_communication_interface(
&mut self
) -> Result<&mut ArmCommunicationInterface<Initialized>, ProbeRsError>
fn get_arm_communication_interface(
&mut self
) -> Result<&mut ArmCommunicationInterface<Initialized>, ProbeRsError>
Tries to get the underlying ArmCommunicationInterface
.
sourceimpl DapAccess for ArmCommunicationInterface<Initialized>
impl DapAccess for ArmCommunicationInterface<Initialized>
sourcefn read_raw_dp_register(
&mut self,
dp: DpAddress,
address: u8
) -> Result<u32, DebugProbeError>
fn read_raw_dp_register(
&mut self,
dp: DpAddress,
address: u8
) -> Result<u32, DebugProbeError>
Read a Debug Port register. Read more
sourcefn write_raw_dp_register(
&mut self,
dp: DpAddress,
address: u8,
value: u32
) -> Result<(), DebugProbeError>
fn write_raw_dp_register(
&mut self,
dp: DpAddress,
address: u8,
value: u32
) -> Result<(), DebugProbeError>
Write a Debug Port register. Read more
sourcefn read_raw_ap_register(
&mut self,
ap: ApAddress,
address: u8
) -> Result<u32, DebugProbeError>
fn read_raw_ap_register(
&mut self,
ap: ApAddress,
address: u8
) -> Result<u32, DebugProbeError>
Read an Access Port register. Read more
sourcefn read_raw_ap_register_repeated(
&mut self,
ap: ApAddress,
address: u8,
values: &mut [u32]
) -> Result<(), DebugProbeError>
fn read_raw_ap_register_repeated(
&mut self,
ap: ApAddress,
address: u8,
values: &mut [u32]
) -> Result<(), DebugProbeError>
Read multiple values from the same Access Port register. Read more
sourcefn write_raw_ap_register(
&mut self,
ap: ApAddress,
address: u8,
value: u32
) -> Result<(), DebugProbeError>
fn write_raw_ap_register(
&mut self,
ap: ApAddress,
address: u8,
value: u32
) -> Result<(), DebugProbeError>
Write an AP register. Read more
sourcefn write_raw_ap_register_repeated(
&mut self,
ap: ApAddress,
address: u8,
values: &[u32]
) -> Result<(), DebugProbeError>
fn write_raw_ap_register_repeated(
&mut self,
ap: ApAddress,
address: u8,
values: &[u32]
) -> Result<(), DebugProbeError>
Write multiple values to the same Access Port register. Read more
sourceimpl<S: Debug + ArmDebugState> Debug for ArmCommunicationInterface<S>
impl<S: Debug + ArmDebugState> Debug for ArmCommunicationInterface<S>
sourceimpl SwoAccess for ArmCommunicationInterface<Initialized>
impl SwoAccess for ArmCommunicationInterface<Initialized>
sourcefn enable_swo(&mut self, config: &SwoConfig) -> Result<(), ProbeRsError>
fn enable_swo(&mut self, config: &SwoConfig) -> Result<(), ProbeRsError>
Configure a SwoAccess interface for reading SWO data.
sourcefn disable_swo(&mut self) -> Result<(), ProbeRsError>
fn disable_swo(&mut self) -> Result<(), ProbeRsError>
Disable SWO reading on this SwoAccess interface.
sourcefn read_swo_timeout(
&mut self,
timeout: Duration
) -> Result<Vec<u8>, ProbeRsError>
fn read_swo_timeout(
&mut self,
timeout: Duration
) -> Result<Vec<u8>, ProbeRsError>
Read SWO data for up to timeout
duration. Read more
sourcefn read_swo(&mut self) -> Result<Vec<u8>, Error>
fn read_swo(&mut self) -> Result<Vec<u8>, Error>
Read any available SWO data without waiting. Read more
sourcefn swo_poll_interval_hint(&mut self, config: &SwoConfig) -> Option<Duration>
fn swo_poll_interval_hint(&mut self, config: &SwoConfig) -> Option<Duration>
Request an estimated best time to wait between polls of read_swo
. Read more
sourcefn swo_buffer_size(&mut self) -> Option<usize>
fn swo_buffer_size(&mut self) -> Option<usize>
Request the probe SWO buffer size, if known.
Auto Trait Implementations
impl<S> !RefUnwindSafe for ArmCommunicationInterface<S>
impl<S> Send for ArmCommunicationInterface<S> where
S: Send,
impl<S> !Sync for ArmCommunicationInterface<S>
impl<S> Unpin for ArmCommunicationInterface<S> where
S: Unpin,
impl<S> !UnwindSafe for ArmCommunicationInterface<S>
Blanket Implementations
sourceimpl<T> ApAccess for T where
T: DapAccess,
impl<T> ApAccess for T where
T: DapAccess,
sourcefn read_ap_register<PORT, R>(
&mut self,
port: impl Into<PORT>
) -> Result<R, DebugProbeError> where
PORT: AccessPort,
R: ApRegister<PORT>,
fn read_ap_register<PORT, R>(
&mut self,
port: impl Into<PORT>
) -> Result<R, DebugProbeError> where
PORT: AccessPort,
R: ApRegister<PORT>,
Read a register of the access port.
sourcefn write_ap_register<PORT, R>(
&mut self,
port: impl Into<PORT>,
register: R
) -> Result<(), DebugProbeError> where
PORT: AccessPort,
R: ApRegister<PORT>,
fn write_ap_register<PORT, R>(
&mut self,
port: impl Into<PORT>,
register: R
) -> Result<(), DebugProbeError> where
PORT: AccessPort,
R: ApRegister<PORT>,
Write a register of the access port.
sourcefn write_ap_register_repeated<PORT, R>(
&mut self,
port: impl Into<PORT>,
_register: R,
values: &[u32]
) -> Result<(), DebugProbeError> where
PORT: AccessPort,
R: ApRegister<PORT>,
fn write_ap_register_repeated<PORT, R>(
&mut self,
port: impl Into<PORT>,
_register: R,
values: &[u32]
) -> Result<(), DebugProbeError> 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. Read more
sourcefn read_ap_register_repeated<PORT, R>(
&mut self,
port: impl Into<PORT>,
_register: R,
values: &mut [u32]
) -> Result<(), DebugProbeError> where
PORT: AccessPort,
R: ApRegister<PORT>,
fn read_ap_register_repeated<PORT, R>(
&mut self,
port: impl Into<PORT>,
_register: R,
values: &mut [u32]
) -> Result<(), DebugProbeError> 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. Read more
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> DpAccess for T where
T: DapAccess,
impl<T> DpAccess for T where
T: DapAccess,
sourcefn read_dp_register<R>(&mut self, dp: DpAddress) -> Result<R, DebugPortError> where
R: DpRegister,
fn read_dp_register<R>(&mut self, dp: DpAddress) -> Result<R, DebugPortError> where
R: DpRegister,
Reads a debug port register.
sourcefn write_dp_register<R>(
&mut self,
dp: DpAddress,
register: R
) -> Result<(), DebugPortError> where
R: DpRegister,
fn write_dp_register<R>(
&mut self,
dp: DpAddress,
register: R
) -> Result<(), DebugPortError> where
R: DpRegister,
Write a debug port register.