paMcuLib
paMcuLib copied to clipboard
My commonLib for MCUs. 我的mcu通用库
paMcuLib

-
Intro(介绍
这是一个我用来封装我用过的单片机,并且统一模块接口的库
为了实现更好的移植性和模块性,我还开发两个vscode插件
This is a mcu lib like arduino to unify the module's and mcu's interfaces.
In order to implement better portability and modularity, I also made 2 vscode extensions,
-
Supported mcus(当前支持的平台
-
esp32 stm32
-
tested
stm32f103c8t6

esp32 s2

-
-
demos
-
-
Adapted devices of mcu(当前适配的常用硬件设施
- base(delay, log),gpio,spi,iic
-
Adapted modules(当前库适配的模块
-
paLibSubs/paMods/display 显示
-
u8g2 (ssd1306_iic

-
ili9341(spi
-
lvgl (need enough rom and ram

-
-
paLibSubs/paMods/input 输入
xpt2046(一般配合ili9341用
-
-
Design(项目结构设计
-
Before you use this project, you need to understand the structure of this project.
在开始使用这个项目之前,你应该理解这个项目的结构设计
-
Use my vscode extension submodule helper to manage and load submodules
使用我的vscode插件 submodule helper进行子模块结构的组织 和 子模块的加载
-
submodule helper will load all the submodules according to the folloing json file
submodule helper 会根据下面这样的一个json模板文件加载所有子模块
-
Get latest json templete from here
在这里可以获取到最新的模板

-
It's free to change the “root_folder”, which means that you can load the modules of paMcuLib to any position in you project. Just don't change the structure of the templete.
这个文件里的root_folder是任意设置的,意味着你可以把子我的paMcuLib的所有模块放在任意路径下,只要不破坏他们之间的相对位置关系就行。
-

This is the core part of paMcuLib, which contains by the paCoreInc paCoreSrc
这是paMcuLib主体部分,分为 paCoreInc paCoreSrc 两部分部分
-
paCoreInc
Used to offer the defination of interfaces to paCoreSrc to impletement , and export them to the user layer.
用于组织和规范驱动层抽象的接口规范,还有向用户层提供相应外设的include的头文件
-
paCoreSrc
Implementation of the interfaces in paCoreInc, different MCUs have different implementations.
为具体的驱动实现,根据不同的平台,需要做不同的适配,目前只适配了esp32 stm32,的一些功能,也可以参考已经适配的项目自行适配,或申请加入开发组一起适配
**Look out:**the repostory url of paCoreSrc should be changed according to your platform
**注意:**这个仓库对应的链接是需要根据你使用的平台进行修改的
-
-
-
-
Start Using
大致的使用流程
you can also direcly start project with demos
你也可以用demo来进行项目的开始
demos