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 FtdiCommon for FtXSeries
impl FtdiCommon for FtXSeries
Source§const DEVICE_TYPE: DeviceType = DeviceType::FT_X_SERIES
const DEVICE_TYPE: DeviceType = DeviceType::FT_X_SERIES
FTDI device type.
Source§fn device_type(&mut self) -> Result<DeviceType, FtStatus>
fn device_type(&mut self) -> Result<DeviceType, FtStatus>
Identify device type. Read more
Source§fn device_info(&mut self) -> Result<DeviceInfo, FtStatus>
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>
fn driver_version(&mut self) -> Result<Version, FtStatus>
Returns the D2XX driver version number. Read more
Source§fn reset(&mut self) -> Result<(), FtStatus>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
fn purge_all(&mut self) -> Result<(), FtStatus>
This function purges the transmit and receive buffers in the device. Read more
Source§fn com_port_number(&mut self) -> Result<Option<u32>, FtStatus>
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>
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>
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>
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>
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>
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>
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>
fn eeprom_user_size(&mut self) -> Result<usize, FtStatus>
Get the available size of the EEPROM user area in bytes. Read more
Source§impl FtdiEeprom<ft_eeprom_x_series, EepromXSeries> for FtXSeries
impl FtdiEeprom<ft_eeprom_x_series, EepromXSeries> for FtXSeries
Source§fn eeprom_read(&mut self) -> Result<(Eeprom, EepromStrings), FtStatus>
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>
fn eeprom_program( &mut self, eeprom: Eeprom, strings: EepromStrings, ) -> Result<(), FtStatus>
Program the FTD2XX EEPROM. Read more
Auto Trait Implementations§
impl Freeze for FtXSeries
impl RefUnwindSafe for FtXSeries
impl Send for FtXSeries
impl Sync for FtXSeries
impl Unpin for FtXSeries
impl UnwindSafe for FtXSeries
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