[−][src]Struct ftd2xx_embedded_hal::Ft232hHal
FT232H device.
Implementations
impl Ft232hHal
[src]
pub fn new() -> Result<Ft232hHal, DeviceTypeError>
[src]
Create a new FT232H structure.
Example
use ftd2xx_embedded_hal as hal; let ftdi = hal::Ft232hHal::new();
pub fn with_ft(ft: Ft232h) -> Ft232hHal
[src]
Create a new FT232H structure from a specific FT232H device.
Examples
Selecting a device with a specific serial number.
use ftd2xx_embedded_hal as hal; use libftd2xx::Ft232h; let ft = Ft232h::with_serial_number("FT59UO4C")?; let ftdi = hal::Ft232hHal::with_ft(ft);
Selecting a device with a specific description.
use ftd2xx_embedded_hal as hal; use libftd2xx::Ft232h; let ft = Ft232h::with_description("My device description")?; let ftdi = hal::Ft232hHal::with_ft(ft);
pub fn spi(&self) -> Result<Spi<'_>, TimeoutError>
[src]
Aquire the SPI peripheral for the FT232H.
Pin assignments:
- AD0 => SCK
- AD1 => MOSI
- AD2 => MISO
Example
use ftd2xx_embedded_hal as hal; let ftdi = hal::Ft232hHal::new()?; let spi = ftdi.spi()?;
pub fn ad0(&self) -> OutputPin<'_>
[src]
Aquire the digital output pin 0 for the FT232H.
pub fn ad1(&self) -> OutputPin<'_>
[src]
Aquire the digital output pin 1 for the FT232H.
pub fn ad2(&self) -> OutputPin<'_>
[src]
Aquire the digital output pin 2 for the FT232H.
pub fn ad3(&self) -> OutputPin<'_>
[src]
Aquire the digital output pin 3 for the FT232H.
pub fn ad4(&self) -> OutputPin<'_>
[src]
Aquire the digital output pin 4 for the FT232H.
pub fn ad5(&self) -> OutputPin<'_>
[src]
Aquire the digital output pin 5 for the FT232H.
pub fn ad6(&self) -> OutputPin<'_>
[src]
Aquire the digital output pin 6 for the FT232H.
pub fn ad7(&self) -> OutputPin<'_>
[src]
Aquire the digital output pin 7 for the FT232H.
Auto Trait Implementations
impl RefUnwindSafe for Ft232hHal
impl !Send for Ft232hHal
impl !Sync for Ft232hHal
impl Unpin for Ft232hHal
impl UnwindSafe for Ft232hHal
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,