fix: worng sample code and tag

This commit is contained in:
Mori Naoyuki
2019-05-02 04:07:29 +09:00
parent c7344f36f1
commit 01ed338681
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1,12 +1,12 @@
# Power
* Power related functions depend on the IP5306 chip. Please refer to the data sheet [IP5306] (https://github.com/m5stack/M5-Schematic/blob/master/Core/IIC_IP5306_REG_V1.4.pdf) as required.
* The older M5STACK hardware does not support communication with IP5306 chip. When using functions, also consider supporting out of control cases. *
Use initialization, communication check, and control in this order, as shown in the example below.
```arduino
deepSleep(SLEEP_SEC(5));
M5.Power.begin();
if(!M5.Power.canControl()) {
//can't control.
+1 -1
View File
@@ -1,11 +1,11 @@
# Power
*電源関連の機能はIP5306チップに依存しています。必要に応じてデータシート[IP5306]https://github.com/m5stack/M5-Schematic/blob/master/Core/IIC_IP5306_REG_V1.4.pdf)を参照してください *
*古いM5STACKハードウェアの場合、IP5306チップが通信未対応です。機能を使う場合は制御できないケースも考慮してください。*
下記の例のように、初期化、通信確認、制御の順で使用してください。
```arduino
deepSleep(SLEEP_SEC(5));
M5.Power.begin();
if(!M5.Power.canControl()) {
//can't control.
+1 -1
View File
@@ -1,10 +1,10 @@
# Power
*电源相关的函数可能涉及 IP5306 芯片的寄存器,如果有不明白的地方,可以查看 [IP5306](https://github.com/m5stack/M5-Schematic/blob/master/Core/IIC_IP5306_REG_V1.4.pdf) 的寄存器手册。*
* IP5306芯片不支持与旧M5STACK硬件通信。使用功能时,还要考虑支持失控情况。 *按顺序使用:初始化,通信检查和控制,如以下示例所示。
```arduino
deepSleep(SLEEP_SEC(5));
M5.Power.begin();
if(!M5.Power.canControl()) {
//can't control.