[][src]Struct probe_rs::Probe

pub struct Probe { /* fields omitted */ }

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::from_probe_info(&probe_list[0]);

Methods

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 from_probe_info(info: &DebugProbeInfo) -> Result<Self, DebugProbeError>[src]

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 select_protocol(
    &mut self,
    protocol: WireProtocol
) -> Result<(), DebugProbeError>
[src]

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]

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]

pub fn get_interface_dap_mut(
    &mut self
) -> Result<Option<&mut dyn DAPAccess>, DebugProbeError>
[src]

pub fn has_jtag_interface(&self) -> bool[src]

pub fn get_interface_jtag(
    &self
) -> Result<Option<&dyn JTAGAccess>, DebugProbeError>
[src]

pub fn get_interface_jtag_mut(
    &mut self
) -> Result<Option<&mut dyn JTAGAccess>, DebugProbeError>
[src]

Trait Implementations

impl Debug for Probe[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.