Struct libftd2xx::EepromHeader[][src]

pub struct EepromHeader(_);

FTDI EEPROM header common to all FTDI devices.

Implementations

impl EepromHeader[src]

pub fn set_device_type(&mut self, device_type: DeviceType)[src]

Set the FTDI device type.

pub fn vendor_id(&self) -> u16[src]

FTDI USB device vendor ID.

This is typically 0x0403.

pub fn set_vendor_id(&mut self, value: u16)[src]

Set the FTDI USB device vendor ID.

pub fn product_id(&self) -> u16[src]

FTDI USB product ID.

Typical FTDI product IDs:

  • 0x6001 FT232AM/FT232BM/FT232R
  • 0x6010 FT2232C/FT2232D/FT2232H
  • 0x6011 FT4232/FT4232H
  • 0x6014 FT232H
  • 0x6015 FT230X/FT231X/FT234X

pub fn set_product_id(&mut self, value: u16)[src]

Set the FTDI USB product ID.

pub fn serial_number_enable(&self) -> bool[src]

Serial Number Enable.

true if the serial number is to be used.

The documentation is unclear what exactly this means.

pub fn set_serial_number_enable(&mut self, value: bool)[src]

Set Serial Number Enable.

pub fn max_current(&self) -> u16[src]

Maximum bus current.

The unit for this value is milliamps, and the value range is 0-500 mA.

pub fn set_max_current(&mut self, value: u16)[src]

Set maximum bus current in milliamps.

Values greater than 500 mA (500u16) will result in panic.

pub fn self_powered(&self) -> bool[src]

Device power source.

  • true if the device is self-powered (not powered by USB bus).
  • false if the device is powered by the USB bus.

pub fn set_self_powered(&mut self, value: bool)[src]

Set device power source.

  • true if the device is self-powered (not powered by USB bus).
  • false if the device is powered by the USB bus.

pub fn remote_wakeup(&self) -> bool[src]

Remote wakeup capabilities.

USB remote wakeup is the ability for the device to resume the PC from USB suspend (sleep) state.

  • true if the device is capable of remote wakeup.
  • false if the device is not capable of remote wakeup.

pub fn set_remote_wakeup(&mut self, value: bool)[src]

Set remote wakeup capabilities.

USB remote wakeup is the ability for the device to resume the PC from USB suspend (sleep) state.

  • true if the device is capable of remote wakeup.
  • false if the device is not capable of remote wakeup.

pub fn pull_down_enable(&self) -> bool[src]

Pull down in suspend mode.

  • true if pull-down in suspend is enabled.
  • false if pull-down in suspend is disabled.

pub fn set_pull_down_enable(&mut self, value: bool)[src]

Set pull down in suspend mode.

  • true if pull-down in suspend is enabled.
  • false if pull-down in suspend is disabled.

Trait Implementations

impl Clone for EepromHeader[src]

impl Copy for EepromHeader[src]

impl Debug for EepromHeader[src]

impl Default for EepromHeader[src]

impl From<ft_eeprom_header> for EepromHeader[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.