[][src]Struct libftd2xx::Eeprom232h

pub struct Eeprom232h { /* fields omitted */ }

EEPROM structure for the FT232H.

This is used by the eeprom_read and eeprom_program methods.

Implementations

impl Eeprom232h[src]

pub fn ft1248_cpol(&self) -> ClockPolarity[src]

FT1248 clock polarity.

pub fn set_ft1248_cpol(&mut self, value: ClockPolarity)[src]

Set FT1248 clock polarity.

pub fn ft1248_byteorder(&self) -> ByteOrder[src]

FT1248 byte order.

pub fn set_ft1248_byteorder(&mut self, value: ByteOrder)[src]

Set FT1248 byte order.

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

FT1248 flow control enable.

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

Set FT1248 flow control enable.

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

FT245 FIFO interface mode.

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

Set FT245 FIFO interface mode.

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

FT245 FIFO CPU target mode.

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

Set FT245 FIFO CPU target mode.

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

Fast serial interface mode.

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

Set Fast serial interface mode.

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

FT1248 interface mode.

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

Set FT1248 interface mode.

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

Power save enable.

Use a pin to save power for self-powered designs.

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

Set power save enable.

impl Eeprom232h[src]

pub fn new(
    eeprom: FT_EEPROM_232H,
    manufacturer: String,
    manufacturer_id: String,
    description: String,
    serial_number: String
) -> Eeprom232h
[src]

Create a new Eeprom232h EEPROM structure.

pub fn string_len(&self) -> usize[src]

Total length of the manufacturer, manufacturer_id, description, and serial_number strings.

Together these strings cannot exceed 96 characters.

pub fn manufacturer(&self) -> String[src]

Manufacturer string.

pub fn set_manufacturer(
    &mut self,
    value: String
) -> Result<(), EepromStringsError>
[src]

Set the manufacturer string.

Requirements

  • Less than or equal to 64 characters.
  • The total length of the manufacturer, manufacturer_id, description, and serial_number strings can not exceed 96 characters.

pub fn manufacturer_id(&self) -> String[src]

Manufacturer ID string.

pub fn set_manufacturer_id(
    &mut self,
    value: String
) -> Result<(), EepromStringsError>
[src]

Set the manufacturer ID string.

The first two characters of this string should be the same as the first two characters of the device serial number. For example, if your manufacturer ID is "FTDI" your serial number should start with "FT".

Requirements

  • Less than or equal to 64 characters.
  • The total length of the manufacturer, manufacturer_id, description, and serial_number strings can not exceed 96 characters.

pub fn description(&self) -> String[src]

Description string.

pub fn set_description(
    &mut self,
    value: String
) -> Result<(), EepromStringsError>
[src]

Set the description string.

Requirements

  • Less than or equal to 64 characters.
  • The total length of the manufacturer, manufacturer_id, description, and serial_number strings can not exceed 96 characters.

pub fn serial_number(&self) -> String[src]

Serial number string.

pub fn set_serial_number(
    &mut self,
    value: String
) -> Result<(), EepromStringsError>
[src]

Set the manufacturer ID string.

The first two characters of this string should be the same as the first two characters of the device serial number. For example, if your manufacturer ID is "FTDI" your serial number should start with "FT".

Requirements

  • Less than or equal to 64 characters.
  • The total length of the manufacturer, manufacturer_id, description, and serial_number strings can not exceed 96 characters.

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.

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.
  • false if the device is powered by the bus.

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

Set device power source.

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

Remote wakeup capabilities.

  • 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 device power source.

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 device power source.

impl Eeprom232h[src]

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

Slow slew for bus AD.

true if the pins on this bus have slow slew.

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

Set slow slew for bus AD.

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

Schmitt input for bus AD.

true if the pins on this bus are Schmitt input.

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

Set Schmitt input for bus AD.

pub fn ad_drive_current(&self) -> Result<DriveCurrent, EepromValueError>[src]

Drive current for bus AD.

This is the drive current for the pins on this bus.

pub fn ad_drive_current_unchecked(&self) -> u8[src]

Drive current unchecked for bus AD.

Valid values are 4mA, 8mA, 12mA, or 16mA, represented by 4u8, 8u8, 12u8, or 16u8 respectively.

This is the unchecked raw value retrived from the EEPROM and it may not be a valid value.

pub fn set_ad_drive_current(&mut self, value: DriveCurrent)[src]

Set drive current for bus AD.

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

Slow slew for bus AC.

true if the pins on this bus have slow slew.

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

Set slow slew for bus AC.

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

Schmitt input for bus AC.

true if the pins on this bus are Schmitt input.

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

Set Schmitt input for bus AC.

pub fn ac_drive_current(&self) -> Result<DriveCurrent, EepromValueError>[src]

Drive current for bus AC.

This is the drive current for the pins on this bus.

pub fn ac_drive_current_unchecked(&self) -> u8[src]

Drive current unchecked for bus AC.

Valid values are 4mA, 8mA, 12mA, or 16mA, represented by 4u8, 8u8, 12u8, or 16u8 respectively.

This is the unchecked raw value retrived from the EEPROM and it may not be a valid value.

