FtXSeries

Struct FtXSeries 

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

FT X Series device.

§Example

Converting from an unknown FTDI device.

use libftd2xx::{FtXSeries, Ftdi};

let ft_x_series: FtXSeries = Ftdi::new()?.try_into()?;

Trait Implementations§

Source§

impl Debug for FtXSeries

Source§

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

Formats the value using the given formatter. Read more
Source§

impl FtdiCommon for FtXSeries

Source§

const DEVICE_TYPE: DeviceType = DeviceType::FT_X_SERIES

FTDI device type.
Source§

fn handle(&mut self) -> FT_HANDLE

Get the FTDI device handle.
Source§

fn device_type(&mut self) -> Result<DeviceType, FtStatus>

Identify device type. Read more
Source§

fn device_info(&mut self) -> Result<DeviceInfo, FtStatus>

Get device information for an open device. Read more
Source§

fn driver_version(&mut self) -> Result<Version, FtStatus>

Returns the D2XX driver version number. Read more
Source§

fn reset(&mut self) -> Result<(), FtStatus>

This function sends a reset command to the device. Read more
Source§

fn set_usb_parameters(&mut self, in_transfer_size: u32) -> Result<(), FtStatus>

Set the USB request transfer size. Read more
Source§

fn set_chars( &mut self, event_char: u8, event_enable: bool, error_char: u8, error_enable: bool, ) -> Result<(), FtStatus>

This function sets the special characters for the device. Read more
Source§

fn set_timeouts( &mut self, read_timeout: Duration, write_timeout: Duration, ) -> Result<(), FtStatus>

This function sets the read and write timeouts for the device. Read more
Source§

fn set_deadman_timeout(&mut self, timeout: Duration) -> Result<(), FtStatus>

This method allows the maximum time in milliseconds that a USB request can remain outstandingto be set. Read more
Source§

fn set_latency_timer(&mut self, timer: Duration) -> Result<(), FtStatus>

Set the latency timer value. Read more
Source§

fn latency_timer(&mut self) -> Result<Duration, FtStatus>

Get the current value of the latency timer. Read more
Source§

fn set_flow_control_none(&mut self) -> Result<(), FtStatus>

This function disables flow control for the device. Read more
Source§

fn set_flow_control_rts_cts(&mut self) -> Result<(), FtStatus>

This function sets RTS/CTS flow control for the device. Read more
Source§

fn set_flow_control_dtr_dsr(&mut self) -> Result<(), FtStatus>

This function sets DTS/DSR flow control for the device. Read more
Source§

fn set_flow_control_xon_xoff( &mut self, xon: u8, xoff: u8, ) -> Result<(), FtStatus>

This function sets XON/XOFF flow control for the device. Read more
Source§

fn set_baud_rate(&mut self, baud_rate: u32) -> Result<(), FtStatus>

Set the baud rate for the device. Read more
Source§

fn set_data_characteristics( &mut self, bits_per_word: BitsPerWord, stop_bits: StopBits, parity: Parity, ) -> Result<(), FtStatus>

Set the data characteristics for the device. Read more
Source§

fn set_dtr(&mut self) -> Result<(), FtStatus>

Set the Data Terminal Ready (DTR) control signal. Read more
Source§

fn clear_dtr(&mut self) -> Result<(), FtStatus>

Clear the Data Terminal Ready (DTR) control signal. Read more
Source§

fn set_rts(&mut self) -> Result<(), FtStatus>

Set the Request to Send (RTS) control signal. Read more
Source§

fn clear_rts(&mut self) -> Result<(), FtStatus>

Clear the Request to Send (RTS) control signal. Read more
Source§

fn set_bit_mode(&mut self, mask: u8, mode: BitMode) -> Result<(), FtStatus>

Enables different chip modes. Read more
Source§

fn bit_mode(&mut self) -> Result<u8, FtStatus>

Get the instantaneous value of the data bus. Read more
Source§

fn set_break_on(&mut self) -> Result<(), FtStatus>

Sets the BREAK condition for the device. Read more
Source§

fn set_break_off(&mut self) -> Result<(), FtStatus>

Resets the BREAK condition for the device. Read more
Source§

fn queue_status(&mut self) -> Result<usize, FtStatus>

Gets the number of bytes in the receive queue. Read more
Source§

fn status(&mut self) -> Result<DeviceStatus, FtStatus>

Gets the device status including number of characters in the receive queue, number of characters in the transmit queue, and the current event status. Read more
Source§

fn read(&mut self, buf: &mut [u8]) -> Result<usize, FtStatus>

Read data from the device, returning the number of bytes read. Read more
Source§

fn read_all(&mut self, buf: &mut [u8]) -> Result<(), TimeoutError>

Read data from the device. Read more
Source§

fn write_all(&mut self, buf: &[u8]) -> Result<(), TimeoutError>

Write data to the device. Read more
Source§

fn write(&mut self, buf: &[u8]) -> Result<usize, FtStatus>

Write data to the device, returning how many bytes were written. Read more
Source§

fn purge_tx(&mut self) -> Result<(), FtStatus>

This function purges the transmit buffers in the device. Read more
Source§

fn purge_rx(&mut self) -> Result<(), FtStatus>

This function purges the receive buffers in the device. Read more
Source§

fn purge_all(&mut self) -> Result<(), FtStatus>

This function purges the transmit and receive buffers in the device. Read more
Source§

fn close(&mut self) -> Result<(), FtStatus>

Close an open device. Read more
Source§

fn com_port_number(&mut self) -> Result<Option<u32>, FtStatus>

Available on Windows only.
Get the COM port associated with a device. Read more
Source§

fn reset_port(&mut self) -> Result<(), FtStatus>

Available on Windows only.
Send a reset command to the port. Read more
Source§

fn cycle_port(&mut self) -> Result<(), FtStatus>

Available on Windows only.
Send a cycle command to the USB port. Read more
Source§

fn modem_status(&mut self) -> Result<ModemStatus, FtStatus>

Gets the modem status and line status from the device. Read more
Source§

fn eeprom_word_read(&mut self, offset: u32) -> Result<u16, FtStatus>

Read a value from an EEPROM location. Read more
Source§

fn eeprom_word_write(&mut self, offset: u32, value: u16) -> Result<(), FtStatus>

Writes a value to an EEPROM location. Read more
Source§

fn eeprom_erase(&mut self) -> Result<(), FtStatus>

Erases the entire contents of the EEPROM, including the user area. Read more
Source§

fn eeprom_user_size(&mut self) -> Result<usize, FtStatus>

Get the available size of the EEPROM user area in bytes. Read more
Source§

fn eeprom_user_read(&mut self, buf: &mut [u8]) -> Result<usize, FtStatus>

Read the contents of the EEPROM user area. Read more
Source§

fn eeprom_user_write(&mut self, buf: &[u8]) -> Result<(), FtStatus>

Write to the EEPROM user area. Read more
Source§

impl FtdiEeprom<ft_eeprom_x_series, EepromXSeries> for FtXSeries

Source§

fn eeprom_read(&mut self) -> Result<(Eeprom, EepromStrings), FtStatus>

Read from the FTD2XX device EEPROM. Read more
Source§

fn eeprom_program( &mut self, eeprom: Eeprom, strings: EepromStrings, ) -> Result<(), FtStatus>

Program the FTD2XX EEPROM. Read more
Source§

impl TryFrom<Ftdi> for FtXSeries

Source§

type Error = DeviceTypeError

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

fn try_from(ft: Ftdi) -> Result<Self, Self::Error>

Performs the conversion.

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.