Struct probe_rs::Probe [−][src]
pub struct Probe { /* fields omitted */ }
Expand description
The Probe struct is a generic wrapper over the different probes supported.
Examples
Open the first probe found
The list_all
and from_probe_info
functions can be used
to create a new Probe
:
use probe_rs::Probe; let probe_list = Probe::list_all(); let probe = Probe::open(&probe_list[0]);
Implementations
Get a list of all debug probes found. This can be used to select the debug probe which should be used.
Create a Probe
from DebugProbeInfo
. Use the
Probe::list_all()
function to get the information
about all probes available.
Attach to the chip.
This runs all the necessary protocol init routines.
If this doesn’t work, you might want to try attach_under_reset
Attach to the chip under hard-reset.
This asserts the reset pin via the probe, plays the protocol init routines and deasserts the pin. This is necessary if the chip is not responding to the SWD reset sequence. For example this can happen if the chip has the SWDIO pin remapped.
Selects the transport protocol to be used by the debug probe.
Leave debug mode
Resets the target device.
Configure protocol speed to use in kHz
Check if the probe has an interface to debug ARM chips.
pub fn try_into_arm_interface<'probe>(
self
) -> Result<Box<dyn ArmProbeInterface + 'probe>, (Self, DebugProbeError)>
pub fn try_into_arm_interface<'probe>(
self
) -> Result<Box<dyn ArmProbeInterface + 'probe>, (Self, DebugProbeError)>
Try to get a trait object implementing ArmProbeInterface
, which can
can be used to communicate with chips using the ARM architecture.
If an error occurs while trying to connect, the probe is returned.
Check if the probe has an interface to debug RISCV chips.
pub fn try_into_riscv_interface(
self
) -> Result<RiscvCommunicationInterface, (Self, DebugProbeError)>
pub fn try_into_riscv_interface(
self
) -> Result<RiscvCommunicationInterface, (Self, DebugProbeError)>
Try to get a RiscvCommunicationInterface
, which can
can be used to communicate with chips using the RISCV
architecture.
If an error occurs while trying to connect, the probe is returned.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Probe
impl !UnwindSafe for Probe