pub fn set_ac_drive_current(&mut self, value: DriveCurrent)[src]

Set drive current for bus AC.

impl Eeprom232h[src]

pub fn cbus0_unchecked(&self) -> u8[src]

Get the unchecked value of the Cbus0 pin.

This is the unchecked raw value retrieved from the EEPROM and it may not be a valid value.

pub fn cbus0(&self) -> Result<Cbus232h, EepromValueError>[src]

Get the value of the Cbus0 pin.

pub fn set_cbus0(&mut self, value: Cbus232h)[src]

Get the value of the Cbus0 pin.

pub fn cbus1_unchecked(&self) -> u8[src]

Get the unchecked value of the Cbus1 pin.

This is the unchecked raw value retrieved from the EEPROM and it may not be a valid value.

pub fn cbus1(&self) -> Result<Cbus232h, EepromValueError>[src]

Get the value of the Cbus1 pin.

pub fn set_cbus1(&mut self, value: Cbus232h)[src]

Get the value of the Cbus1 pin.

pub fn cbus2_unchecked(&self) -> u8[src]

Get the unchecked value of the Cbus2 pin.

This is the unchecked raw value retrieved from the EEPROM and it may not be a valid value.

pub fn cbus2(&self) -> Result<Cbus232h, EepromValueError>[src]

Get the value of the Cbus2 pin.

pub fn set_cbus2(&mut self, value: Cbus232h)[src]

Get the value of the Cbus2 pin.

pub fn cbus3_unchecked(&self) -> u8[src]

Get the unchecked value of the Cbus3 pin.

This is the unchecked raw value retrieved from the EEPROM and it may not be a valid value.

pub fn cbus3(&self) -> Result<Cbus232h, EepromValueError>[src]

Get the value of the Cbus3 pin.

pub fn set_cbus3(&mut self, value: Cbus232h)[src]

Get the value of the Cbus3 pin.

pub fn cbus4_unchecked(&self) -> u8[src]

Get the unchecked value of the Cbus4 pin.

This is the unchecked raw value retrieved from the EEPROM and it may not be a valid value.

pub fn cbus4(&self) -> Result<Cbus232h, EepromValueError>[src]

Get the value of the Cbus4 pin.

pub fn set_cbus4(&mut self, value: Cbus232h)[src]

Get the value of the Cbus4 pin.

pub fn cbus5_unchecked(&self) -> u8[src]

Get the unchecked value of the Cbus5 pin.

This is the unchecked raw value retrieved from the EEPROM and it may not be a valid value.

pub fn cbus5(&self) -> Result<Cbus232h, EepromValueError>[src]

Get the value of the Cbus5 pin.

pub fn set_cbus5(&mut self, value: Cbus232h)[src]

Get the value of the Cbus5 pin.

pub fn cbus6_unchecked(&self) -> u8[src]

Get the unchecked value of the Cbus6 pin.

This is the unchecked raw value retrieved from the EEPROM and it may not be a valid value.

pub fn cbus6(&self) -> Result<Cbus232h, EepromValueError>[src]

Get the value of the Cbus6 pin.

pub fn set_cbus6(&mut self, value: Cbus232h)[src]

Get the value of the Cbus6 pin.

pub fn cbus7_unchecked(&self) -> u8[src]

Get the unchecked value of the Cbus7 pin.

This is the unchecked raw value retrieved from the EEPROM and it may not be a valid value.

pub fn cbus7(&self) -> Result<Cbus232h, EepromValueError>[src]

Get the value of the Cbus7 pin.

pub fn set_cbus7(&mut self, value: Cbus232h)[src]

Get the value of the Cbus7 pin.

pub fn cbus8_unchecked(&self) -> u8[src]

Get the unchecked value of the Cbus8 pin.

This is the unchecked raw value retrieved from the EEPROM and it may not be a valid value.

pub fn cbus8(&self) -> Result<Cbus232h, EepromValueError>[src]

Get the value of the Cbus8 pin.

pub fn set_cbus8(&mut self, value: Cbus232h)[src]

Get the value of the Cbus8 pin.

pub fn cbus9_unchecked(&self) -> u8[src]

Get the unchecked value of the Cbus9 pin.

This is the unchecked raw value retrieved from the EEPROM and it may not be a valid value.

pub fn cbus9(&self) -> Result<Cbus232h, EepromValueError>[src]

Get the value of the Cbus9 pin.

pub fn set_cbus9(&mut self, value: Cbus232h)[src]

Get the value of the Cbus9 pin.

impl Eeprom232h[src]

pub fn driver_type(&self) -> Result<DriverType, EepromValueError>[src]

Get the device driver type.

pub fn driver_type_unchecked(&self) -> u8[src]

Get the unchecked device driver type.

This is the unchecked raw value retrieved from the EEPROM and it may not be a valid value.

pub fn set_driver_type(&mut self, value: DriverType)[src]

Set the device driver type.

Trait Implementations

impl Clone for Eeprom232h[src]

impl Debug for Eeprom232h[src]

impl<'_> From<&'_ Eeprom232h> for FT_EEPROM_232H[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.