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
impl CubeProgrammer
Sourcepub fn list_available_probes(&self) -> CubeProgrammerResult<Vec<Serial>>
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
Sourcepub fn connect_to_target(
&self,
probe_serial_number: &Serial,
protocol: &Protocol,
connection_parameters: &ConnectionParameters,
) -> CubeProgrammerResult<ConnectedProgrammer<'_>>
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
Sourcepub fn connect_to_target_fus(
&self,
probe_serial_number: &Serial,
protocol: &Protocol,
) -> CubeProgrammerResult<ConnectedFusProgrammer<'_>>
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)
Sourcepub fn builder<'f1, I1>() -> CubeProgrammerBuilder<'f1, I1>
pub fn builder<'f1, I1>() -> CubeProgrammerBuilder<'f1, I1>
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§
Auto Trait Implementations§
impl !Freeze for CubeProgrammer
impl !RefUnwindSafe for CubeProgrammer
impl Send for CubeProgrammer
impl !Sync for CubeProgrammer
impl Unpin for CubeProgrammer
impl !UnwindSafe for CubeProgrammer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more