Crates.io | ftd2xx-embedded-hal |
lib.rs | ftd2xx-embedded-hal |
version | 0.9.1 |
source | src |
created_at | 2020-09-12 23:17:08.756321 |
updated_at | 2021-08-10 18:14:07.391871 |
description | embedded-hal implementation for FTDI USB devices. |
homepage | |
repository | https://github.com/newAM/ftd2xx-embedded-hal/ |
max_upload_size | |
id | 287931 |
size | 67,436 |
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.
[dependencies.ftd2xx-embedded-hal]
version = "~0.9.1"
features = ["static"]
use embedded_hal::prelude::*;
use ftd2xx_embedded_hal::Ft232hHal;
let ftdi = Ft232hHal::new()?.init_default()?;
let mut spi = ftdi.spi()?;
use embedded_hal::prelude::*;
use ftd2xx_embedded_hal::Ft232hHal;
let ftdi = Ft232hHal::new()?.init_default()?;
let mut i2c = ftdi.i2c()?;
use embedded_hal::prelude::*;
use ftd2xx_embedded_hal::Ft232hHal;
let ftdi = Ft232hHal::new()?.init_default()?;
let mut gpio = ftdi.ad6();