[][src]Struct libftd2xx::Eeprom4232h

pub struct Eeprom4232h { /* fields omitted */ }

EEPROM structure for the FT4232H.

This is used by the eeprom_read and eeprom_program methods.

Implementations

impl Eeprom4232h[src]

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

Create a new Eeprom4232h 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 Eeprom4232h[src]

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

Slow slew for bus A.

true if the pins on this bus have slow slew.

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

Set slow slew for bus A.

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

Schmitt input for bus A.

true if the pins on this bus are Schmitt input.

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

Set Schmitt input for bus A.

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

Drive current for bus A.

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

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

Drive current unchecked for bus A.

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_a_drive_current(&mut self, value: DriveCurrent)[src]

Set drive current for bus A.

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

Slow slew for bus B.

true if the pins on this bus have slow slew.

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

Set slow slew for bus B.

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

Schmitt input for bus B.

true if the pins on this bus are Schmitt input.

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

Set Schmitt input for bus B.

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

Drive current for bus B.

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

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

Drive current unchecked for bus B.

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_b_drive_current(&mut self, value: DriveCurrent)[src]

Set drive current for bus B.

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

Slow slew for bus C.

true if the pins on this bus have slow slew.

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

Set slow slew for bus C.

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

Schmitt input for bus C.

true if the pins on this bus are Schmitt input.

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

Set Schmitt input for bus C.

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

Drive current for bus C.

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

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

Drive current unchecked for bus C.

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_c_drive_current(&mut self, value: DriveCurrent)[src]

Set drive current for bus C.

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

Slow slew for bus D.

true if the pins on this bus have slow slew.

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

Set slow slew for bus D.

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

Schmitt input for bus D.

true if the pins on this bus are Schmitt input.

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

Set Schmitt input for bus D.

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

Drive current for bus D.

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

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

Drive current unchecked for bus D.

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_d_drive_current(&mut self, value: DriveCurrent)[src]

Set drive current for bus D.

impl Eeprom4232h[src]

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

Use port A as RS485 TX data enable.

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

Use port A as RS485 TX data enable.

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

Use port B as RS485 TX data enable.

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

Use port B as RS485 TX data enable.

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

Use port C as RS485 TX data enable.

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

Use port C as RS485 TX data enable.

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

Use port D as RS485 TX data enable.

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

Use port D as RS485 TX data enable.

impl Eeprom4232h[src]

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

Get the driver type for port A.

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

Get the unchecked driver type for port A.

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

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

Set the driver type for port A.

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

Get the driver type for port B.

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

Get the unchecked driver type for port B.

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

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

Set the driver type for port B.

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

Get the driver type for port C.

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

Get the unchecked driver type for port C.

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

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

Set the driver type for port C.

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

Get the driver type for port D.

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

Get the unchecked driver type for port D.

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

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

Set the driver type for port D.

Trait Implementations

impl Clone for Eeprom4232h[src]

impl Debug for Eeprom4232h[src]

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