项目实践

sw2303-rs

Rust embedded-hal driver for SW2303 USB PD controller, providing async/sync support for embedded firmware usage. Evidence: Cargo.toml, src/.

  • Embedded Rust
  • embedded-hal driver
  • Async embedded
  • I2C
  • USB PD

目录

技术栈

运行与交付

CI 工作流
  • build.yml
  • release.yml
能力标记
  • cargo_toml
  • github_actions
JSON

Basics

Rust embedded-hal driver for SW2303 USB PD controller, providing async/sync support for embedded firmware usage. Evidence: Cargo.toml, src/.

Taxonomy

  • Tags: Embedded Rust, embedded-hal driver, Async embedded, I2C, USB PD
  • Why / evidence: Cargo.toml (description/keywords), src/lib.rs.

Architecture

  • Library crate wrapping PD controller register/protocol interactions. Evidence: src/lib.rs, Cargo.toml.
  • Feature flags allow firmware to choose async vs sync integration. Evidence: Cargo.toml.

Conventions

  • no_std-friendly crate configuration and embedded categories. Evidence: Cargo.toml.
  • Standard Rust layout and (optionally) CI workflow files. Evidence: .github/workflows/ci.yml, src/.

Taste notes

USB PD stacks are easiest to evolve when the driver stays “thin” and leaves policy/state machines to the application layer.