Struct libftd2xx::EepromHeader
source · pub struct EepromHeader(/* private fields */);
Expand description
FTDI EEPROM header common to all FTDI devices.
Implementations§
source§impl EepromHeader
impl EepromHeader
sourcepub fn set_device_type(&mut self, device_type: DeviceType)
pub fn set_device_type(&mut self, device_type: DeviceType)
Set the FTDI device type.
sourcepub fn set_vendor_id(&mut self, value: u16)
pub fn set_vendor_id(&mut self, value: u16)
Set the FTDI USB device vendor ID.
sourcepub fn product_id(&self) -> u16
pub fn product_id(&self) -> u16
FTDI USB product ID.
Typical FTDI product IDs:
0x6001
FT232AM/FT232BM/FT232R0x6010
FT2232C/FT2232D/FT2232H0x6011
FT4232/FT4232H0x6014
FT232H0x6015
FT230X/FT231X/FT234X
sourcepub fn set_product_id(&mut self, value: u16)
pub fn set_product_id(&mut self, value: u16)
Set the FTDI USB product ID.
sourcepub fn serial_number_enable(&self) -> bool
pub fn serial_number_enable(&self) -> bool
Serial Number Enable.
true
if the serial number is to be used.
The documentation is unclear what exactly this means.
sourcepub fn set_serial_number_enable(&mut self, value: bool)
pub fn set_serial_number_enable(&mut self, value: bool)
Set Serial Number Enable.
sourcepub fn max_current(&self) -> u16
pub fn max_current(&self) -> u16
Maximum bus current.
The unit for this value is milliamps, and the value range is 0-500 mA.
sourcepub fn set_max_current(&mut self, value: u16)
pub fn set_max_current(&mut self, value: u16)
Set maximum bus current in milliamps.
Values greater than 500 mA (500u16
) will result in panic.
sourcepub fn self_powered(&self) -> bool
pub fn self_powered(&self) -> bool
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.
sourcepub fn set_self_powered(&mut self, value: bool)
pub fn set_self_powered(&mut self, value: bool)
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.
sourcepub fn remote_wakeup(&self) -> bool
pub fn remote_wakeup(&self) -> bool
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.
sourcepub fn set_remote_wakeup(&mut self, value: bool)
pub fn set_remote_wakeup(&mut self, value: bool)
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.
sourcepub fn pull_down_enable(&self) -> bool
pub fn pull_down_enable(&self) -> bool
Pull down in suspend mode.
true
if pull-down in suspend is enabled.false
if pull-down in suspend is disabled.
sourcepub fn set_pull_down_enable(&mut self, value: bool)
pub fn set_pull_down_enable(&mut self, value: bool)
Set pull down in suspend mode.
true
if pull-down in suspend is enabled.false
if pull-down in suspend is disabled.
Trait Implementations§
source§impl Clone for EepromHeader
impl Clone for EepromHeader
source§fn clone(&self) -> EepromHeader
fn clone(&self) -> EepromHeader
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more