Device

Struct Device 

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

High-level interface for talking to the SMIMS VLFD device.

The type owns the underlying USB session and keeps the remote configuration cached locally, providing ergonomic helpers around the device’s configuration and command protocols.

Implementations§

Source§

impl Device

Source

pub fn new() -> Result<Self>

Source

pub fn connect() -> Result<Self>

Source

pub fn usb(&self) -> &UsbDevice

Source

pub fn config(&self) -> &Config

Source

pub fn config_mut(&mut self) -> &mut Config

Source

pub fn is_open(&self) -> bool

Source

pub fn open(&mut self) -> Result<()>

Source

pub fn close(&mut self) -> Result<()>

Source

pub fn initialize(&mut self) -> Result<()>

Source

pub fn reset_engine(&self) -> Result<()>

Source

pub fn ensure_session(&mut self) -> Result<()>

Source

pub fn enter_io_mode(&mut self, settings: &IoSettings) -> Result<()>

Source

pub fn transfer_io( &mut self, write_buffer: &mut [u16], read_buffer: &mut [u16], ) -> Result<()>

Source

pub fn exit_io_mode(&mut self) -> Result<()>

Source

pub fn fifo_write(&self, buffer: &[u16]) -> Result<()>

Source

pub fn fifo_read(&self, buffer: &mut [u16]) -> Result<()>

Source

pub fn sync_delay(&self) -> Result<()>

Source

pub fn command_active(&self) -> Result<()>

Source

pub fn read_config(&mut self) -> Result<()>

Source

pub fn write_config(&mut self) -> Result<()>

Source

pub fn activate_fpga_programmer(&self) -> Result<()>

Source

pub fn activate_vericomm(&self) -> Result<()>

Source

pub fn activate_veri_instrument(&self) -> Result<()>

Source

pub fn activate_veri_soc(&self) -> Result<()>

Source

pub fn activate_vericomm_pro(&self) -> Result<()>

Source

pub fn activate_veri_sdk(&self) -> Result<()>

Source

pub fn activate_flash_read(&self) -> Result<()>

Source

pub fn activate_flash_write(&self) -> Result<()>

Source

pub fn encrypt(&mut self, buffer: &mut [u16])

Source

pub fn decrypt(&mut self, buffer: &mut [u16])

Source

pub fn licence_gen(&self, security_key: u16, customer_id: u16) -> u16

Auto Trait Implementations§

§

impl !Freeze for Device

§

impl RefUnwindSafe for Device

§

impl Send for Device

§

impl Sync for Device

§

impl Unpin for Device

§

impl UnwindSafe for Device

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.