#ftdi #hal #usb-device #embedded-devices #usb #io

unmaintained ftd2xx-embedded-hal

embedded-hal implementation for FTDI USB devices

11 releases (breaking)

0.9.1 Aug 10, 2021
0.9.0 Jul 1, 2021
0.8.0 May 29, 2021
0.5.1 Mar 21, 2021
0.2.0 Sep 13, 2020

#19 in #ftdi

Download history 107/week @ 2024-07-24 112/week @ 2024-07-31 19/week @ 2024-08-07 91/week @ 2024-08-14 8/week @ 2024-08-21 2/week @ 2024-08-28 3/week @ 2024-09-04 4/week @ 2024-09-11 19/week @ 2024-09-18 90/week @ 2024-09-25 28/week @ 2024-10-02 29/week @ 2024-10-09 46/week @ 2024-10-16 29/week @ 2024-10-23 27/week @ 2024-10-30 70/week @ 2024-11-06

172 downloads per month

MIT license

51KB
814 lines

Maintenance crates.io docs.rs Build Status

ftd2xx-embedded-hal

Inspired by ftdi-embedded-hal this is an embedded-hal implementation for the for the FTDI chips using the libftd2xx drivers.

This enables development of embedded device drivers without the use of a microcontroller. The FTDI D2xx devices interface with your PC via USB, and provide a multi-protocol synchronous serial engine to interface with most UART, SPI, and I2C embedded devices.

Note: This is strictly a development tool. The crate contains runtime borrow checks and explicit panics to adapt the FTDI device into the embedded-hal traits.

Quickstart

  • Enable the "static" feature flag to use static linking.
  • Linux users only: Add udev rules.
[dependencies.ftd2xx-embedded-hal]
version = "~0.9.1"
features = ["static"]

Examples

SPI

use embedded_hal::prelude::*;
use ftd2xx_embedded_hal::Ft232hHal;

let ftdi = Ft232hHal::new()?.init_default()?;
let mut spi = ftdi.spi()?;

I2C

use embedded_hal::prelude::*;
use ftd2xx_embedded_hal::Ft232hHal;

let ftdi = Ft232hHal::new()?.init_default()?;
let mut i2c = ftdi.i2c()?;

GPIO

use embedded_hal::prelude::*;
use ftd2xx_embedded_hal::Ft232hHal;

let ftdi = Ft232hHal::new()?.init_default()?;
let mut gpio = ftdi.ad6();

Limitations

  • Limited trait support: SPI, I2C, Delay, and OutputPin traits are implemented.
  • Limited device support: FT232H, FT2232H, FT4232H.

Dependencies

~8MB
~76K SLoC