Skip to content

Commit 1defbbf

Browse files
committed
1. Format the file and update the version to 1.0.2
1 parent 5cb4b52 commit 1defbbf

5 files changed

Lines changed: 29 additions & 27 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,6 @@ release/
5757
out/
5858
bin/
5959
obj/
60+
dist/
6061

6162
*.code-workspace

idf_component.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
description: "M5Stack M5PM1 Power Management IC Library"
2+
url: "https://github.com/m5stack/M5PM1"
23
maintainers:
34
- "M5Stack"
45
license: MIT
@@ -11,4 +12,4 @@ dependencies:
1112
espressif/i2c_bus:
1213
version: "^1.0.0"
1314
public: true
14-
version: "1.0.1"
15+
version: "1.0.2"

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "M5PM1",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "M5Stack PM1 Power Management IC Driver Library",
55
"keywords": [
66
"m5stack",

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=M5PM1
2-
version=1.0.1
2+
version=1.0.2
33
author=M5Stack
44
maintainer=M5Stack
55
sentence=M5Stack PM1 Power Management IC Driver Library

src/M5PM1.h

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -312,13 +312,13 @@ typedef enum {
312312
// BTN_STATE - current button state: 0=release, 1=pressed
313313
#define M5PM1_REG_BTN_CFG_1 0x49 // R/W 按钮配置 / Button configuration
314314
// [7] DL_LOCK - 下载模式锁定: 0=正常 1=锁定(禁止进入下载模式)
315-
// DL_LOCK - download mode lock: 0=normal, 1=locked (disable download mode)
315+
// DL_LOCK - download mode lock: 0=normal, 1=locked (disable download mode)
316316
// [6:5] DBL_DLY - 双击间隔: 00=125ms 01=250ms 10=500ms 11=1s
317-
// DBL_DLY - double-click gap: 00=125ms, 01=250ms, 10=500ms, 11=1s
317+
// DBL_DLY - double-click gap: 00=125ms, 01=250ms, 10=500ms, 11=1s
318318
// [4:3] LONG_DLY - 长按延时: 00=1s 01=2s 10=3s 11=4s
319-
// LONG_DLY - long-press delay: 00=1s, 01=2s, 10=3s, 11=4s
319+
// LONG_DLY - long-press delay: 00=1s, 01=2s, 10=3s, 11=4s
320320
// [2:1] CLK_DLY - 单击延时: 00=125ms 01=250ms 10=500ms 11=1s
321-
// CLK_DLY - click delay: 00=125ms, 01=250ms, 10=500ms, 11=1s
321+
// CLK_DLY - click delay: 00=125ms, 01=250ms, 10=500ms, 11=1s
322322
// [0] SINGLE_RST_DIS - 单击复位禁用: 0=使能 1=禁用
323323
// SINGLE_RST_DIS - single-click reset disable: 0=enable, 1=disable
324324
#define M5PM1_REG_BTN_CFG_2 \
@@ -589,29 +589,29 @@ typedef enum {
589589
*/
590590
typedef enum {
591591
M5PM1_BTN_CLICK_DELAY_125MS = 0x00, // 125毫秒
592-
// 125 milliseconds
592+
// 125 milliseconds
593593
M5PM1_BTN_CLICK_DELAY_250MS = 0x01, // 250毫秒
594-
// 250 milliseconds
594+
// 250 milliseconds
595595
M5PM1_BTN_CLICK_DELAY_500MS = 0x02, // 500毫秒
596-
// 500 milliseconds
596+
// 500 milliseconds
597597
M5PM1_BTN_CLICK_DELAY_1000MS = 0x03, // 1000毫秒
598-
// 1000 milliseconds
598+
// 1000 milliseconds
599599
M5PM1_BTN_DOUBLE_CLICK_DELAY_125MS = 0x00, // 双击125毫秒
600-
// Double click 125 milliseconds
600+
// Double click 125 milliseconds
601601
M5PM1_BTN_DOUBLE_CLICK_DELAY_250MS = 0x01, // 双击250毫秒
602-
// Double click 250 milliseconds
602+
// Double click 250 milliseconds
603603
M5PM1_BTN_DOUBLE_CLICK_DELAY_500MS = 0x02, // 双击500毫秒
604-
// Double click 500 milliseconds
604+
// Double click 500 milliseconds
605605
M5PM1_BTN_DOUBLE_CLICK_DELAY_1000MS = 0x03, // 双击1000毫秒
606-
// Double click 1000 milliseconds
606+
// Double click 1000 milliseconds
607607
M5PM1_BTN_LONG_PRESS_DELAY_1000MS = 0x00, // 长按1000毫秒
608-
// Long press 1000 milliseconds
608+
// Long press 1000 milliseconds
609609
M5PM1_BTN_LONG_PRESS_DELAY_2000MS = 0x01, // 长按2000毫秒
610-
// Long press 2000 milliseconds
610+
// Long press 2000 milliseconds
611611
M5PM1_BTN_LONG_PRESS_DELAY_3000MS = 0x02, // 长按3000毫秒
612-
// Long press 3000 milliseconds
612+
// Long press 3000 milliseconds
613613
M5PM1_BTN_LONG_PRESS_DELAY_4000MS = 0x03 // 长按4000毫秒
614-
// Long press 4000 milliseconds
614+
// Long press 4000 milliseconds
615615
} m5pm1_btn_delay_t;
616616

617617
/**
@@ -1902,14 +1902,14 @@ class M5PM1 {
19021902
* @param type 按钮事件类型:M5PM1_BTN_TYPE_CLICK (单击) / M5PM1_BTN_TYPE_DOUBLE (双击) / M5PM1_BTN_TYPE_LONG (长按)
19031903
* Button event type: M5PM1_BTN_TYPE_CLICK (single click) / M5PM1_BTN_TYPE_DOUBLE (double click) /
19041904
* M5PM1_BTN_TYPE_LONG (long press)
1905-
* @param delay 延时配置:
1906-
* - 单击: M5PM1_BTN_CLICK_DELAY_125MS / 250MS / 500MS / 1000MS
1907-
* - 双击: M5PM1_BTN_DOUBLE_CLICK_DELAY_125MS / 250MS / 500MS / 1000MS
1908-
* - 长按: M5PM1_BTN_LONG_PRESS_DELAY_1000MS / 2000MS / 3000MS / 4000MS
1909-
* Delay configuration:
1910-
* - Click: M5PM1_BTN_CLICK_DELAY_125MS / 250MS / 500MS / 1000MS
1911-
* - Double click: M5PM1_BTN_DOUBLE_CLICK_DELAY_125MS / 250MS / 500MS / 1000MS
1912-
* - Long press: M5PM1_BTN_LONG_PRESS_DELAY_1000MS / 2000MS / 3000MS / 4000MS
1905+
* @param delay 延时配置:
1906+
* - 单击: M5PM1_BTN_CLICK_DELAY_125MS / 250MS / 500MS / 1000MS
1907+
* - 双击: M5PM1_BTN_DOUBLE_CLICK_DELAY_125MS / 250MS / 500MS / 1000MS
1908+
* - 长按: M5PM1_BTN_LONG_PRESS_DELAY_1000MS / 2000MS / 3000MS / 4000MS
1909+
* Delay configuration:
1910+
* - Click: M5PM1_BTN_CLICK_DELAY_125MS / 250MS / 500MS / 1000MS
1911+
* - Double click: M5PM1_BTN_DOUBLE_CLICK_DELAY_125MS / 250MS / 500MS / 1000MS
1912+
* - Long press: M5PM1_BTN_LONG_PRESS_DELAY_1000MS / 2000MS / 3000MS / 4000MS
19131913
* @return 成功返回 M5PM1_OK,否则返回错误码
19141914
* Return M5PM1_OK on success, error code otherwise
19151915
*/

0 commit comments

Comments
 (0)