https://github.com/fmckeogh/usb-pd-rs
USB-PD and associated hardware driver libraries in Rust
https://github.com/fmckeogh/usb-pd-rs
Last synced: about 1 month ago
JSON representation
USB-PD and associated hardware driver libraries in Rust
- Host: GitHub
- URL: https://github.com/fmckeogh/usb-pd-rs
- Owner: fmckeogh
- License: mit
- Created: 2023-03-29T17:03:35.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-21T18:44:10.000Z (11 months ago)
- Last Synced: 2024-05-22T13:05:22.959Z (11 months ago)
- Language: Rust
- Homepage:
- Size: 181 KB
- Stars: 12
- Watchers: 5
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- rust-embedded - usb-pd - PD library, supports using the FUSB302B as a Sink driver, with Source functionality planned. (no-std crates / WIP)
- awesome-embedded-rust - usb-pd - PD library, supports using the FUSB302B as a Sink driver, with Source functionality planned. (no-std crates / WIP)
README
# usb-pd-rs
## *Archived*: use https://github.com/elagil/usbpd instead:)
[](https://github.com/fmckeogh/usb-pd-rs/actions/workflows/ci.yml)
[-usb_pd-blue)](https://fmckeogh.github.io/usb-pd-rs/usb_pd/)

[-fusb302b-blue)](https://fmckeogh.github.io/usb-pd-rs/fusb302b/)
Rust USB-PD library, driver for the FUSB302B, and firmware for the ZY12PDN USB-PD trigger board (ported from [manuelbl/zy12pdn-oss](https://github.com/manuelbl/zy12pdn-oss)).
## Structure
The `usb-pd` library implements the USB-PD logic. A `Source` or `Sink` have corresponding `Driver` traits which are implemented by USB hardware drivers, such as `fusb302b`.
## Usage
```
$ DEFMT_LOG=trace DEFMT_RTT_BUFFER_SIZE=128 cargo r -r
```The MCU on the ZY12PDN board has limited flash so it will not fit without the release profile and a reduced RTT buffer size of 128 bytes.