pub struct Ppk2 { /* private fields */ }Expand description
PPK2 device representation.
Implementations§
Source§impl Ppk2
impl Ppk2
Sourcepub fn new<'a>(
path: impl Into<Cow<'a, str>>,
mode: MeasurementMode,
) -> Result<Self>
pub fn new<'a>( path: impl Into<Cow<'a, str>>, mode: MeasurementMode, ) -> Result<Self>
Create a new instance and configure the given MeasurementMode.
Sourcepub fn send_command(&mut self, command: Command) -> Result<Vec<u8>>
pub fn send_command(&mut self, command: Command) -> Result<Vec<u8>>
Send a raw command and return the result.
Sourcepub fn get_metadata(&mut self) -> Result<Metadata>
pub fn get_metadata(&mut self) -> Result<Metadata>
Get the device metadata.
Sourcepub fn set_device_power(&mut self, power: DevicePower) -> Result<()>
pub fn set_device_power(&mut self, power: DevicePower) -> Result<()>
Enable or disable the device power.
Sourcepub fn set_source_voltage(&mut self, vdd: SourceVoltage) -> Result<()>
pub fn set_source_voltage(&mut self, vdd: SourceVoltage) -> Result<()>
Set the voltage of the device voltage source.
Sourcepub fn start_measurement(
self,
sps: usize,
) -> Result<(Receiver<MeasurementMatch>, impl FnOnce() -> Result<Self>)>
pub fn start_measurement( self, sps: usize, ) -> Result<(Receiver<MeasurementMatch>, impl FnOnce() -> Result<Self>)>
Start measurements. Returns a tuple of:
- Ppk2
, - Receiver of measurement::MeasurementMatch, and
- A closure that can be called to stop the measurement parsing pipeline and return the device.
Sourcepub fn start_measurement_matching(
self,
pins: LogicPortPins,
sps: usize,
) -> Result<(Receiver<MeasurementMatch>, impl FnOnce() -> Result<Self>)>
pub fn start_measurement_matching( self, pins: LogicPortPins, sps: usize, ) -> Result<(Receiver<MeasurementMatch>, impl FnOnce() -> Result<Self>)>
Auto Trait Implementations§
impl Freeze for Ppk2
impl !RefUnwindSafe for Ppk2
impl Send for Ppk2
impl !Sync for Ppk2
impl Unpin for Ppk2
impl UnsafeUnpin for Ppk2
impl !UnwindSafe for Ppk2
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