Giter Site home page Giter Site logo

studyhooligen / device_drvfiles Goto Github PK

View Code? Open in Web Editor NEW
26.0 5.0 4.0 14.12 MB

基于STM32HAL库写的常用芯片、设备驱动库

License: Apache License 2.0

C 42.16% C++ 0.11% HTML 51.20% CSS 0.23% CMake 0.76% Batchfile 0.01% Shell 0.01% JavaScript 5.45% Makefile 0.07% Perl 0.02%

device_drvfiles's Introduction

FOSHDP描述

  • 项目全称:免费free开源Open硬件Hardware驱动Driver计划Project
  • 基于STM32HAL库写的常用芯片、设备驱动库

License

本框架中的所有代码都采用了Apache协议,使用者可以闭源修改后的代码,但是必须保留源自作者的版权声明

使用方式

文件结构

--+ device_drvFiles
    --+ EEPROM
        --- EEPROM_24C02.h
        --- ...
        --- 其他型号设备驱动文件
    --+ FLASH
    --+ ...
    --+ 按类型区分的设备文件夹

文件说明

  • 采用Apache协议开源
  • 非超巨大规模设备驱动文件,采用纯C头文件格式
  • 头文件格式
    • 权限声明
    • 预编译选项
    • 移植前必修改量定义(如HAL外设句柄)
    • 其他常量定义
    • 驱动结构定义
    • 驱动函数声明and注释说明
    • 驱动函数详细定义

使用步骤

Tip:以FLASH芯片W25Q256为例

  • 在CubeMX中,设置STM32芯片上与FLASH通信的QSPI外设参数
  • 使用CubeMX生成工程
    • 工程中会自动有在cubeMX中配好的QSPI外设初始化函数
    • 工程中的main.h头文件链接起所有的库文件(所以该工程中的每一个芯片H文件都默认添加了"main.h")
  • 打开工程,在工程编译目录中添加上FLASH_W25Q256.h文件(建议拷贝到当前工程文件目录后再添加)
  • 打开FLASH_W25Q256.h头文件
  • 更改FLASH256QSPI句柄的定义(改为CubeMX生成的句柄,如:hqspi)
  • 移植完成,可以开始使用头文件中声明的所有功能函数了

合作开发

欢迎和我一起开发这个STM32HAL设备驱动文件库

device_drvfiles's People

Contributors

studyhooligen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

device_drvfiles's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.