[−][src]Struct probe_rs::probe::stlink::STLinkUSBDevice
Methods
impl STLinkUSBDevice
[src]
pub fn new_from_info(
probe_info: &DebugProbeInfo
) -> Result<Self, DebugProbeError>
[src]
probe_info: &DebugProbeInfo
) -> Result<Self, DebugProbeError>
Creates and initializes a new USB device.
pub fn read(
&mut self,
size: u16,
timeout: Duration
) -> Result<Vec<u8>, DebugProbeError>
[src]
&mut self,
size: u16,
timeout: Duration
) -> Result<Vec<u8>, DebugProbeError>
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]
&mut self,
cmd: Vec<u8>,
write_data: &[u8],
read_data: &mut [u8],
timeout: Duration
) -> Result<(), DebugProbeError>
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]
&mut self,
size: usize,
timeout: Duration
) -> Result<Vec<u8>, DebugProbeError>
Special read, TODO: for later.
Trait Implementations
impl Drop for STLinkUSBDevice
[src]
Auto Trait Implementations
impl RefUnwindSafe for STLinkUSBDevice
impl Send for STLinkUSBDevice
impl Sync for STLinkUSBDevice
impl Unpin for STLinkUSBDevice
impl UnwindSafe for STLinkUSBDevice
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>,