Skip to content

用于快速构建可跨平台程序的嵌入式MCU固件库

License

Notifications You must be signed in to change notification settings

EmbeddedAlchemist/ExLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExLib

ExLib is an embedded firmware library for rapidly building cross-platform programs.

In order to make the code base on Exlib have ability to port to diffierent hardware platform without large changes, ExLib provice same APIs for different hardware platform, and try to make sure APIs work similarity .

Exlib based on C++, provices Arduino-like grammar, but allow finer control.

A example that print Hello World! with Exlib:

#include <ExLib.hpp> //引入ExLib头文件
using namespace ExLib; //使用ExLib命名空间

UART Serial(UART_Periph::UART0); //构造UART对象,名称为Serial,目标外设为UART0

int usr_main(){
    Serial.begin(115200); //配置UART0及其相关外设(时钟、GPIO等)。配置波特率为115200,其他参数默认。
    Serial.println("Hello World!"); //打印Hello World
    while(true){} //死循环卡住
}

About

用于快速构建可跨平台程序的嵌入式MCU固件库

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published