MCU-ZHISHAN-IoT / HML_FwLib_STC89

A lite firmware library for STC micro STC89 series MCU based on SDCC complier | 基於SDCC編譯器實現的針對宏晶微电子(STC Micro)STC89系列單晶片的輕量級固件庫
https://hw.zhishan-iot.tk/page/hml/detail/fwlib_stc89.html
Do What The F*ck You Want To Public License
62 stars 19 forks source link

[Feature] PlatformIO support #6

Closed IOsetting closed 3 years ago

IOsetting commented 3 years ago

Because .h files are not in the default folder, when using HML_FwLib_STC89 as a library in PlatformIO project, the header files cannot be recognized automatically. This can be solved by adding a library.json according to https://docs.platformio.org/en/latest/librarymanager/config.html

I am wondering if it is feasible to add a library.json in the root path, which will bring much convenience for PlatformIO users.
The content of library.json could be

{
    "name": "HML_FwLib_STC89",
    "version": "1.3.1",
    "build": {
        "srcDir": "src",
        "includeDir": "inc"
    }
}

And for supressing the hint errors in VSCode editor, linit.h can be included in stc89.h as well

#ifndef ___HML_STC89_H___
#define ___HML_STC89_H___

#include <lint.h> // Add this line
#include <8051.h>

Thanks,

zsiothsu commented 3 years ago

Thanks for your feedback, HML will support PlatformIO.