[−][src]Struct probe_rs::Probe
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
impl Probe
[src]
pub fn new(probe: impl DebugProbe + 'static) -> Self
[src]
pub fn list_all() -> Vec<DebugProbeInfo>
[src]
Get a list of all debug probes found. This can be used to select the debug probe which should be used.
pub fn open(
selector: impl Into<DebugProbeSelector> + Clone
) -> Result<Self, DebugProbeError>
[src]
selector: impl Into<DebugProbeSelector> + Clone
) -> Result<Self, DebugProbeError>
Create a Probe
from DebugProbeInfo
. Use the
Probe::list_all()
function to get the information
about all probes available.
pub fn from_specific_probe(probe: Box<dyn DebugProbe>) -> Self
[src]
pub fn get_name(&self) -> String
[src]
Get human readable name for the probe
pub fn attach(self, target: impl Into<TargetSelector>) -> Result<Session, Error>
[src]
Enters debug mode
pub fn attach_to_unspecified(&mut self) -> Result<(), Error>
[src]
pub fn select_protocol(
&mut self,
protocol: WireProtocol
) -> Result<(), DebugProbeError>
[src]
&mut self,
protocol: WireProtocol
) -> Result<(), DebugProbeError>
Selects the transport protocol to be used by the debug probe.
pub fn detach(&mut self) -> Result<(), DebugProbeError>
[src]
Leave debug mode
pub fn target_reset(&mut self) -> Result<(), DebugProbeError>
[src]
Resets the target device.
pub fn set_speed(&mut self, speed_khz: u32) -> Result<u32, DebugProbeError>
[src]
Configure protocol speed to use in kHz
pub fn speed_khz(&self) -> u32
[src]
Configured protocol speed in kHz
pub fn dedicated_memory_interface(
&self
) -> Result<Option<Memory>, DebugProbeError>
[src]
&self
) -> Result<Option<Memory>, DebugProbeError>
Returns a probe specific memory interface if any is present for given probe.
pub fn has_dap_interface(&self) -> bool
[src]
pub fn get_interface_dap(
&self
) -> Result<Option<&dyn DAPAccess>, DebugProbeError>
[src]
&self
) -> Result<Option<&dyn DAPAccess>, DebugProbeError>
pub fn get_interface_dap_mut(
&mut self
) -> Result<Option<&mut dyn DAPAccess>, DebugProbeError>
[src]
&mut self
) -> Result<Option<&mut dyn DAPAccess>, DebugProbeError>
pub fn has_jtag_interface(&self) -> bool
[src]
pub fn get_interface_jtag(
&self
) -> Result<Option<&dyn JTAGAccess>, DebugProbeError>
[src]
&self
) -> Result<Option<&dyn JTAGAccess>, DebugProbeError>
pub fn get_interface_jtag_mut(
&mut self
) -> Result<Option<&mut dyn JTAGAccess>, DebugProbeError>
[src]
&mut self
) -> Result<Option<&mut dyn JTAGAccess>, DebugProbeError>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Probe
impl Send for Probe
impl Sync for Probe
impl Unpin for Probe
impl !UnwindSafe for Probe
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,