{{item.title}}
@@ -79,6 +79,14 @@ const m5core2_api = {
}
};
+const coreink_api = {
+ 'title':"CoreInk API",
+ 'item':{
+ 'System & Button & RTC & Speaker':'#/en/api/coreink/system_api',
+ 'E-Ink':'#/en/api/coreink/eink_api'
+ }
+};
+
var arduino_home_page = new Vue({
el:'#arduino_home_page',
@@ -89,6 +97,7 @@ var arduino_home_page = new Vue({
m5core_api: m5core_api,
m5stickc_api: m5stickc_api,
m5core2_api: m5core2_api,
+ coreink_api: coreink_api
}
};
}
diff --git a/docs/en/core/basic.md b/docs/en/core/basic.md
index 3314b44f..93e6edee 100644
--- a/docs/en/core/basic.md
+++ b/docs/en/core/basic.md
@@ -356,6 +356,10 @@ For more information about Pin assignment and Pin Remapping, Please refer to [ES
- [ESP32](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/esp32_datasheet_en.pdf)
- [IP5306](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/IIC_IP5306_REG_V1.4_cn.pdf)
+- **API**
+
+ - [Arduino API](en/arduino/arduino_home_page)
+
## Schematic
- [Schematic](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/schematic/Core/M5-Core-Schematic(20171206).pdf)
diff --git a/docs/en/core/core2.md b/docs/en/core/core2.md
index b471b961..38986c46 100644
--- a/docs/en/core/core2.md
+++ b/docs/en/core/core2.md
@@ -346,6 +346,10 @@ For more information about Pin assignment and Pin Remapping, Please refer to [ES
- [SY7088](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/SY7088-Silergy.pdf)
- [AXP192](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/AXP192_datasheet_en.pdf)
+- **API**
+
+ - [Arduino API](en/arduino/arduino_home_page)
+
## Schematic

diff --git a/docs/en/core/coreink.md b/docs/en/core/coreink.md
index 90a824a2..566b7a2f 100644
--- a/docs/en/core/coreink.md
+++ b/docs/en/core/coreink.md
@@ -217,6 +217,9 @@ For more info on specific pin functions refer to the official ESP32 Docs[ESP32 d
- [SY7088](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/SY7088-Silergy.pdf)
- [GDEW0154M09](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/CoreInk-K048-GDEW0154M09%20V2.0%20Specification.pdf)
+- **API**
+
+ - [Arduino API](en/arduino/arduino_home_page)
## Schematic
diff --git a/docs/en/core/face_kit.md b/docs/en/core/face_kit.md
index 4e7512fb..84fcd80f 100644
--- a/docs/en/core/face_kit.md
+++ b/docs/en/core/face_kit.md
@@ -357,7 +357,10 @@ For more information about Pin assignment and Pin Remapping, Please refer to [ES
- [BMM150](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/BMM150_datasheet_en.pdf)
- [IP5306](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/IIC_IP5306_REG_V1.4_cn.pdf)
+- **API**
+ - [Arduino API](en/arduino/arduino_home_page)
+
## Schematic
- [Schematic](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/schematic/Core/M5-Core-Schematic(20171206).pdf)
diff --git a/docs/en/core/fire.md b/docs/en/core/fire.md
index a1215ca8..c08735c6 100644
--- a/docs/en/core/fire.md
+++ b/docs/en/core/fire.md
@@ -353,6 +353,10 @@ For more information about Pin assignment and Pin Remapping, Please refer to [ES
- [SH200Q](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/SH200Q_en.pdf)
- [IP5306](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/IIC_IP5306_REG_V1.4_cn.pdf)
+- **API**
+
+ - [Arduino API](en/arduino/arduino_home_page)
+
## Version Change
diff --git a/docs/en/core/gray.md b/docs/en/core/gray.md
index 9e232c3f..1656f5df 100644
--- a/docs/en/core/gray.md
+++ b/docs/en/core/gray.md
@@ -332,7 +332,10 @@ For more information about Pin assignment and Pin Remapping, Please refer to [ES
- [MPU6886](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/MPU-6886-000193%2Bv1.1_GHIC_en.pdf)
- [BMM150](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/BMM150_datasheet_en.pdf)
- [IP5306](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/IIC_IP5306_REG_V1.4_cn.pdf)
+
+- **API**
+ - [Arduino API](en/arduino/arduino_home_page)
## Example
diff --git a/docs/en/core/m5go.md b/docs/en/core/m5go.md
index 2da09ae9..07f8151d 100644
--- a/docs/en/core/m5go.md
+++ b/docs/en/core/m5go.md
@@ -337,6 +337,10 @@ To complete schematic, click [here](https://github.com/m5stack/M5-Schematic/tree
- [BMM150](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/BMM150_datasheet_en.pdf)
- [IP5306](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/IIC_IP5306_REG_V1.4_cn.pdf)
+- **API**
+
+ - [Arduino API](en/arduino/arduino_home_page)
+
## Schematic
- [Schematic](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/schematic/Core/M5-Core-Schematic(20171206).pdf)
diff --git a/docs/en/core/m5go_lite.md b/docs/en/core/m5go_lite.md
index 889cc792..ca61b505 100644
--- a/docs/en/core/m5go_lite.md
+++ b/docs/en/core/m5go_lite.md
@@ -330,6 +330,10 @@ For more information about Pin assignment and Pin Remapping, Please refer to [ES
- [BMM150](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/BMM150_datasheet_en.pdf)
- [IP5306](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/IIC_IP5306_REG_V1.4_cn.pdf)
+- **API**
+
+ - [Arduino API](en/arduino/arduino_home_page)
+
## Schematic
- [Schematic](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/schematic/Core/M5-Core-Schematic(20171206).pdf)
diff --git a/docs/en/core/m5paper.md b/docs/en/core/m5paper.md
index 56d6ab41..f793a0c0 100644
--- a/docs/en/core/m5paper.md
+++ b/docs/en/core/m5paper.md
@@ -209,6 +209,9 @@ For more info on specific pin functions refer to the official ESP32 Docs[ESP32 d
- [GT911-datasheet](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/m5paper/gt911_datasheet.pdf)
+- **API**
+
+ - [Arduino API](en/arduino/arduino_home_page)
## Schematic
diff --git a/docs/en/core/m5stickc.md b/docs/en/core/m5stickc.md
index a024e9b0..2536cd0c 100644
--- a/docs/en/core/m5stickc.md
+++ b/docs/en/core/m5stickc.md
@@ -261,6 +261,9 @@ Resolution:80 * 160
- [AXP192](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/AXP192_datasheet_en.pdf)
- [SPM1423](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/SPM1423HM4H-B_datasheet_en.pdf)
+- **API**
+
+ - [Arduino API](en/arduino/arduino_home_page)
## structural-design-file
diff --git a/docs/en/core/m5stickc_plus.md b/docs/en/core/m5stickc_plus.md
index fb67e466..b9d39f02 100644
--- a/docs/en/core/m5stickc_plus.md
+++ b/docs/en/core/m5stickc_plus.md
@@ -265,6 +265,10 @@ Resolution:135 * 240
- [AXP192](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/AXP192_datasheet_en.pdf)
- [SPM1423](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/SPM1423HM4H-B_datasheet_en.pdf)
+- **API**
+
+ - [Arduino API](en/arduino/arduino_home_page)
+
- **Arduino Library**
- [M5StickC_PLUS Library](https://github.com/m5stack/M5StickC-Plus)
diff --git a/docs/zh_CN/api/axp192_core2.md b/docs/zh_CN/api/axp192_core2.md
index 368c900a..8afad9ec 100644
--- a/docs/zh_CN/api/axp192_core2.md
+++ b/docs/zh_CN/api/axp192_core2.md
@@ -6,7 +6,7 @@
**函数原型:**
-void SetLed(uint8_t state);
+`void SetLed(uint8_t state);`
**功能:设置LED电源指示灯。**
@@ -25,7 +25,7 @@ void loop() {}
**函数原型:**
-void SetCHGCurrent(uint8_t state);
+`void SetCHGCurrent(uint8_t state);`
**功能: 设置充电电流.**
@@ -47,7 +47,7 @@ void loop() {
**函数原型:**
-void SetSpkEnable(uint8_t state);
+`void SetSpkEnable(uint8_t state);`
**功能:使能扬声器。**
@@ -68,7 +68,7 @@ void loop() {
**函数原型:**
-void SetBusPowerMode(uint8_t state);
+`void SetBusPowerMode(uint8_t state);`
**功能:使能总线电源输出**
@@ -89,7 +89,7 @@ void loop() {
**函数原型:**
-void SetLcdVoltage(uint16_t voltage)
+`void SetLcdVoltage(uint16_t voltage)`
**功能: 设置屏幕背光电压.**
@@ -112,7 +112,7 @@ void loop() {
**函数原型:**
-void SetLDOEnable(uint8_t number, bool state)
+`void SetLDOEnable(uint8_t number, bool state)`
**功能: 使能LDO引脚**
@@ -137,7 +137,7 @@ void loop() {
**函数原型:**
-void SetLDOVoltage(uint8_t number, uint16_t voltage);
+`void SetLDOVoltage(uint8_t number, uint16_t voltage);`
**功能: 配置LDO引脚电压**
@@ -160,7 +160,7 @@ void loop() {
**函数原型:**
-bool isACIN()
+`bool isACIN()`
**功能:判断是否外接供电**
@@ -185,7 +185,7 @@ void loop() {
**函数原型:**
-uint16_t GetVapsData(void);
+`uint16_t GetVapsData(void);`
**功能: 获取电池容量.**
@@ -212,7 +212,7 @@ void loop() {
**函数原型:**
-uint16_t GetTempData(void);
+`uint16_t GetTempData(void);`
**功能: 获取芯片温度.**
@@ -241,7 +241,7 @@ void loop() {
**函数原型:**
-uint16_t GetIdischargeData(void);
+`uint16_t GetIdischargeData(void);`
**功能: 获取放电电流.**
@@ -270,7 +270,7 @@ void loop() {
**函数原型:**
-uint16_t GetIinData(void);
+`uint16_t GetIinData(void);`
**功能: 获取输入电流.**
@@ -295,7 +295,7 @@ void loop() {
**函数原型:**
-uint16_t GetIusbinData(void);
+`uint16_t GetIusbinData(void);`
**功能:获取USB电流.**
diff --git a/docs/zh_CN/api/axp192_m5stickc.md b/docs/zh_CN/api/axp192_m5stickc.md
index 54cc086d..e099517c 100644
--- a/docs/zh_CN/api/axp192_m5stickc.md
+++ b/docs/zh_CN/api/axp192_m5stickc.md
@@ -6,7 +6,7 @@
**函数原型:**
-void begin(void);
+`void begin(void);`
**功能:初始化 AXP192 芯片。**
@@ -24,7 +24,7 @@ void loop() {}
**函数原型:**
-uint8_t GetWarningLeve(void);
+`uint8_t GetWarningLeve(void);`
**功能: 获取当前报警等级.**
@@ -49,7 +49,7 @@ void loop() {
**函数原型:**
-void ScreenBreath(uint8_t brightness);
+`void ScreenBreath(uint8_t brightness);`
**功能:改变 AXP192 芯片的LDO3输出电压。**
@@ -78,7 +78,7 @@ void loop() {
**函数原型:**
-uint16_t GetVbatData(void);
+`uint16_t GetVbatData(void);`
**功能:获取电池电压值。**
@@ -105,7 +105,7 @@ void loop() {
**函数原型:**
-void LightSleep(uint64_t time_in_us = 0)
+`void LightSleep(uint64_t time_in_us = 0)`
**功能: 控制ESP32进入轻度睡眠模式,开机键唤醒.**
@@ -140,7 +140,7 @@ void loop() {
**函数原型:**
-void DeepSleep(uint64_t time_in_us = 0)
+`void DeepSleep(uint64_t time_in_us = 0)`
**功能: 控制外设进入休眠模式,到达时间自动唤醒.**
@@ -171,7 +171,7 @@ void loop() {
**函数原型:**
-void SetSleep(void);
+`void SetSleep(void);`
**功能: 控制外设进入休眠模式,按下电源键唤醒.**
@@ -200,7 +200,7 @@ void loop() {
**函数原型:**
-uint16_t GetIchargeData(void);
+`uint16_t GetIchargeData(void);`
**功能:获取电池充电电流值。**
@@ -228,7 +228,7 @@ void loop() {
**函数原型:**
-uint32_t GetPowerbatData(void);
+`uint32_t GetPowerbatData(void);`
**功能: 当前电源功率.**
@@ -257,7 +257,7 @@ void loop() {
**函数原型:**
-uint16_t GetVapsData(void);
+`uint16_t GetVapsData(void);`
**功能: 获取电池容量.**
@@ -285,7 +285,7 @@ void loop() {
**函数原型:**
-uint16_t GetTempData(void);
+`uint16_t GetTempData(void);`
**功能: 获取芯片温度.**
@@ -314,7 +314,7 @@ void loop() {
**函数原型:**
-uint16_t GetIdischargeData(void);
+`uint16_t GetIdischargeData(void);`
**功能: 获取放电电流.**
@@ -343,7 +343,7 @@ void loop() {
**函数原型:**
-uint16_t GetIinData(void);
+`uint16_t GetIinData(void);`
**功能: 获取输入电流.**
@@ -368,7 +368,7 @@ void loop() {
**函数原型:**
-uint16_t GetIusbinData(void);
+`uint16_t GetIusbinData(void);`
**功能:获取USB电流.**
diff --git a/docs/zh_CN/api/button.md b/docs/zh_CN/api/button.md
index 7251f323..b4cb0189 100644
--- a/docs/zh_CN/api/button.md
+++ b/docs/zh_CN/api/button.md
@@ -4,7 +4,7 @@
**函数原型:**
-read(); // for arduino
+`read();` // for arduino
**功能:返回按键状态。1:按下;0:松开。**
@@ -27,7 +27,7 @@ void loop() {
**函数原型:**
-isPressed(); // for arduino
+`isPressed();` // for arduino
**功能:返回键值。如果按键按下,总是返回true,否则总是返回false**
@@ -54,7 +54,7 @@ void loop() {
**函数原型:**
-uint32_t lastChange(void);
+`uint32_t lastChange(void);`
**功能:**
@@ -81,7 +81,7 @@ void loop() {
**函数原型:**
-wasPressed(); // for arduino
+`wasPressed();` // for arduino
**功能:返回键值。如果指定按键按下,则返回 1 一次,然后置位为0,否则一直返回 0。**
@@ -108,7 +108,7 @@ void loop() {
**函数原型:**
-pressedFor(uint32_t ms); // for arduino
+`pressedFor(uint32_t ms);` // for arduino
**功能:返回键值。如果指定按键按下超过指定时间之后,则返回 1,否则返回 0。**
@@ -139,7 +139,7 @@ void loop() {
**函数原型:**
-uint8_t releasedFor(uint32_t ms)
+`uint8_t releasedFor(uint32_t ms)`
**功能:**
@@ -169,7 +169,7 @@ void loop() {
**函数原型:**
-uint8_t wasReleased(void)
+`uint8_t wasReleased(void)`
**功能:**
@@ -199,7 +199,7 @@ void loop() {
**函数原型:**
-uint8_t wasReleasefor(uint32_t ms);
+`uint8_t wasReleasefor(uint32_t ms);`
**功能:**
diff --git a/docs/zh_CN/api/commutil.md b/docs/zh_CN/api/commutil.md
index 9a055011..bdbb76b0 100644
--- a/docs/zh_CN/api/commutil.md
+++ b/docs/zh_CN/api/commutil.md
@@ -6,7 +6,7 @@
## writeCommand()
**構文:**
-bool writeCommand(uint8_t address, uint8_t subAddress);
+`bool writeCommand(uint8_t address, uint8_t subAddress);`
**功能:**
@@ -32,7 +32,7 @@
## writeByte()
**構文:**
-bool writeByte(uint8_t address, uint8_t subAddress, uint8_t data);
+`bool writeByte(uint8_t address, uint8_t subAddress, uint8_t data);`
**功能:**
@@ -58,7 +58,7 @@
## writeBytes()
**構文:**
- bool writeBytes(uint8_t address, uint8_t subAddress, uint8_t *data,uint8_t length);
+` bool writeBytes(uint8_t address, uint8_t subAddress, uint8_t *data,uint8_t length);`
**功能:**
@@ -84,7 +84,7 @@
## readByte()
**構文:**
- bool readByte(uint8_t address, uint8_t *result);
+` bool readByte(uint8_t address, uint8_t *result);`
**功能:**
@@ -108,7 +108,7 @@
## readByte()
**構文:**
-bool readByte(uint8_t address, uint8_t subAddress,uint8_t *result);
+`bool readByte(uint8_t address, uint8_t subAddress,uint8_t *result);`
**功能:**
@@ -134,7 +134,7 @@
## readBytes()
**構文:**
-bool readBytes(uint8_t address, uint8_t count,uint8_t * dest);
+`bool readBytes(uint8_t address, uint8_t count,uint8_t * dest);`
**功能:**
@@ -159,7 +159,7 @@
## readBytes()
**構文:**
-bool readBytes(uint8_t address, uint8_t subAddress, uint8_t count, uint8_t * dest);
+`bool readBytes(uint8_t address, uint8_t subAddress, uint8_t count, uint8_t * dest);`
**功能:**
@@ -186,7 +186,7 @@
## scanID()
**構文:**
-bool readBytes(bool *result);
+`bool readBytes(bool *result);`
**功能:**
diff --git a/docs/zh_CN/api/coreink/eink_api.md b/docs/zh_CN/api/coreink/eink_api.md
new file mode 100644
index 00000000..07201f0b
--- /dev/null
+++ b/docs/zh_CN/api/coreink/eink_api.md
@@ -0,0 +1,192 @@
+# E-Ink
+
+?>使用E-Ink屏幕操作函数前,需要创建实例并传入屏幕驱动地址.
+
+```
+#include "M5CoreInk.h"
+Ink_Sprite InkPageSprite(&M5.M5Ink);
+```
+
+## creatSprite
+
+**函数原型:**
+
+`int creatSprite(uint16_t posX,
+ uint16_t posY,
+ uint16_t width = 200,
+ uint16_t height = 200,
+ bool copyFromMem = true);
+`
+
+**功能:创建图像区域,配置是否从屏幕驱动获取图像数据buff(默认为保存true)**
+
+**例程**
+
+```arduino
+
+if( InkPageSprite.creatSprite(0,0,200,200,true) != 0 )
+{
+ Serial.printf"Ink Sprite creat faild");
+}
+
+Serial.printf("Ink Sprite creat successful");
+
+```
+
+## clear
+
+**函数原型:**
+
+`void clear( int cleanFlag = CLEAR_DRAWBUFF );`
+
+**功能:清除图像区域内容,CLEAR_DRAWBUFF(清除尚未Push的图像数据) CLEAR_LASTBUFF(清除上一次刷新的图像数据的缓存区,当再次push时将完整刷新屏幕)**
+
+
+**例程**
+
+```arduino
+
+InkPageSprite.clear();
+
+```
+
+
+## deleteSprite
+
+**函数原型:**
+
+`int deleteSprite();`
+
+**功能:释放已经创建的图像区域**
+
+**例程**
+
+```arduino
+
+InkPageSprite.clear();
+
+```
+
+## pushSprite
+
+**函数原型:**
+
+`int pushSprite();`
+
+**功能:推送已经编辑的图像数据到图像区域(使用绘图API进行操作后,都需要进行Push刷新屏幕)**
+
+**例程**
+
+```arduino
+InkPageSprite.drawString(10,50,"Hello World!",&AsciiFont8x16);
+InkPageSprite.pushSprite();
+```
+
+## drawPix
+
+**函数原型:**
+
+`void drawPix(uint16_t posX,uint16_t posY,uint8_t pixBit);`
+
+**功能:绘制单个像素点 (参数pixBit传入0时为黑色,传入1时为白色)**
+
+**例程**
+
+```arduino
+InkPageSprite.drawPix(100,100,0);
+InkPageSprite.pushSprite();
+```
+
+
+## FillRect
+
+**函数原型:**
+
+`void FillRect(uint16_t posX,
+ uint16_t posY,
+ uint16_t width,
+ uint16_t height,
+ uint8_t pixBit);`
+
+**功能:绘制矩形 (参数pixBit传入0时为黑色,传入1时为白色)**
+
+**例程**
+
+```arduino
+InkPageSprite.FillRect(0,0,100,100,0);
+InkPageSprite.pushSprite();
+```
+
+
+## drawFullBuff
+
+**函数原型:**
+
+`void drawFullBuff(uint8_t* buff, bool bitMode = true);`
+
+` void drawBuff(uint16_t posX,
+ uint16_t posY,
+ uint16_t width,
+ uint16_t height,
+ uint8_t* imageDataptr);`
+
+
+**功能:绘制整个页面, 需要传入完整页面Buff**
+
+
+## drawChar
+
+**函数原型:**
+
+`void drawChar(uint16_t posX,uint16_t posY,char charData,Ink_eSPI_font_t* fontPtr);`
+
+
+**功能:绘制字符**
+
+**例程**
+
+```arduino
+InkPageSprite.drawChar(35,50,'M');
+InkPageSprite.pushSprite();
+```
+
+## drawString
+
+**函数原型:**
+
+`void drawString(uint16_t posX,uint16_t posY,const char* charData,Ink_eSPI_font_t* fontPtr = &AsciiFont8x16);`
+
+
+**功能:绘制字符串**
+
+**例程**
+
+```arduino
+InkPageSprite.drawString(35,50,"Hello World!");
+InkPageSprite.pushSprite();
+```
+
+## getSpritePtr
+
+**函数原型:**
+
+**功能:获取图像Buff数据**
+
+`uint8_t* getSpritePtr(){ return _spriteBuff;}`
+
+**功能:获取图像宽度度坐标数据**
+
+`uint16_t width(){ return _width;}`
+
+**功能:获取图像高度坐标数据**
+
+`uint16_t height(){ return _height;}`
+
+**功能:获取图像X坐标数据**
+
+`uint16_t posX(){ return _posX;}`
+
+**功能:获取图像区域Y坐标数据**
+
+`uint16_t posY(){ return _posY;}`
+
diff --git a/docs/zh_CN/api/coreink/system_api.md b/docs/zh_CN/api/coreink/system_api.md
new file mode 100644
index 00000000..33f1d886
--- /dev/null
+++ b/docs/zh_CN/api/coreink/system_api.md
@@ -0,0 +1,179 @@
+# System & Button & RTC
+
+## begin()
+
+**函数原型:**
+
+`int begin(bool InkEnable = true, bool wireEnable = false);`
+
+**功能:初始化 E-Ink ,RTC , I2C , Speaker**
+
+
+**例程**
+
+```arduino
+#include "M5CoreInk.h"
+
+void setup() {
+ M5.begin(true,false);
+}
+```
+
+## update()
+
+**函数原型:**
+
+`void update();`
+
+**功能:刷新设备按键/蜂鸣器状态**
+
+**例程:**
+```arduino
+
+if( M5.BtnPWR.wasPressed())
+{
+ Serial.printf("Btn wasPressed!");
+}
+M5.update();
+
+```
+
+## Button
+
+**功能:检测设备按键状态**
+
+`M5.BtnUP.wasPressed()`
+
+`M5.BtnDOWN.wasPressed()`
+
+`M5.BtnMID.wasPressed()`
+
+`M5.BtnEXT.wasPressed()`
+
+`M5.BtnPWR.wasPressed()`
+
+?>RTC相关函数使用前请使用`M5.begin();`进行初始化
+
+## Speaker
+
+**功能:蜂鸣器驱动**
+
+`void end();`
+`void mute();`
+`void tone(uint16_t frequency);`
+`void tone(uint16_t frequency, uint32_t duration);`
+`void beep();`
+`void setBeep(uint16_t frequency, uint16_t duration);`
+`void update();`
+`void write(uint8_t value);`
+`void setVolume(uint8_t volume);`
+`void playMusic(const uint8_t *music_data, uint16_t sample_rate);`
+
+```
+M5.Speaker.tone(2700);
+```
+
+## SetTime()
+
+**函数原型:**
+
+`void SetTime(RTC_TimeTypeDef* RTC_TimeStruct)`
+
+**函数参数:**
+
+设置结构体变量时间
+
+
+## GetTime()
+
+**函数原型:**
+
+`void GetTime(RTC_TimeTypeDef* RTC_TimeStruct)`
+
+**函数参数:**
+
+获取结构体时间
+
+
+## SetData()
+
+**函数原型:**
+
+`void SetData(RTC_TimeTypeDef* RTC_DateStruct)`
+
+**函数参数:**
+
+设置结构体变量日期
+
+
+## GetData()
+
+**函数原型:**
+
+`void GetData(RTC_TimeTypeDef* RTC_DateStruct)`
+
+**函数参数:**
+
+获取结构体变量日期
+
+**使用示例:**
+
+```
+#include "M5CoreInk.h"
+
+Ink_Sprite InkPageSprite(&M5.M5Ink);
+
+RTC_TimeTypeDef RTCtime;
+RTC_DateTypeDef RTCDate;
+
+char timeStrbuff[64];
+
+void flushTime(){
+ M5.rtc.GetTime(&RTCtime);
+ M5.rtc.GetData(&RTCDate);
+
+ sprintf(timeStrbuff,"%d/%02d/%02d %02d:%02d:%02d",
+ RTCDate.Year,RTCDate.Month,RTCDate.Date,
+ RTCtime.Hours,RTCtime.Minutes,RTCtime.Seconds);
+
+ InkPageSprite.drawString(10,100,timeStrbuff);
+ InkPageSprite.pushSprite();
+}
+
+void setupTime(){
+
+ RTCtime.Hours = 23;
+ RTCtime.Minutes = 33;
+ RTCtime.Seconds = 33;
+ M5.rtc.SetTime(&RTCtime);
+
+ RTCDate.Year = 2020;
+ RTCDate.Month = 11;
+ RTCDate.Date = 6;
+ M5.rtc.SetData(&RTCDate);
+}
+
+void setup() {
+
+ M5.begin();
+ if( !M5.M5Ink.isInit())
+ {
+ Serial.printf("Ink Init faild");
+ while (1) delay(100);
+ }
+ M5.M5Ink.clear();
+ delay(1000);
+ //creat ink refresh Sprite
+ if( InkPageSprite.creatSprite(0,0,200,200,true) != 0 )
+ {
+ Serial.printf("Ink Sprite creat faild");
+ }
+ setupTime();
+}
+
+void loop() {
+ flushTime();
+ delay(15000);
+}
+```
+
diff --git a/docs/zh_CN/api/eeprom.md b/docs/zh_CN/api/eeprom.md
index fd24affc..3d201a89 100644
--- a/docs/zh_CN/api/eeprom.md
+++ b/docs/zh_CN/api/eeprom.md
@@ -2,7 +2,7 @@
**函数原型:**
-EEPROM.begin(size)
+`EEPROM.begin(size)`
**功能:**
@@ -20,7 +20,7 @@
**函数原型:**
-EEPROM.write(addr, data)
+`EEPROM.write(addr, data)`
**功能:**
@@ -37,7 +37,7 @@
**函数原型:**
-EEPROM.commit()
+`EEPROM.commit()`
**功能:**
@@ -51,7 +51,7 @@ None
**函数原型:**
-EEPROM.read(addr)
+`EEPROM.read(addr)`
**功能:**
diff --git a/docs/zh_CN/api/gpio.md b/docs/zh_CN/api/gpio.md
index 6a89c2b9..5ed51bed 100644
--- a/docs/zh_CN/api/gpio.md
+++ b/docs/zh_CN/api/gpio.md
@@ -48,7 +48,7 @@
**函数原型:**
-int digitalRead(uint8_t pin);
+`int digitalRead(uint8_t pin);`
**功能:**
@@ -81,7 +81,7 @@ pin21_data = digitalRead(21);
**函数原型:**
-void digitalWrite(uint8_t pin, uint8_t val);
+`void digitalWrite(uint8_t pin, uint8_t val);`
**功能:**
@@ -114,7 +114,7 @@ digitalWrite(2,1);
**函数原型:**
-void pinMode(uint8_t pin, uint8_t mode);
+`void pinMode(uint8_t pin, uint8_t mode);`
**功能:**
@@ -148,7 +148,7 @@ pinMode(2,INPUT);
## analogRead()
**函数原型:**
-uint16_t analogRead(uint8_t pin);
+`uint16_t analogRead(uint8_t pin);`
**功能:**
@@ -179,7 +179,7 @@ ret=analogRead(35);
**函数原型:**
-void dacWrite(uint8_t pin, uint8_t value);
+`void dacWrite(uint8_t pin, uint8_t value);`
**功能:**
@@ -210,7 +210,7 @@ dacWrite(25,0x40);
**函数原型:**
-double ledcSetup(uint8_t channel, double freq, uint8_t resolution_bits);
+`double ledcSetup(uint8_t channel, double freq, uint8_t resolution_bits);`
**功能:**
@@ -239,7 +239,7 @@ Actual output frequency.
**函数原型:**
-void ledcAttachPin(uint8_t pin, uint8_t chan);
+`void ledcAttachPin(uint8_t pin, uint8_t chan);`
**功能:**
@@ -261,7 +261,7 @@ Actual output frequency.
**函数原型:**
-void ledcWrite(uint8_t chan, uint32_t duty);
+`void ledcWrite(uint8_t chan, uint32_t duty);`
**功能:**
@@ -289,7 +289,7 @@ Actual output frequency.
**函数原型:**
-void ledcDetachPin(uint8_t pin);
+`void ledcDetachPin(uint8_t pin);`
**功能:**
@@ -310,7 +310,7 @@ Actual output frequency.
**函数原型:**
-bool adcAttachPin(uint8_t pin)
+`bool adcAttachPin(uint8_t pin)`
**功能:**
@@ -330,7 +330,7 @@ Actual output frequency.
**函数原型:**
-bool adcBusy(uint8_t pin)
+`bool adcBusy(uint8_t pin)`
**功能:**
@@ -350,7 +350,7 @@ Actual output frequency.
**函数原型:**
-uint16_t adcEnd(uint8_t pin)
+`uint16_t adcEnd(uint8_t pin)`
**功能:**
@@ -370,7 +370,7 @@ Actual output frequency.
**函数原型:**
-bool adcStart(uint8_t pin)
+`bool adcStart(uint8_t pin)`
**功能:**
@@ -391,7 +391,7 @@ Actual output frequency.
**函数原型:**
-void analogReadResolution(uint8_t bits)
+`void analogReadResolution(uint8_t bits)`
**功能:**
@@ -411,7 +411,7 @@ None
**函数原型:**
-void analogSetAttenuation(adc_attenuation_t attenuation)
+`void analogSetAttenuation(adc_attenuation_t attenuation)`
**功能:**
@@ -431,7 +431,7 @@ None
**函数原型:**
-void analogSetCycles(uint8_t cycles)
+`void analogSetCycles(uint8_t cycles)`
**功能:**
@@ -451,7 +451,7 @@ None
**函数原型:**
-void analogSetPinAttenuation(uint8_t pin, adc_attenuation_t attenuation)
+`void analogSetPinAttenuation(uint8_t pin, adc_attenuation_t attenuation)`
**功能:**
@@ -472,7 +472,7 @@ None
**函数原型:**
-void analogSetSamples(uint8_t samples)
+`void analogSetSamples(uint8_t samples)`
**功能:**
@@ -492,7 +492,7 @@ None
**函数原型:**
-void analogSetWidth(uint8_t bits)
+`void analogSetWidth(uint8_t bits)`
**功能:**
@@ -512,7 +512,7 @@ None
**函数原型:**
-void attachInterrupt(pin, ISR(callback function), interrupt type/mode)
+`void attachInterrupt(pin, ISR(callback function), interrupt type/mode)`
**功能:**
@@ -534,7 +534,7 @@ None.
**函数原型:**
-void detachInterrupt(pin)
+`void detachInterrupt(pin)`
**功能:**
@@ -554,7 +554,7 @@ None.
**函数原型:**
-int hallRead(void));
+`int hallRead(void));`
**功能:**
@@ -572,7 +572,7 @@ int.
**函数原型:**
-uint32_t ledcRead(uint8_t channel)
+`uint32_t ledcRead(uint8_t channel)`
**功能:**
@@ -592,7 +592,7 @@ int.
**函数原型:**
-double ledcReadFreq(uint8_t channel)
+`double ledcReadFreq(uint8_t channel)`
**功能:**
diff --git a/docs/zh_CN/api/imu.md b/docs/zh_CN/api/imu.md
index 3e74d403..bba89f8e 100644
--- a/docs/zh_CN/api/imu.md
+++ b/docs/zh_CN/api/imu.md
@@ -6,7 +6,7 @@
**函数原型:**
-int Init(void);
+`int Init(void);`
**功能:初始化 IMU 芯片。**
@@ -26,7 +26,7 @@ void loop() {}
**函数原型:**
-void getGyroData(float *gx, float *gy, float *gz);
+`void getGyroData(float *gx, float *gy, float *gz);`
**功能:获取 IMU 芯片的三轴陀螺仪数据。**
@@ -52,7 +52,7 @@ void loop() {
**函数原型:**
-void getAccelData(float *ax, float *ay, float *az);
+`void getAccelData(float *ax, float *ay, float *az);`
**功能:获取 IMU 芯片的三轴加速度计数据。**
@@ -78,7 +78,7 @@ void loop() {
**函数原型:**
-void getAccelData(float *pitch, float *roll, float *yaw);
+`void getAccelData(float *pitch, float *roll, float *yaw);`
**功能:获取 IMU 芯片的姿态。**
@@ -104,7 +104,7 @@ void loop() {
**函数原型:**
-void getTempData(float *t);
+`void getTempData(float *t);`
**功能:获取 IMU 芯片的温度。**
diff --git a/docs/zh_CN/api/lcd.md b/docs/zh_CN/api/lcd.md
index 7973c578..aeb762f4 100644
--- a/docs/zh_CN/api/lcd.md
+++ b/docs/zh_CN/api/lcd.md
@@ -34,7 +34,7 @@
**函数原型:**
-begin();
+`begin();`
**参数:**
@@ -57,7 +57,7 @@
**函数原型:**
-sleep();
+`sleep();`
**参数:**
@@ -90,7 +90,7 @@ M5.Lcd.setBrightness(0);
**Syntax:**
-uint16_t alphaBlend(uint8_t alpha, uint16_t fgc, uint16_t bgc);
+`uint16_t alphaBlend(uint8_t alpha, uint16_t fgc, uint16_t bgc);`
**Function argument:**
@@ -123,7 +123,7 @@ M5.Lcd.print(val);
**函数原型:**
-wakeup();
+`wakeup();`
**参数:**
@@ -154,7 +154,7 @@ M5.Lcd.setBrightness(200);
**函数原型:**
-setBrightness(uint8_t brightness);
+`setBrightness(uint8_t brightness);`
**参数:**
@@ -189,7 +189,7 @@ M5.Lcd.setBrightness(200);
**函数原型:**
-progressBar(int x, int y, int w, int h, uint8_t val);
+`progressBar(int x, int y, int w, int h, uint8_t val);`
**参数:**
@@ -230,9 +230,9 @@ Generate a QR code.
**函数原型:**
-qrcode(const char *string, uint16_t x, uint16_t y, uint8_t width, uint8_t version);
+`qrcode(const char *string, uint16_t x, uint16_t y, uint8_t width, uint8_t version);`
-qrcode(const String &string, uint16_t x, uint16_t y, uint8_t width, uint8_t version);
+`qrcode(const String &string, uint16_t x, uint16_t y, uint8_t width, uint8_t version);`
**参数:**
@@ -271,15 +271,15 @@ Generate a QR code.
**函数原型:**
-drawBitmap(int16_t x0, int16_t y0, int16_t w, int16_t h, const uint16_t *data);
+`drawBitmap(int16_t x0, int16_t y0, int16_t w, int16_t h, const uint16_t *data);`
-drawBitmap(int16_t x0, int16_t y0, int16_t w, int16_t h, uint16_t *data);
+`drawBitmap(int16_t x0, int16_t y0, int16_t w, int16_t h, uint16_t *data);`
-drawBitmap(int16_t x0, int16_t y0, int16_t w, int16_t h, const uint16_t *data, uint16_t transparent);
+`drawBitmap(int16_t x0, int16_t y0, int16_t w, int16_t h, const uint16_t *data, uint16_t transparent);`
-drawBitmap(int16_t x0, int16_t y0, int16_t w, int16_t h, const uint8_t *data);
+`drawBitmap(int16_t x0, int16_t y0, int16_t w, int16_t h, const uint8_t *data);`
-drawBitmap(int16_t x0, int16_t y0, int16_t w, int16_t h, uint8_t *data);
+`drawBitmap(int16_t x0, int16_t y0, int16_t w, int16_t h, uint8_t *data);`
**参数:**
@@ -313,7 +313,7 @@ Generate a QR code.
**函数原型:**
-drawChar(int16_t uniCode, int32_t x, uint16_t y, uint8_t font);
+`drawChar(int16_t uniCode, int32_t x, uint16_t y, uint8_t font);`
**函数参数:**
@@ -341,7 +341,7 @@ Generate a QR code.
**函数原型:**
-drawBmpFile(fs::FS &fs, const char *path, uint16_t x, uint16_t y);
+`drawBmpFile(fs::FS &fs, const char *path, uint16_t x, uint16_t y);`
**参数:**
@@ -378,10 +378,10 @@ Generate a QR code.
**函数原型:**
-void drawJpg(const uint8_t *jpg_data, size_t jpg_len, uint16_t x = 0,
+`void drawJpg(const uint8_t *jpg_data, size_t jpg_len, uint16_t x = 0,
uint16_t y = 0, uint16_t maxWidth = 0, uint16_t maxHeight = 0,
uint16_t offX = 0, uint16_t offY = 0,
- jpeg_div_t scale = JPEG_DIV_NONE。);
+ jpeg_div_t scale = JPEG_DIV_NONE。);`
**参数:**
@@ -427,10 +427,10 @@ Generate a QR code.
**函数原型:**
-void drawJpgFile(fs::FS &fs, const char *path, uint16_t x = 0, uint16_t y = 0,
+`void drawJpgFile(fs::FS &fs, const char *path, uint16_t x = 0, uint16_t y = 0,
uint16_t maxWidth = 0, uint16_t maxHeight = 0,
uint16_t offX = 0, uint16_t offY = 0,
- jpeg_div_t scale = JPEG_DIV_NONE);
+ jpeg_div_t scale = JPEG_DIV_NONE);`
**参数:**
@@ -472,9 +472,9 @@ Generate a QR code.
**函数原型:**
-fillScreen(uint16_t color);
+`fillScreen(uint16_t color);`
-
+
**功能:以指定的颜色填充整个屏幕。**
@@ -500,7 +500,7 @@ lcd.fillScreen(lcd.RED)
* * *
-
-
+
## setTextColor()
**函数原型:**
-setTextColor(uint16_t color, uint16_t backgroundcolor);
+`setTextColor(uint16_t color, uint16_t backgroundcolor);`
-
+
**功能:设置显示文本的前景颜色和背景颜色。**
@@ -561,9 +561,9 @@ lcd.setTextColor(lcd.ORANGE, lcd.DARKCYAN)
**函数原型:**
-setCursor(uint16_t x0, uint16_t y0);
+`setCursor(uint16_t x0, uint16_t y0);`
-
+
**功能:移动光标位置到 (x0, y0) 处。**
@@ -590,7 +590,7 @@ lcd.drawPixel(22,22,lcd.RED)
**函数原型:**
-drawPixel(int16_t x, int16_t y, uint16_t color);
+`drawPixel(int16_t x, int16_t y, uint16_t color);`
**功能:在位置(x,y)处画点。**
@@ -627,7 +627,7 @@ lcd.drawPixel(22,22,lcd.RED)
**函数原型:**
-drawChar(int32_t x, int32_t y, uint16_t c, uint32_t color, uint32_t bg, uint8_t size);
+`drawChar(int32_t x, int32_t y, uint16_t c, uint32_t color, uint32_t bg, uint8_t size);`
**参数:**
@@ -658,7 +658,7 @@ lcd.drawPixel(22,22,lcd.RED)
**函数原型:**
-drawFastVLine(int32_t x, int32_t y, int32_t h, uint32_t color);
+`drawFastVLine(int32_t x, int32_t y, int32_t h, uint32_t color);`
**参数:**
@@ -685,7 +685,7 @@ M5.Lcd.drawFastHLine(0, 0, 12, TFT_GREEN);
**函数原型:**
-drawFastHLine(int32_t x, int32_t y, int32_t w, uint32_t color);
+`drawFastHLine(int32_t x, int32_t y, int32_t w, uint32_t color);`
**参数:**
@@ -712,7 +712,7 @@ M5.Lcd.drawFastHLine(0, 0, 12, TFT_GREEN);
**函数原型:**
-drawNumber(long long_num, int32_t poX, int32_t poY);
+`drawNumber(long long_num, int32_t poX, int32_t poY);`
**Function argument:**
@@ -734,7 +734,7 @@ M5.Lcd.drawNumber(12345, 160, 120);
**函数原型:**
-drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color);
+`drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color);`
**功能:以指定的颜色从点(x,y)到点(x1,y1)画直线。**
@@ -766,7 +766,7 @@ lcd.drawLine(0,0,12,12,lcd.WHITE)
**函数原型:**
-drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color);
+`drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color);`
**功能:以指定颜色画三角形,顶点分别为(x,y),(x1,y1)和(x2,y2)。**
@@ -798,9 +798,9 @@ lcd.drawLine(0,0,12,12,lcd.WHITE)
**函数原型:**
-fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color);
+`fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color);`
-**功能:以指定颜色画填充形式的三角形,顶点分别为(x,y),(x1,y1)和(x2,y2)。**
+**功能:以指定颜色画`填充形式`的三角形,顶点分别为(x,y),(x1,y1)和(x2,y2)。**
| 参数 | 描述 |
| --- | --- |
@@ -830,7 +830,7 @@ lcd.drawLine(0,0,12,12,lcd.WHITE)
**函数原型:**
-fillCircle(int32_t x0, int32_t y0, int32_t r, uint32_t color);
+`fillCircle(int32_t x0, int32_t y0, int32_t r, uint32_t color);`
**功能: Draw a filled circle on point(x0, y0), Radis is r with color**
@@ -861,7 +861,7 @@ M5.Lcd.fillCircle(160, 120, 30, 0XFF00FF);
**函数原型:**
-void fillSprite(uint32_t color)
+`void fillSprite(uint32_t color)`
**函数参数:**
@@ -889,9 +889,9 @@ img.fillSprite(WHITE);
**函数原型:**
-uint16_t getCursorX(void);
+`uint16_t getCursorX(void);`
-
+
**功能: 获取x坐标.**
@@ -913,9 +913,9 @@ M5.Lcd.print(X);
**函数原型:**
-uint16_t getCursorY(void);
+`uint16_t getCursorY(void);`
-
+
**功能: 获取y坐标.**
@@ -940,7 +940,7 @@ M5.Lcd.print(Y);
**函数原型:**
-drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color);
+`drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color);`
**功能:以指定颜色画矩形,其中矩形左上角坐标为(x,y),宽高分别为width和height。**
@@ -974,9 +974,9 @@ lcd.drawLine(0,0,12,12,lcd.WHITE)
**函数原型:**
-fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color);
+`fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color);`
-**功能:以指定颜色画填充形式的矩形,其左上角坐标为(x,y),宽高分别为width和height。**
+**功能:以指定颜色画`填充形式`的矩形,其左上角坐标为(x,y),宽高分别为width和height。**
| 参数 | 描述 |
| --- | --- |
@@ -1013,7 +1013,7 @@ lcd.drawLine(0,0,12,12,lcd.WHITE)
**函数原型:**
-uint8_t getRotation(void)
+`uint8_t getRotation(void)`
**Function argument:**
@@ -1038,7 +1038,7 @@ M5.Lcd.print(M5.Lcd.getRotation());
**函数原型:**
-int16_t textWidth(const String& string)
+`int16_t textWidth(const String& string)`
**函数参数:**
@@ -1070,7 +1070,7 @@ M5.Lcd.print(M5.Lcd.textWidth(text));
**函数原型:**
-uint8_t setRotation(void)
+`uint8_t setRotation(void)`
**函数参数:**
@@ -1098,7 +1098,7 @@ M5.Lcd.print(M5.Lcd.getTextDatum());
**函数原型:**
-setTextDatum(uint8_t datum)
+`setTextDatum(uint8_t datum)`
**函数参数:**
@@ -1136,7 +1136,7 @@ M5.Lcd.drawString("hello", 160, 120, 2);
**函数原型:**
-int16_t height(void)
+`int16_t height(void)`
**函数参数:**
@@ -1166,7 +1166,7 @@ M5.Lcd.print(img.height());
**函数原型:**
-setTextPadding(uint16_t x_width)
+`setTextPadding(uint16_t x_width)`
**Function argument:**
@@ -1200,7 +1200,7 @@ M5.Lcd.drawString("Orbitron 32 with padding", 160, 60, 2);
**函数原型:**
-setTextWrap(boolean wrapX, boolean wrapY)
+`setTextWrap(boolean wrapX, boolean wrapY)`
**函数参数:**
@@ -1226,7 +1226,7 @@ M5.Lcd.setTextWrap(ture, true);
**函数原型:**
-int16_t height(void)
+`int16_t height(void)`
**函数参数:**
@@ -1252,7 +1252,7 @@ M5.Lcd.print(M5.Lcd.height());
**函数原型:**
-void pushSprite(int32_t x, int32_t y, uint16_t transparent)
+`void pushSprite(int32_t x, int32_t y, uint16_t transparent)`
**函数参数:**
@@ -1283,9 +1283,9 @@ img.pushSprite(35, 40, WHITE);
**函数原型:**
-drawRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color);
+`drawRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color);`
-**功能:以指定颜色画圆角矩形,其中矩形左上角坐标为(x,y),宽高分别为width和height,圆角半径为radius。**
+**功能:以指定颜色画`圆角`矩形,其中矩形左上角坐标为(x,y),宽高分别为width和height,圆角半径为radius。**
| 参数 | 描述 |
| --- | --- |
@@ -1322,7 +1322,7 @@ lcd.drawLine(0,0,12,12,lcd.WHITE)
**函数原型:**
-int16_t width(void)
+`int16_t width(void)`
**函数参数:**
@@ -1348,7 +1348,7 @@ M5.Lcd.print(M5.Lcd.width());
**函数原型:**
-fillRoundRect(int16_t x, int16_t y, int16_t w, int16_t h, int16_t r, [uint16_t color]);
+`fillRoundRect(int16_t x, int16_t y, int16_t w, int16_t h, int16_t r, [uint16_t color]);`
**参数:**
@@ -1379,7 +1379,7 @@ M5.Lcd.fillRoundRect(180, 70, 122, 10, 4, BLUE);
**函数原型:**
-int16_t width(void)
+`int16_t width(void)`
**函数参数:**
@@ -1407,7 +1407,7 @@ M5.Lcd.print(img.width());
**函数原型:**
-int16_t drawFloat(float floatNumber, uint8_t dp, int32_t poX, int32_t poY);
+`int16_t drawFloat(float floatNumber, uint8_t dp, int32_t poX, int32_t poY);`
**函数参数:**
@@ -1434,7 +1434,7 @@ M5.Lcd.drawFloat(12.345, 3, 160, 120);
**函数原型:**
-drawEllipse(int16_t x0, int16_t y0, int32_t rx, int32_t ry, uint16_t color);
+`drawEllipse(int16_t x0, int16_t y0, int32_t rx, int32_t ry, uint16_t color);`
**参数:**
@@ -1462,7 +1462,7 @@ M5.Lcd.drawEllipse(100,100,20,30, TFT_GREEN);
**函数原型:**
-fillEllipse(int16_t x0, int16_t y0, int32_t rx, int32_t ry, uint16_t color);
+`fillEllipse(int16_t x0, int16_t y0, int32_t rx, int32_t ry, uint16_t color);`
**参数:**
@@ -1492,7 +1492,7 @@ M5.Lcd.drawEllipse(100,100,20,30, TFT_GREEN);
**函数原型:**
-color565(uint8_t red, uint8_t green, uint8_t blue);
+`color565(uint8_t red, uint8_t green, uint8_t blue);`
**参数:**
@@ -1525,7 +1525,7 @@ M5.Lcd.drawEllipse(100,100,20,30, TFT_GREEN);
**函数原型:**
-deleteSprite(void)
+`deleteSprite(void)`
**函数参数:**
@@ -1553,7 +1553,7 @@ img.deleteSprite();
**函数原型:**
-setRotation(uint8_t r);
+`setRotation(uint8_t r);`
**参数:**
@@ -1584,7 +1584,7 @@ img.deleteSprite();
**函数原型:**
-invertDisplay(boolean i);
+`invertDisplay(boolean i);`
**参数:**
@@ -1611,7 +1611,7 @@ img.deleteSprite();
**函数原型:**
-loadFont(String fontName, fs::FS &ffs);
+`loadFont(String fontName, fs::FS &ffs);`
**参数:**
@@ -1636,7 +1636,7 @@ M5.Lcd.loadFont("filename", SD);
**函数原型:**
-unloadFont();
+`unloadFont();`
**参数:**
@@ -1658,7 +1658,7 @@ M5.Lcd.unloadFont();
**函数原型:**
-fontsLoaded();
+`fontsLoaded();`
**参数:**
@@ -1686,7 +1686,7 @@ if(M5.Lcd.unloadFont()){
**函数原型:**
-print();
+`print();`
**功能:在屏幕的当前位置开始打印文本(字符串)text。**
@@ -1717,13 +1717,13 @@ lcd.drawLine(0,0,12,12,lcd.WHITE)
**函数原型:**
-drawString(const char *string, int32_t poX, int32_t poY, uint8_t font);
+`drawString(const char *string, int32_t poX, int32_t poY, uint8_t font);`
-drawString(const char *string, int32_t poX, int32_t poY);
+`drawString(const char *string, int32_t poX, int32_t poY);`
-drawString(const String& string, int32_t poX, int32_t poY, uint8_t font);
+`drawString(const String& string, int32_t poX, int32_t poY, uint8_t font);`
-drawString(const String& string, int32_t poX, int32_t poY);
+`drawString(const String& string, int32_t poX, int32_t poY);`
**参数:**
@@ -1750,7 +1750,7 @@ lcd.drawLine(0,0,12,12,lcd.WHITE)
**函数原型:**
-printf("格式规范",arg1...);
+`printf("格式规范",arg1...);`
**情報:**
@@ -1769,7 +1769,7 @@ M5.Lcd.printf("A=%d",a);
* * *
-
+
**功能:移动光标位置到 (x0, y0) 处。**
@@ -117,7 +117,7 @@ void loop(){}
**函数原型:**
-drawPixel(int16_t x, int16_t y, uint16_t color);
+`drawPixel(int16_t x, int16_t y, uint16_t color);`
**功能:在位置(x,y)处画点。**
@@ -144,7 +144,7 @@ void loop() {}
**函数原型:**
-drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color);
+`drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color);`
**功能:以指定的颜色从点(x,y)到点(x1,y1)画直线。**
@@ -171,7 +171,7 @@ void loop() {}
**函数原型:**
-drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color);
+`drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color);`
**功能:以指定颜色画三角形,顶点分别为(x,y),(x1,y1)和(x2,y2)。**
@@ -198,9 +198,9 @@ void loop() {}
**函数原型:**
-fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color);
+`fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color);`
-**功能:以指定颜色画填充形式的三角形,顶点分别为(x,y),(x1,y1)和(x2,y2)。**
+**功能:以指定颜色画`填充形式`的三角形,顶点分别为(x,y),(x1,y1)和(x2,y2)。**
| 参数 | 描述 |
| --- | --- |
@@ -225,7 +225,7 @@ void loop() {}
**函数原型:**
-drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color);
+`drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color);`
**功能:以指定颜色画矩形,其中矩形左上角坐标为(x,y),宽高分别为width和height。**
@@ -254,9 +254,9 @@ void loop() {}
**函数原型:**
-fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color);
+`fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color);`
-**功能:以指定颜色画填充形式的矩形,其左上角坐标为(x,y),宽高分别为width和height。**
+**功能:以指定颜色画`填充形式`的矩形,其左上角坐标为(x,y),宽高分别为width和height。**
| 参数 | 描述 |
| --- | --- |
@@ -283,9 +283,9 @@ void loop() {}
**函数原型:**
-drawRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color);
+`drawRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color);`
-**功能:以指定颜色画圆角矩形,其中矩形左上角坐标为(x,y),宽高分别为width和height,圆角半径为radius。**
+**功能:以指定颜色画`圆角`矩形,其中矩形左上角坐标为(x,y),宽高分别为width和height,圆角半径为radius。**
| 参数 | 描述 |
| --- | --- |
@@ -313,7 +313,7 @@ void loop() {}
**函数原型:**
-print();
+`print();`
**功能:在屏幕的当前位置开始打印文本(字符串) text。**
diff --git a/docs/zh_CN/api/mpu9250.md b/docs/zh_CN/api/mpu9250.md
index b2654251..f25754ec 100644
--- a/docs/zh_CN/api/mpu9250.md
+++ b/docs/zh_CN/api/mpu9250.md
@@ -6,9 +6,9 @@
**函数原型:**
-void initMPU9250();
+`void initMPU9250();`
-
+
**功能:初始化 MPU6500 芯片。**
@@ -33,9 +33,9 @@ void setup(){
**函数原型:**
-void initAK8963(float * destination);
+`void initAK8963(float * destination);`
-
+
**功能:初始化 AK8963 芯片。**
@@ -74,9 +74,9 @@ void setup(){
**函数原型:**
-void calibrateMPU9250(float * gyroBias, float * accelBias);
+`void calibrateMPU9250(float * gyroBias, float * accelBias);`
-
+
**功能:初始化芯片后,执行该函数以读取静止状态下的陀螺仪和加速度值偏移,并保存到各自的偏移寄存器。**
@@ -127,9 +127,9 @@ void loop(){
**函数原型:**
-uint8_t readByte(uint8_t address, uint8_t subAddress);
+`uint8_t readByte(uint8_t address, uint8_t subAddress);`
-
+
**功能:读取指定寄存器内数据。返回值:寄存器值,长度为8 位。**
@@ -158,9 +158,9 @@ void setup(){
**函数原型:**
-void readGyroData(int16_t * destination);
+`void readGyroData(int16_t * destination);`
-
+
**功能:读取三个方向的陀螺仪值。**
@@ -210,9 +210,9 @@ void loop(){
**函数原型:**
-void readAccelData(int16_t * destination);
+`void readAccelData(int16_t * destination);`
-
+
**功能:读取三个方向的加速度值。**
@@ -262,7 +262,7 @@ void loop(){
**函数原型:**
-int16_t readTempData(void);
+`int16_t readTempData(void);`
**功能:**
diff --git a/docs/zh_CN/api/power.md b/docs/zh_CN/api/power.md
index dc29b323..174749e6 100644
--- a/docs/zh_CN/api/power.md
+++ b/docs/zh_CN/api/power.md
@@ -18,7 +18,7 @@
**函数原型:**
-void begin()
+`void begin()`
**功能:**
@@ -36,7 +36,7 @@ Performs initialization of Power class.
**函数原型:**
-bool setPowerBoostOnOff(bool en)
+`bool setPowerBoostOnOff(bool en)`
**功能:**
@@ -61,7 +61,7 @@ Performs initialization of Power class.
**函数原型:**
-bool setPowerBoostKeepOn(bool en)
+`bool setPowerBoostKeepOn(bool en)`
**功能:**
@@ -84,7 +84,7 @@ Performs initialization of Power class.
**函数原型:**
-bool setPowerVin(bool en)
+`bool setPowerVin(bool en)`
**功能:**
@@ -109,7 +109,7 @@ Performs initialization of Power class.
**函数原型:**
-bool setPowerWLEDSet(bool en)
+`bool setPowerWLEDSet(bool en)`
**功能:**
@@ -134,7 +134,7 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。
**函数原型:**
-bool setPowerBtnEn(bool en)
+`bool setPowerBtnEn(bool en)`
**功能:**
@@ -163,7 +163,7 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。
**函数原型:**
-bool setLowPowerShutdownTime(ShutdownTime time)
+`bool setLowPowerShutdownTime(ShutdownTime time)`
**功能:**
@@ -190,7 +190,7 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。
**函数原型:**
-bool setPowerBoostKeepOn(bool en)
+`bool setPowerBoostKeepOn(bool en)`
**功能:**
@@ -214,7 +214,7 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。
**函数原型:**
-bool setKeepLightLoad(bool en)
+`bool setKeepLightLoad(bool en)`
**功能:**
@@ -240,7 +240,7 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。
**函数原型:**
-bool setLowPowerShutdown(bool en)
+`bool setLowPowerShutdown(bool en)`
**功能:**
@@ -266,7 +266,7 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。
**函数原型:**
-bool setAutoBootOnLoad(bool en)
+`bool setAutoBootOnLoad(bool en)`
**功能:**
@@ -291,7 +291,7 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。
**函数原型:**
-bool setCharge(bool en)
+`bool setCharge(bool en)`
**功能:**
@@ -316,7 +316,7 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。
**函数原型:**
-bool isChargeFull()
+`bool isChargeFull()`
**说明:**
@@ -338,7 +338,7 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。
**函数原型:**
-bool canControl()
+`bool canControl()`
**功能:**
@@ -360,7 +360,7 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。
**函数原型:**
-bool isCharging()
+`bool isCharging()`
**功能:确认是否正在充电**
@@ -380,7 +380,7 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。
**函数原型:**
-int8_t getBatteryLevel()
+`int8_t getBatteryLevel()`
**功能:**
@@ -400,7 +400,7 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。
**函数原型:**
-void setWakeupButton(uint8_t button)
+`void setWakeupButton(uint8_t button)`
**功能:设置睡眠返回端口**
@@ -424,7 +424,7 @@ setWakeupButton(BUTTON_A_PIN);
**函数原型:**
-void reset()
+`void reset()`
**功能:执行CPU重置**
@@ -440,7 +440,7 @@ setWakeupButton(BUTTON_A_PIN);
**函数原型:**
-bool isResetbySoftware()
+`bool isResetbySoftware()`
**功能:**
@@ -462,7 +462,7 @@ setWakeupButton(BUTTON_A_PIN);
**函数原型:**
-bool isResetbyWatchdog()
+`bool isResetbyWatchdog()`
**功能:**
@@ -483,7 +483,7 @@ setWakeupButton(BUTTON_A_PIN);
**函数原型:**
-bool isResetbyDeepsleep()
+`bool isResetbyDeepsleep()`
**功能:**
@@ -504,7 +504,7 @@ setWakeupButton(BUTTON_A_PIN);
**函数原型:**
-bool isResetbyPowerSW()
+`bool isResetbyPowerSW()`
**功能:**
@@ -526,7 +526,7 @@ setWakeupButton(BUTTON_A_PIN);
**函数原型:**
-void deepSleep()
+`void deepSleep()`
**功能:**
此功能转换为深度睡眠模式。
@@ -542,7 +542,7 @@ deepSleep(SLEEP_SEC(5));
**函数原型:**
-void lightSleep(uint64_t time_in_us)
+`void lightSleep(uint64_t time_in_us)`
**功能:**
此功能转换为深度睡眠模式。
@@ -560,7 +560,7 @@ lightSleep(SLEEP_SEC(5));
**函数原型:**
-void powerOFF()
+`void powerOFF()`
**功能:**
关掉电源。
diff --git a/docs/zh_CN/api/pwm.md b/docs/zh_CN/api/pwm.md
index 89c0a7cf..c17f938b 100644
--- a/docs/zh_CN/api/pwm.md
+++ b/docs/zh_CN/api/pwm.md
@@ -6,7 +6,7 @@
**函数原型:**
-void ledcSetup(uint8_t channel, double freq, uint8_t resolution_bits);
+`void ledcSetup(uint8_t channel, double freq, uint8_t resolution_bits);`
**功能:设置PWM通道,频率和分辨率。**
@@ -14,7 +14,7 @@
**函数原型:**
-void ledcAttachPin(uint8_t pin, uint8_t channel);
+`void ledcAttachPin(uint8_t pin, uint8_t channel);`
**功能:将 LEDC 通道绑定到指定 IO 口上以实现输出**
@@ -22,7 +22,7 @@
**函数原型:**
-void ledcWrite(uint8_t channel, uint32_t duty);
+`void ledcWrite(uint8_t channel, uint32_t duty);`
**功能:向channel通道写入duty%占空比。**
diff --git a/docs/zh_CN/api/rtc.md b/docs/zh_CN/api/rtc.md
index ec705dd0..d152b543 100644
--- a/docs/zh_CN/api/rtc.md
+++ b/docs/zh_CN/api/rtc.md
@@ -1,8 +1,10 @@
+
+
## SetTime()
**函数原型:**
-void SetTime(RTC_TimeTypeDef* RTC_TimeStruct)
+`void SetTime(RTC_TimeTypeDef* RTC_TimeStruct)`
**函数参数:**
@@ -30,7 +32,7 @@ void loop(){};
**函数原型:**
-void GetTime(RTC_TimeTypeDef* RTC_TimeStruct)
+`void GetTime(RTC_TimeTypeDef* RTC_TimeStruct)`
**函数参数:**
@@ -70,7 +72,7 @@ void loop() {
**函数原型:**
-void SetData(RTC_TimeTypeDef* RTC_DateStruct)
+`void SetData(RTC_TimeTypeDef* RTC_DateStruct)`
**函数参数:**
@@ -102,7 +104,7 @@ void loop(){};
**函数原型:**
-void GetData(RTC_TimeTypeDef* RTC_DateStruct)
+`void GetData(RTC_TimeTypeDef* RTC_DateStruct)`
**函数参数:**
diff --git a/docs/zh_CN/api/sh200q_m5stickc.md b/docs/zh_CN/api/sh200q_m5stickc.md
index 2ac8aa5f..1428c4e9 100644
--- a/docs/zh_CN/api/sh200q_m5stickc.md
+++ b/docs/zh_CN/api/sh200q_m5stickc.md
@@ -6,7 +6,7 @@
**函数原型:**
-void Init();
+`void Init();`
**功能:初始化 SH200Q 芯片。**
@@ -28,7 +28,7 @@ void loop() {}
**函数原型:**
-void getGyroData(int16_t* gx, int16_t* gy, int16_t* gz);
+`void getGyroData(int16_t* gx, int16_t* gy, int16_t* gz);`
**功能:获取 SH200Q 芯片的三轴陀螺仪数据。**
@@ -57,7 +57,7 @@ void loop() {
**函数原型:**
-void getAccelData(int16_t* ax, int16_t* ay, int16_t* az);
+`void getAccelData(int16_t* ax, int16_t* ay, int16_t* az);`
**功能:获取 SH200Q 芯片的三轴加速度计数据。**
diff --git a/docs/zh_CN/api/speaker.md b/docs/zh_CN/api/speaker.md
index 75cb205c..5915cb02 100644
--- a/docs/zh_CN/api/speaker.md
+++ b/docs/zh_CN/api/speaker.md
@@ -8,7 +8,7 @@ Initialize the speaker.
**函数原型:**
-begin();
+`begin();`
**参数:**
@@ -26,7 +26,7 @@ Mute the speakers and stop the output.
**函数原型:**
-end();
+`end();`
**参数:**
@@ -54,10 +54,10 @@ M5.Speaker.tone(100);
**函数原型:**
-tone(uint16_t freq); // for arduino
+`tone(uint16_t freq);` // for arduino
-tone(uint16_t freq, uint32_t duration); // for arduino
-
+`tone(uint16_t freq, uint32_t duration);` // for arduino
+
**功能:喇叭响指定频率的声音持续指定时间。**
@@ -85,7 +85,7 @@ Set the beep sound.
**函数原型:**
-setBeep(uint16_t freq, uint16_t duration);
+`setBeep(uint16_t freq, uint16_t duration);`
| 参数 |描述 | 型 |
| --- | --- |---|
diff --git a/docs/zh_CN/api/system.md b/docs/zh_CN/api/system.md
index 0a10e25f..6adc7045 100644
--- a/docs/zh_CN/api/system.md
+++ b/docs/zh_CN/api/system.md
@@ -4,9 +4,9 @@
**函数原型:**
-void begin(bool LCDEnable=true, bool SDEnable=true, bool SerialEnable=true,bool I2CEnable=false);
+`void begin(bool LCDEnable=true, bool SDEnable=true, bool SerialEnable=true,bool I2CEnable=false);`
-
+
**功能:清串口缓冲区,设置串口波特率为 115200;初始化 LCD;初始化 SD 卡;初始化 I2C;设置按键 A 是睡眠唤醒按键。**
@@ -81,9 +81,9 @@ void setup() {
**函数原型:**
-void update();
+`void update();`
-
+
**功能:读取按键 A, B, C 的状态。**
@@ -122,9 +122,9 @@ void loop() {
**函数原型:**
-void powerOFF();
+`void powerOFF();`
-
+
**功能:系统进入深度睡眠状态。**
diff --git a/docs/zh_CN/api/system_m5stickc.md b/docs/zh_CN/api/system_m5stickc.md
index b3113849..4b4dff15 100644
--- a/docs/zh_CN/api/system_m5stickc.md
+++ b/docs/zh_CN/api/system_m5stickc.md
@@ -4,9 +4,9 @@
**函数原型:**
-void begin(bool LCDEnable=true, bool PowerEnable=true, bool SerialEnable=true);
+`void begin(bool LCDEnable=true, bool PowerEnable=true, bool SerialEnable=true);`
-
+
**功能:清串口缓冲区,设置串口波特率为 115200;初始化 LCD;初始化电源管理芯片 AXP192。**
@@ -62,7 +62,7 @@ void setup() {
**函数原型:**
-void GetBm8563Time(void);
+`void GetBm8563Time(void);`
**功能:获取当前时分秒的值,并保存到 M5.Rtc.Hour,M5.Rtc.Minute,M5.Rtc.Second 中,ASCII 格式。**
diff --git a/docs/zh_CN/api/tf.md b/docs/zh_CN/api/tf.md
index afdf04ac..94eff47b 100644
--- a/docs/zh_CN/api/tf.md
+++ b/docs/zh_CN/api/tf.md
@@ -4,7 +4,7 @@
**函数原型:**
-begin(cspin);
+`begin(cspin);`
**功能:TF 卡初始化。**
@@ -25,7 +25,7 @@ void setup() {
**函数原型:**
-File open(const char *filepath, uint8_t mode;
+`File open(const char *filepath, uint8_t mode;`
**功能:以指定模式打开指定文件。返回值:文件句柄。**
diff --git a/docs/zh_CN/api/ticker.md b/docs/zh_CN/api/ticker.md
index ff6f21ad..4399e09d 100644
--- a/docs/zh_CN/api/ticker.md
+++ b/docs/zh_CN/api/ticker.md
@@ -2,7 +2,7 @@
**函数原型:**
-void once(float seconds, callback_t callback)
+`void once(float seconds, callback_t callback)`
**功能:**
@@ -21,7 +21,7 @@
**函数原型:**
-void once_ms(uint32_t milliseconds, callback_t callback)
+`void once_ms(uint32_t milliseconds, callback_t callback)`
**功能:**
@@ -40,7 +40,7 @@
**函数原型:**
-void attach(float seconds, void (*callback)(TArg), TArg arg)
+`void attach(float seconds, void (*callback)(TArg), TArg arg)`
**功能:**
@@ -60,7 +60,7 @@
**函数原型:**
-void attach_ms(uint32_t milliseconds, void (*callback)(TArg), TArg arg)
+`void attach_ms(uint32_t milliseconds, void (*callback)(TArg), TArg arg)`
**功能:**
@@ -80,7 +80,7 @@
**函数原型:**
-void attach(float seconds, callback_t callback)
+`void attach(float seconds, callback_t callback)`
**功能:**
@@ -99,7 +99,7 @@
**函数原型:**
-void attach_ms(uint32_t milliseconds, callback_t callback)
+`void attach_ms(uint32_t milliseconds, callback_t callback)`
**功能:**
diff --git a/docs/zh_CN/api/touch.md b/docs/zh_CN/api/touch.md
index 4fe5c6bd..8ea542e4 100644
--- a/docs/zh_CN/api/touch.md
+++ b/docs/zh_CN/api/touch.md
@@ -8,7 +8,7 @@
**函数原型:**
-TouchPoint_t getPressPoint();
+`TouchPoint_t getPressPoint();`
```arduino
#include
@@ -31,7 +31,7 @@ void loop() {
**函数原型:**
-bool ispressed();
+`bool ispressed();`
**Example**
@@ -57,7 +57,7 @@ void loop() {
**函数原型:**
-HotZone_t* creatHotZone(uint16_t x0, uint16_t y0, uint16_t w, uint16_t h, void (*fun)() = nullptr );
+`HotZone_t* creatHotZone(uint16_t x0, uint16_t y0, uint16_t w, uint16_t h, void (*fun)() = nullptr );`
**Example**
@@ -89,7 +89,7 @@ void loop() {
**函数原型:**
-bool inHotZone(TouchPoint_t point);
+`bool inHotZone(TouchPoint_t point);`
**Example**
diff --git a/docs/zh_CN/api/wifi.md b/docs/zh_CN/api/wifi.md
index 85beca90..25efba1e 100644
--- a/docs/zh_CN/api/wifi.md
+++ b/docs/zh_CN/api/wifi.md
@@ -2,7 +2,7 @@
**函数原型:**
-bool WiFi.softAP(const char* ssid, const char* passphrase, int channel, int ssid_hidden, int max_connection)
+`bool WiFi.softAP(const char* ssid, const char* passphrase, int channel, int ssid_hidden, int max_connection)`
**功能:**
@@ -23,7 +23,7 @@
**函数原型:**
-bool softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress subnet)
+`bool softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress subnet)`
**功能:**
@@ -41,7 +41,7 @@
**函数原型:**
-bool softAPdisconnect(bool wifioff = false)
+`bool softAPdisconnect(bool wifioff = false)`
**功能:**
@@ -57,7 +57,7 @@
**函数原型:**
-uint8_t softAPgetStationNum()
+`uint8_t softAPgetStationNum()`
**功能:**
@@ -71,7 +71,7 @@ None
**函数原型:**
-IPAddress softAPIP()
+`IPAddress softAPIP()`
**功能:**
@@ -85,7 +85,7 @@ None
**函数原型:**
-bool softAPsetHostname(const char * hostname)
+`bool softAPsetHostname(const char * hostname)`
**功能:**
@@ -101,7 +101,7 @@ None
**函数原型:**
-const char * softAPgetHostname()
+`const char * softAPgetHostname()`
**功能:**
@@ -115,7 +115,7 @@ None
**函数原型:**
-String softAPmacAddress(void)
+`String softAPmacAddress(void)`
**功能:**
@@ -129,7 +129,7 @@ None
**函数原型:**
-wl_status_t begin(const char* ssid, const char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true)
+`wl_status_t begin(const char* ssid, const char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true)`
**功能:**
@@ -149,7 +149,7 @@ None
**函数原型:**
-bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = (uint32_t)0x00000000, IPAddress dns2 = (uint32_t)0x00000000)
+`bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = (uint32_t)0x00000000, IPAddress dns2 = (uint32_t)0x00000000)`
**功能:**
@@ -170,7 +170,7 @@ None
**函数原型:**
-bool disconnect(bool wifioff = false, bool eraseap = false)
+`bool disconnect(bool wifioff = false, bool eraseap = false)`
**功能:**
@@ -187,7 +187,7 @@ None
**函数原型:**
-bool isConnected()
+`bool isConnected()`
**功能:**
@@ -201,7 +201,7 @@ None
**函数原型:**
-bool setAutoReconnect(bool autoReconnect)
+`bool setAutoReconnect(bool autoReconnect)`
**功能:**
@@ -215,7 +215,7 @@ None
**函数原型:**
-bool getAutoReconnect()
+`bool getAutoReconnect()`
**功能:**
@@ -229,7 +229,7 @@ None
**函数原型:**
-IPAddress localIP()
+`IPAddress localIP()`
**功能:**
@@ -243,7 +243,7 @@ None
**函数原型:**
-IPAddress subnetMask()
+`IPAddress subnetMask()`
**功能:**
@@ -257,7 +257,7 @@ None
**函数原型:**
-IPAddress gatewayIP()
+`IPAddress gatewayIP()`
**功能:**
@@ -271,7 +271,7 @@ None
**函数原型:**
-IPAddress dnsIP(uint8_t dns_no = 0)
+`IPAddress dnsIP(uint8_t dns_no = 0)`
**功能:**
@@ -285,7 +285,7 @@ None
**函数原型:**
-String macAddress()
+`String macAddress()`
**功能:**
@@ -299,7 +299,7 @@ None
**函数原型:**
-const char * getHostname()
+`const char * getHostname()`
**功能:**
@@ -313,7 +313,7 @@ None
**函数原型:**
-wl_status_t status()
+`wl_status_t status()`
**功能:**
@@ -337,7 +337,7 @@ None
**函数原型:**
-int16_t scanNetworks(bool async = false, bool show_hidden = false, bool passive = false, uint32_t max_ms_per_chan = 300)
+`int16_t scanNetworks(bool async = false, bool show_hidden = false, bool passive = false, uint32_t max_ms_per_chan = 300)`
**功能:**
@@ -356,7 +356,7 @@ None
**函数原型:**
-int16_t scanComplete()
+`int16_t scanComplete()`
**功能:**
@@ -370,7 +370,7 @@ None
**函数原型:**
-void scanDelete()
+`void scanDelete()`
**功能:**
@@ -384,7 +384,7 @@ None
**函数原型:**
-String SSID(uint8_t networkItem)
+`String SSID(uint8_t networkItem)`
**功能:**
@@ -401,7 +401,7 @@ None
**函数原型:**
-wifi_auth_mode_t encryptionType(uint8_t networkItem)
+`wifi_auth_mode_t encryptionType(uint8_t networkItem)`
**功能:**
@@ -417,7 +417,7 @@ None
**函数原型:**
-int32_t RSSI(uint8_t networkItem)
+`int32_t RSSI(uint8_t networkItem)`
**功能:**
@@ -433,7 +433,7 @@ None
**函数原型:**
-int32_t channel(uint8_t networkItem)
+`int32_t channel(uint8_t networkItem)`
**功能:**
diff --git a/docs/zh_CN/arduino/arduino_home_page.md b/docs/zh_CN/arduino/arduino_home_page.md
index 508ee419..7af45ad4 100644
--- a/docs/zh_CN/arduino/arduino_home_page.md
+++ b/docs/zh_CN/arduino/arduino_home_page.md
@@ -13,7 +13,7 @@
-
+
{{item.title}}
@@ -78,6 +78,14 @@ const m5stickc_api = {
}
};
+const coreink_api = {
+ 'title':"CoreInk API",
+ 'item':{
+ 'System & Button & RTC & Speaker':'#/zh_CN/api/coreink/system_api',
+ 'E-Ink':'#/zh_CN/api/coreink/eink_api'
+ }
+};
+
var arduino_home_page = new Vue({
el:'#arduino_home_page',
@@ -88,6 +96,7 @@ var arduino_home_page = new Vue({
m5core_api: m5core_api,
m5stickc_api: m5stickc_api,
m5core2_api: m5core2_api,
+ coreink_api: coreink_api
}
};
}
diff --git a/docs/zh_CN/core/basic.md b/docs/zh_CN/core/basic.md
index 4d668d2d..a8095004 100644
--- a/docs/zh_CN/core/basic.md
+++ b/docs/zh_CN/core/basic.md
@@ -294,6 +294,10 @@ TF 卡最大支持 16GB
- [ESP32](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/esp32_datasheet_cn.pdf)
- [IP5306](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/IIC_IP5306_REG_V1.4_cn.pdf)
+- **API**
+
+ - [Arduino API](zh_CN/arduino/arduino_home_page)
+
## 原理图
- [原理图](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/schematic/Core/M5-Core-Schematic(20171206).pdf)
diff --git a/docs/zh_CN/core/core2.md b/docs/zh_CN/core/core2.md
index da3a3357..f6db51a7 100644
--- a/docs/zh_CN/core/core2.md
+++ b/docs/zh_CN/core/core2.md
@@ -337,7 +337,10 @@ TF 卡最大支持 16GB
- [SY7088](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/SY7088-Silergy.pdf)
- [AXP192](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/AXP192_datasheet_en.pdf)
+- **API**
+ - [Arduino API](zh_CN/arduino/arduino_home_page)
+
## 原理图

diff --git a/docs/zh_CN/core/coreink.md b/docs/zh_CN/core/coreink.md
index e453e8a9..c75a7672 100644
--- a/docs/zh_CN/core/coreink.md
+++ b/docs/zh_CN/core/coreink.md
@@ -213,6 +213,10 @@
- [SY7088](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/SY7088-Silergy.pdf)
- [GDEW0154M09](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/CoreInk-K048-GDEW0154M09%20V2.0%20Specification.pdf)
+- **API**
+
+ - [Arduino API](zh_CN/arduino/arduino_home_page)
+
## 原理图
diff --git a/docs/zh_CN/core/face_kit.md b/docs/zh_CN/core/face_kit.md
index 400024ea..877608de 100644
--- a/docs/zh_CN/core/face_kit.md
+++ b/docs/zh_CN/core/face_kit.md
@@ -265,6 +265,10 @@
- [BMM150](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/BMM150_datasheet_en.pdf)
- [IP5306](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/IIC_IP5306_REG_V1.4_cn.pdf)
+- **API**
+
+ - [Arduino API](zh_CN/arduino/arduino_home_page)
+
## 原理图
- [原理图](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/schematic/Core/M5-Core-Schematic(20171206).pdf)
diff --git a/docs/zh_CN/core/fire.md b/docs/zh_CN/core/fire.md
index 6c1e0fc9..74b73028 100644
--- a/docs/zh_CN/core/fire.md
+++ b/docs/zh_CN/core/fire.md
@@ -353,6 +353,10 @@ BMM150 I2C address 0x10
- [SH200Q](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/SH200Q_en.pdf)
- [IP5306](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/IIC_IP5306_REG_V1.4_cn.pdf)
+- **API**
+
+ - [Arduino API](zh_CN/arduino/arduino_home_page)
+
## 原理图
- [原理图](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/schematic/Core/M5-Core-Schematic(20171206).pdf)
diff --git a/docs/zh_CN/core/gray.md b/docs/zh_CN/core/gray.md
index ae3a4b41..93c326b7 100644
--- a/docs/zh_CN/core/gray.md
+++ b/docs/zh_CN/core/gray.md
@@ -324,6 +324,10 @@ BMM150 I2C 地址为 0x10
- [BMM150](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/BMM150_datasheet_en.pdf)
- [IP5306](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/IIC_IP5306_REG_V1.4_cn.pdf)
+- **API**
+
+ - [Arduino API](zh_CN/arduino/arduino_home_page)
+
## 原理图
- [原理图](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/schematic/Core/M5-Core-Schematic(20171206).pdf)
diff --git a/docs/zh_CN/core/m5go.md b/docs/zh_CN/core/m5go.md
index ad3c0f5b..e95c025b 100644
--- a/docs/zh_CN/core/m5go.md
+++ b/docs/zh_CN/core/m5go.md
@@ -342,6 +342,10 @@ BMM150 I2C address 0x10
- [BMM150](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/BMM150_datasheet_en.pdf)
- [IP5306](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/IIC_IP5306_REG_V1.4_cn.pdf)
+- **API**
+
+ - [Arduino API](zh_CN/arduino/arduino_home_page)
+
## 原理图
- [原理图](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/schematic/Core/M5-Core-Schematic(20171206).pdf)
diff --git a/docs/zh_CN/core/m5go_lite.md b/docs/zh_CN/core/m5go_lite.md
index a61f71f0..1c822e97 100644
--- a/docs/zh_CN/core/m5go_lite.md
+++ b/docs/zh_CN/core/m5go_lite.md
@@ -344,6 +344,10 @@ BMM150 I2C address 0x10
- [BMM150](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/BMM150_datasheet_en.pdf)
- [IP5306](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/IIC_IP5306_REG_V1.4_cn.pdf)
+- **API**
+
+ - [Arduino API](zh_CN/arduino/arduino_home_page)
+
## 原理图
- [原理图](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/schematic/Core/M5-Core-Schematic(20171206).pdf)
diff --git a/docs/zh_CN/core/m5paper.md b/docs/zh_CN/core/m5paper.md
index c85112f4..ca6087ad 100644
--- a/docs/zh_CN/core/m5paper.md
+++ b/docs/zh_CN/core/m5paper.md
@@ -206,6 +206,9 @@
- [GT911-datasheet](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/m5paper/gt911_datasheet.pdf)
+- **API**
+
+ - [Arduino API](zh_CN/arduino/arduino_home_page)
## 原理图
diff --git a/docs/zh_CN/core/m5stickc.md b/docs/zh_CN/core/m5stickc.md
index 7faf0834..cf47492b 100644
--- a/docs/zh_CN/core/m5stickc.md
+++ b/docs/zh_CN/core/m5stickc.md
@@ -263,6 +263,10 @@ M5StickC 是 M5Stack 产品系列中的核心设备之一,该产品系列建
- [AXP192](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/AXP192_datasheet_cn.pdf)
- [SPM1423](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/SPM1423HM4H-B_datasheet_en.pdf)
+- **API**
+
+ - [Arduino API](zh_CN/arduino/arduino_home_page)
+
## 结构设计文件
>[点击此处,获取M5StickC开源结构设计文件](https://github.com/m5stack/m5-structural-design-file/tree/master/M5StickC)
diff --git a/docs/zh_CN/core/m5stickc_plus.md b/docs/zh_CN/core/m5stickc_plus.md
index 5da88207..68c8a413 100644
--- a/docs/zh_CN/core/m5stickc_plus.md
+++ b/docs/zh_CN/core/m5stickc_plus.md
@@ -269,6 +269,10 @@ setup()
- **Arduino Library**
- [M5StickC_PLUS Library](https://github.com/m5stack/M5StickC-Plus)
+- **API**
+
+ - [Arduino API](zh_CN/arduino/arduino_home_page)
+
## 案例程序
### ArduinoIDE