Skip to content

lc6464/STM32_Drivers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STM32 Drivers Library

中文

项目目的

本仓库提供面向 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。

English

Purpose

This repository provides reusable, header-only STM32F1 drivers and validates them with an independent CMake compile-check project.

Structure

  • Drivers/: driver headers and assets.
  • DriversCompileCheck/: standalone compile-check project for local and CI use.
  • .github/workflows/: CI workflow definitions.

Usage

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 -v

If the default local STM32Cube path exists, STM32CUBE_F1_ROOT can be omitted.

Driver List

  • 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 and License

  • Author: lc6464
  • License: MIT

Contributing

Contributions are welcome through issues, discussions, and pull requests.

About

lc6464 的 STM32 与外部芯片通信的驱动集合,可作为子模块引入项目中。

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors