ups120
Rust embedded firmware + libraries for an “UPS120” device, with supporting docs, scripts, and structured submodules for chip drivers/components. Evidence: README.md, firmware/, libs/, rust-toolchain.toml.
- Embedded Rust
- STM32 firmware
- Device mono-repo
- USB PD
- Async embedded
- DC fan speed control
目录
技术栈
运行与交付
- CI 工作流
- check.yml
- dev-release.yml
- release.yml
- 能力标记
- github_actions
- package_json
- package_lock
依赖与工具
- package.json
- 开发依赖
- @commitlint/cli
- @commitlint/config-conventional
- commitlint-plugin-function-rules
- 项目脚本
- commitlint
配置与质量
- 配置文件
- .gitignore
- .gitmodules
- lefthook.yml
- package-lock.json
- package.json
- rust-toolchain.toml
- rustfmt.toml
{
"ci_workflows": [
"check.yml",
"dev-release.yml",
"release.yml"
],
"configs_root": [
".gitignore",
".gitmodules",
"lefthook.yml",
"package-lock.json",
"package.json",
"rust-toolchain.toml",
"rustfmt.toml"
],
"markers_present": [
"github_actions",
"package_json",
"package_lock"
],
"package_json": {
"deps_dev": [
"@commitlint/cli",
"@commitlint/config-conventional",
"commitlint-plugin-function-rules"
],
"scripts": [
"commitlint"
]
}
}Basics
Rust embedded firmware + libraries for an “UPS120” device, with supporting docs, scripts, and structured submodules for chip drivers/components. Evidence: README.md, firmware/, libs/, rust-toolchain.toml.
Taxonomy
- Tags: Embedded Rust, STM32 firmware, Device mono-repo, USB PD, Async embedded, DC fan speed control
- Why / evidence:
firmware/,embassy/,bq76920/,firmware/ups-main/docs/fan_control_spec.md.
Architecture
- Firmware-centric mono-repo with multiple component directories (device-level firmware + chip drivers + shared libs). Evidence:
firmware/,libs/,bq76920/,sc8815/. - Uses Embassy async ecosystem for embedded runtime. Evidence:
embassy/,Cargo.tomlwithin firmware/libs. - Adds a two-wire fan control path using RT9043GB with PWM->RC->FB voltage control and EN gating for linear DC speed regulation. Evidence:
firmware/ups-main/docs/fan_control_spec.md.
Conventions
- Pinned toolchain + formatting config for consistent builds. Evidence:
rust-toolchain.toml,rustfmt.toml. - Hook-based hygiene for commits/formatting. Evidence:
lefthook.yml,commitlint.config.cjs.
Taste notes
This repo is a good “device firmware as a product” example: clear docs, structured components, and disciplined tooling reduce the usual embedded chaos.
相关内容
Async embedded
主题Async embedded 表示嵌入式 Rust 代码把 async 当成正式 API surface 或正式 runtime contract 来维护,而不是只在某个样例里顺手用了异步。
DC fan speed control
主题DC fan speed control 表示项目明确采用两线 DC 风扇的模拟调压控制模式,而不是直接把 PWM chopping 当默认方案。典型实现是 PWM -> RC 滤波 -> 注入可调 LDO 反馈网络,再配合独立 EN 和可选 tach 反馈,把“风扇供电轨”作为一个可调模拟系统来维护。 这个 Topic 的重点是控制策略和电路语义,而不是“有风扇”这么宽。
Device mono-repo
主题Device mono-repo 表示一个仓库同时承载硬件资料、固件、Web/desktop UI、docs/specs、测试工具或发布流程。它强调边界协调:硬件、firmware、UI 和文档互相影响,不应把仓库当作单一应用。 这个 Topic 的核心是设备级知识不能被某一个技术栈吞掉。
Embedded Rust
主题Embedded Rust 表示 Rust 代码运行在 MCU、driver、firmware 或硬件 bring-up 环境中,通常涉及 no_std、Embassy、esp-hal、STM32/ESP32、probe-rs、espflash 或 embedded-hal。它不是所有 Rust 项目的泛化标签。
STM32 firmware
主题STM32 firmware 表示项目把 STM32 系 MCU 作为正式固件目标来维护,并围绕工具链、.ioc 硬件配置、刷写后端、板级职责和与其他 MCU/外设的分工建立了稳定契约。这里的主语不是“用了 STM32”,而是 STM32 固件在系统中的角色。
USB PD
主题USB PD 表示仓库围绕 USB Power Delivery 协议或 PD-aware 固件/驱动维护代码,并把协商档位、controller 行为、sink/source 语义、PPS/AVS 等供电协商边界当成长期知识。这里的主语是供电协商协议,不是 generic embedded I/O。