本仓库提供面向 STM32F1 的可复用、header-only 驱动集合,并通过独立 CMake 工程进行编译验证。
Drivers/:驱动头文件与相关资源。DriversCompileCheck/:独立编译验证工程(本地与 CI 共用)。.github/workflows/:CI 工作流配置。
前置条件:
- CMake + Ninja
arm-none-eabi-gcc >= 15.2- 可用的 STM32CubeF1 包路径
本地编译验证示例:
cmake -S DriversCompileCheck -B DriversCompileCheck/build -G Ninja \
-DSTM32CUBE_F1_ROOT="/path/to/STM32Cube_FW_F1_x.y.z"
cmake --build DriversCompileCheck/build -v如果本机存在默认 STM32Cube 路径,可省略 STM32CUBE_F1_ROOT。
BMI088:SPI 惯性传感器驱动(加速度计/陀螺仪)。Button:中断 + Tick 按键状态机。ByteSpan:对象与字节视图转换工具。DR16:DR16 遥控器 UART DMA 数据解析。EC11:旋转编码器与按键组合驱动。FlashConfig:基于片上 Flash 的配置存储。GenericServo:通用 PWM 舵机控制。INA226:电压/电流/功率监测驱动。LED:高低电平可配置 LED 控制。SSD1306:I2C OLED 显示驱动。StringConverter:无动态内存数字转字符串工具。SW3538:快充芯片测量与状态驱动。Tokenizer:无动态内存字符串分词工具。Watchdog:基于系统 Tick 的软件看门狗。
- 作者:
lc6464 - 许可证:
MIT
欢迎提交 Issue、讨论建议与 Pull Request。
This repository provides reusable, header-only STM32F1 drivers and validates them with an independent CMake compile-check project.
Drivers/: driver headers and assets.DriversCompileCheck/: standalone compile-check project for local and CI use..github/workflows/: CI workflow definitions.
Prerequisites:
- CMake + Ninja
arm-none-eabi-gcc >= 15.2- Valid STM32CubeF1 package root path
Local compile-check example:
cmake -S DriversCompileCheck -B DriversCompileCheck/build -G Ninja \
-DSTM32CUBE_F1_ROOT="/path/to/STM32Cube_FW_F1_x.y.z"
cmake --build DriversCompileCheck/build -vIf the default local STM32Cube path exists, STM32CUBE_F1_ROOT can be omitted.
BMI088: SPI IMU driver (accelerometer + gyroscope).Button: interrupt + tick based button state machine.ByteSpan: object/byte-view conversion helpers.DR16: UART DMA parser for DR16 remote data.EC11: rotary encoder and button integration.FlashConfig: on-chip flash configuration storage.GenericServo: generic PWM servo helper.INA226: voltage/current/power monitor driver.LED: active-level configurable LED helper.SSD1306: I2C OLED display driver.StringConverter: allocation-free numeric string conversion utilities.SW3538: fast-charge measurement and status driver.Tokenizer: allocation-free token parser.Watchdog: software watchdog based on system tick.
- Author:
lc6464 - License:
MIT
Contributions are welcome through issues, discussions, and pull requests.