{"id":33938808,"url":"https://github.com/ftdi-rs/ftdi-embedded-hal","last_synced_at":"2026-04-09T03:31:02.709Z","repository":{"id":43375874,"uuid":"410596850","full_name":"ftdi-rs/ftdi-embedded-hal","owner":"ftdi-rs","description":"Implementation of Rust Embedded HAL traits for FTDI devices","archived":false,"fork":false,"pushed_at":"2025-11-21T21:17:25.000Z","size":137,"stargazers_count":40,"open_issues_count":7,"forks_count":22,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-02T09:26:16.832Z","etag":null,"topics":["embedded-hal","ftdi","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ftdi-rs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-09-26T16:00:45.000Z","updated_at":"2025-12-09T15:25:40.000Z","dependencies_parsed_at":"2023-02-15T06:15:34.404Z","dependency_job_id":"9f324c10-895f-404b-8203-a7b2071a93b0","html_url":"https://github.com/ftdi-rs/ftdi-embedded-hal","commit_stats":{"total_commits":75,"total_committers":9,"mean_commits":8.333333333333334,"dds":0.5733333333333333,"last_synced_commit":"bb2b4e183c57fcc3d8ca7504f5abcefe17c095a6"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/ftdi-rs/ftdi-embedded-hal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftdi-rs%2Fftdi-embedded-hal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftdi-rs%2Fftdi-embedded-hal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftdi-rs%2Fftdi-embedded-hal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftdi-rs%2Fftdi-embedded-hal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ftdi-rs","download_url":"https://codeload.github.com/ftdi-rs/ftdi-embedded-hal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftdi-rs%2Fftdi-embedded-hal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31584567,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embedded-hal","ftdi","rust"],"created_at":"2025-12-12T15:04:08.927Z","updated_at":"2026-04-09T03:31:02.703Z","avatar_url":"https://github.com/ftdi-rs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![crates.io](https://img.shields.io/crates/v/ftdi-embedded-hal.svg)](https://crates.io/crates/ftdi-embedded-hal)\n[![docs.rs](https://docs.rs/ftdi-embedded-hal/badge.svg)](https://docs.rs/ftdi-embedded-hal/)\n[![Build Status](https://github.com/ftdi-rs/ftdi-embedded-hal/workflows/CI/badge.svg)](https://github.com/ftdi-rs/ftdi-embedded-hal/actions)\n\n# ftdi-embedded-hal\n\nThis is an [embedded-hal] implementation for the FTDI chips\nthat use the [libftd2xx] or [ftdi-rs] drivers.\n\nThis enables development of embedded device drivers without the use of\na microcontroller. The FTDI devices interface with a PC via USB, and\nprovide a multi-protocol synchronous serial engine to interface\nwith most GPIO, SPI, and I2C embedded devices.\n\n**Note:**\nThis is strictly a development tool.\nThe crate contains runtime borrow checks and explicit panics to adapt the\nFTDI device into the [embedded-hal] traits.\n\n## Quickstart\n\n* Enable the \"libftd2xx-static\" feature flag to use static linking with libftd2xx driver.\n* Linux users only: Add [udev rules].\n\n```toml\n[dependencies.ftdi-embedded-hal]\nversion = \"0.24.0\"\nfeatures = [\"libftd2xx\", \"libftd2xx-static\"]\n```\n\n## Limitations\n\n* Limited trait support: SPI, I2C, Delay, InputPin, and OutputPin traits are implemented.\n* Limited device support: FT232H, FT2232H, FT4232H.\n* Limited SPI modes support: MODE0, MODE2.\n\n## Examples\n\n### SPI\n\nPin setup:\n\n* D0 - SCK\n* D1 - SDO (MOSI)\n* D2 - SDI (MISO)\n* D3..D7 - Available for CS\n\nCommunicate with SPI devices using [ftdi-rs] driver:\n```rust\nuse ftdi_embedded_hal as hal;\n\nlet device = ftdi::find_by_vid_pid(0x0403, 0x6010)\n    .interface(ftdi::Interface::A)\n    .open()?;\n\nlet hal = hal::FtHal::init_freq(device, 3_000_000)?;\nlet spi = hal.spi()?;\n```\n\nCommunicate with SPI devices using [libftd2xx] driver:\n```rust\nuse ftdi_embedded_hal as hal;\n\nlet device = libftd2xx::Ft2232h::with_description(\"Dual RS232-HS A\")?;\n\nlet hal = hal::FtHal::init_freq(device, 3_000_000)?;\nlet spi = hal.spi()?;\n```\n\n### I2C\n\nCommunicate with I2C devices using [ftdi-rs] driver:\n```rust\nuse ftdi_embedded_hal as hal;\n\nlet device = ftdi::find_by_vid_pid(0x0403, 0x6010)\n    .interface(ftdi::Interface::A)\n    .open()?;\n\nlet hal = hal::FtHal::init_freq(device, 400_000)?;\nlet i2c = hal.i2c()?;\n```\n\nCommunicate with I2C devices using [libftd2xx] driver:\n```rust\nuse ftdi_embedded_hal as hal;\n\nlet device = libftd2xx::Ft232h::with_description(\"Single RS232-HS\")?;\n\nlet hal = hal::FtHal::init_freq(device, 400_000)?;\nlet i2c = hal.i2c()?;\n```\n\n### GPIO\n\nControl GPIO pins using [libftd2xx] driver:\n```rust\nuse ftdi_embedded_hal as hal;\n\nlet device = libftd2xx::Ft232h::with_description(\"Single RS232-HS\")?;\n\nlet hal = hal::FtHal::init_default(device)?;\nlet gpio = hal.ad6();\n```\n\nControl GPIO pins using [ftdi-rs] driver:\n```rust\nuse ftdi_embedded_hal as hal;\n\nlet device = ftdi::find_by_vid_pid(0x0403, 0x6010)\n    .interface(ftdi::Interface::A)\n    .open()?;\n\nlet hal = hal::FtHal::init_default(device)?;\nlet gpio = hal.ad6();\n```\n\n### More examples\n\n* [newAM/eeprom25aa02e48-rs]: read data from Microchip 25AA02E48 SPI EEPROM\n* [newAM/bme280-rs]: read samples from Bosch BME280 sensor via I2C protocol\n\n[embedded-hal]: https://github.com/rust-embedded/embedded-hal\n[ftdi-rs]: https://github.com/tanriol/ftdi-rs\n[libftd2xx crate]: https://github.com/ftdi-rs/libftd2xx-rs/\n[libftd2xx]: https://github.com/ftdi-rs/libftd2xx-rs\n[newAM/eeprom25aa02e48-rs]: https://github.com/newAM/eeprom25aa02e48-rs/blob/main/examples/ftdi.rs\n[newAM/bme280-rs]: https://github.com/newAM/bme280-rs/blob/main/examples/ftdi-i2c.rs\n[udev rules]: https://github.com/ftdi-rs/libftd2xx-rs/#udev-rules\n[setup executable]: https://www.ftdichip.com/Drivers/CDM/CDM21228_Setup.zip\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fftdi-rs%2Fftdi-embedded-hal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fftdi-rs%2Fftdi-embedded-hal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fftdi-rs%2Fftdi-embedded-hal/lists"}