5 releases

new 0.0.5 Jan 27, 2025
0.0.4 Jan 26, 2025
0.0.3 Jan 26, 2025
0.0.2 Jan 26, 2025
0.0.1 Jan 25, 2025

#490 in Embedded development

Download history 230/week @ 2025-01-21

230 downloads per month

MIT license

115KB
2.5K SLoC

Library for USB PD

Modeled after the Universal Serial Bus Power Delivery Specification USB PD R3.2 v1.1 (2024/10).

The library therefore implements:

  • A policy engine for each supported mode,
  • the protocol layer, and
  • traits for interfacing a user application.

These traits are

  • the Driver that provides methods to talk to the device's PHY, and
  • the DevicePolicyManager, which allows a device to talk to the policy engine, and control it.

Currently supported modes

  • SPR Sink (incomplete)

Credit

Inherits message parsing code from usb-pd-rs.


lib.rs:

USB PD library.

Includes capabilities for implementing:

  • SPR sink

Provides a policy engine (depending on selected capability), protocol layer, and relevant traits for the user applation to implement.

Dependencies

~2.5–3.5MB
~66K SLoC