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.
One-time Setup
Detailed setup instructions can be found in the libftd2xx crate.
Linux Quickstart
Use static linking (enable the "static" feature flag), and add udev rules.
[]
= "~0.7.0"
= ["static"]
Windows Quickstart
Use dyanmic linking (no feature flags), and run the vendor setup executable to install the vendor library on your system.
[]
= "~0.7.0"
Examples
SPI
use *;
use Ft232hHal;
let ftdi = new?.init_default?;
let mut spi = ftdi.spi?;
I2C
use *;
use Ft232hHal;
let ftdi = new?.init_default?;
let mut i2c = ftdi.i2c?;
GPIO
use *;
use Ft232hHal;
let ftdi = 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.