[][src]Struct probe_rs::probe::stlink::STLinkUSBDevice

pub struct STLinkUSBDevice { /* fields omitted */ }

Methods

impl STLinkUSBDevice[src]

pub fn new_from_info(
    probe_info: &DebugProbeInfo
) -> Result<Self, DebugProbeError>
[src]

Creates and initializes a new USB device.

pub fn read(
    &mut self,
    size: u16,
    timeout: Duration
) -> Result<Vec<u8>, DebugProbeError>
[src]

Writes to the out EP.

pub fn write(
    &mut self,
    cmd: Vec<u8>,
    write_data: &[u8],
    read_data: &mut [u8],
    timeout: Duration
) -> Result<(), DebugProbeError>
[src]

Writes to the out EP and reads back data if needed. First the cmd is sent. In a second step write_data is transmitted. And lastly, data will be read back until read_data is filled.

pub fn read_swv(
    &mut self,
    size: usize,
    timeout: Duration
) -> Result<Vec<u8>, DebugProbeError>
[src]

Special read, TODO: for later.

Trait Implementations

impl Drop for STLinkUSBDevice[src]

Auto Trait Implementations

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.