CubeProgrammer

Struct CubeProgrammer 

Source
pub struct CubeProgrammer { /* private fields */ }
Expand description

Central struct to interact with the underlying CubeProgrammer API library. Factory for connections. Multiple connections are possible at the same time, if multiple probes are connected.

Implementations§

Source§

impl CubeProgrammer

Source

pub fn list_available_probes(&self) -> CubeProgrammerResult<Vec<Serial>>

List available probes. Scans for connected probes internally and returns the serial numbers of the connected probes which are not currently in use

Source

pub fn connect_to_target( &self, probe_serial_number: &Serial, protocol: &Protocol, connection_parameters: &ConnectionParameters, ) -> CubeProgrammerResult<ConnectedProgrammer<'_>>

Connect to a target via a given probe

Source

pub fn connect_to_target_fus( &self, probe_serial_number: &Serial, protocol: &Protocol, ) -> CubeProgrammerResult<ConnectedFusProgrammer<'_>>

Connect to the firmware update service (FUS) of a target via a given probe No custom connection parameters can be specified, as a special connection procedure is necessary to access the FUS info table:

  • Disconnect
  • Connect (mode: normal ; reset: hardware)
  • Start FUS
  • Disconnect
  • Connect (mode: normal ; reset: hot-plug)
Source

pub fn builder<'f1, I1>() -> CubeProgrammerBuilder<'f1, I1>
where I1: AsRef<Path>,

Create new instance

  • Load the CubeProgrammer API library (sys crate)
  • Set the verbosity level
  • Set the display callback handler
  • Set the loader path

Trait Implementations§

Source§

impl Debug for CubeProgrammer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.