diff --git a/docs/en/api/commutil.md b/docs/en/api/commutil.md index f8d13998..02b6e343 100644 --- a/docs/en/api/commutil.md +++ b/docs/en/api/commutil.md @@ -14,12 +14,14 @@ Write to the specified address. Used when there are no parameters. **Function argument** + | Function argument |Type |Description | | --- | --- | --- | | address | uint8_t |Slave Address | | subAddress | uint8_t |function address | **Function return value** + | Value |Description | | --- | --- | |true|Write success| @@ -37,6 +39,7 @@ Write to the specified address. Used when there is one parameter. **Function argument** + | Function argument |Type |Description | | --- | --- | --- | | address | uint8_t |Slave Address | @@ -44,6 +47,7 @@ Used when there is one parameter. | data | uint8_t |parameter | **Function return value** + | Value |Description | | --- | --- | |true|Write success| @@ -62,6 +66,7 @@ Write to the specified address. Use when there are multiple parameters. **Function argument** + | Function argument |Type |Description | | --- | --- | --- | | address | uint8_t |Slave Address | @@ -70,6 +75,7 @@ Use when there are multiple parameters. | length | uint8_t | length of data | **Function return value** + | Value |Description | | --- | --- | |true|Write success| @@ -87,12 +93,14 @@ Read from the specified address. It is used when there is no data to send before reading and the response is 1 byte. **Function argument** + | Function argument |Type |Description | | --- | --- | --- | | address | uint8_t |Slave Address | | result | uint8_t * | stored memory | **Function return value** + | Value |Description | | --- | --- | |true|Read success| @@ -110,13 +118,15 @@ Read from the specified address. It is used when the data to be sent before reading is only the functional address and the response is 1 byte. **Function argument** + | Function argument |Type |Description | | --- | --- | --- | | address | uint8_t |Slave Address | -| subAddress | uint8_t |機能アドレス | +| subAddress | uint8_t |function address | | result | uint8_t * |stored memory| **Function return value** + | Value |Description | | --- | --- | |true|Read success| @@ -134,6 +144,7 @@ Read from the specified address. Use when there is no data to send before reading and there are multiple responses. **Function argument** + | Function argument |Type |Description | | --- | --- | --- | | address | uint8_t |Slave Address | @@ -141,7 +152,9 @@ Use when there is no data to send before reading and there are multiple response | result | uint8_t * |stored memory| **Function return value** + | Value |Description | +| --- | --- | |true|Read success| |false|Read failure| @@ -156,6 +169,7 @@ Read from the specified address. It is used when the data to be sent before reading is only the functional address and there are multiple responses. **Function argument** + | argument |Typer |Description | | --- | --- | --- | | address | uint8_t |Slave Address | @@ -165,6 +179,7 @@ It is used when the data to be sent before reading is only the functional addres **Function return value** + | Value |Description | | --- | --- | |true|Read success| @@ -181,11 +196,13 @@ It is used when the data to be sent before reading is only the functional addres Perform device presence check on I2C bus. **Function argument** + | Function argument |Type |Description | | --- | --- | --- | | result | bool * |stored memory(128bytes) | **Function return value** + | Value |Description | | --- | --- | |true|Read success| diff --git a/docs/en/api/power.md b/docs/en/api/power.md index 5ce11653..e61ac316 100644 --- a/docs/en/api/power.md +++ b/docs/en/api/power.md @@ -46,11 +46,15 @@ The power does not turn off when connected via USB. **Function argument** +| Param | Description | +| --- | --- | |true|Press and hold to turn on / off.| |false|Turn on / off with two short presses.| **Function return value** +| Param | Description | +| --- | --- | |true|Control success.| |false|Control failure. | @@ -67,11 +71,15 @@ The power does not turn off when connected via USB. **Function argument** +| Param | Description | +| --- | --- | |true| ON / OFF in one short press.| |false| Follow the setPowerBoostOnOff () method.| **Function return value** +| Param | Description | +| --- | --- | |true|Control success.| |false|Control failure. | @@ -88,11 +96,15 @@ Decide whether to turn on the power again. **Function argument** +| Param | Description | +| --- | --- | |true|The power will be turned on again. | |false|The power will not be turned on again. | **Function return value** +| Param | Description | +| --- | --- | |true|Control success.| |false|Control failure. | @@ -109,11 +121,15 @@ In addition, IP5306 of M5GO is not wired and can not be controlled by this funct **Function argument** +| Param | Description | +| --- | --- | |true| Turn on the LED with two short presses| |false| Turn on the LED with Press and hold| **Function return value** +| Param | Description | +| --- | --- | |true|Control success.| |false|Control failure. | @@ -135,11 +151,15 @@ If the power is not supplied, the power can not be turned on. **Function argument** +| Param | Description | +| --- | --- | |true| Accept power operation.| |false| Does not accept power control.| **Function return value** +| Param | Description | +| --- | --- | |true|Control success.| |false|Control failure. | @@ -156,6 +176,8 @@ Set the waiting time until IP5306 makes the energy saving judgment and the power **Function argument** +| Param | Description | +| --- | --- | |ShutdownTime::SHUTDOWN_8S | wait at 8sec.| |ShutdownTime::SHUTDOWN_16S | wait at 16sec.| |ShutdownTime::SHUTDOWN_32S | wait at 32sec.| @@ -163,6 +185,8 @@ Set the waiting time until IP5306 makes the energy saving judgment and the power **Function return value** +| Param | Description | +| --- | --- | |true|Control success.| |false|Control failure. | @@ -179,11 +203,15 @@ This function sets/unsets always boost output mode. **Function argument** +| Param | Description | +| --- | --- | |true| Always output power.| |false| not Always output power.| **Function return value** +| Param | Description | +| --- | --- | |true|Control success.| |false|Control failure. | @@ -200,11 +228,15 @@ This function sets/unsets to disable the automatic shutdown. **Function argument** +| Param | Description | +| --- | --- | |true| When the current is too small, IP5306 will *not* automatically shutdown, | |false| When the current is too small, IP5306 will automatically shutdown. | **Function return value** +| Param | Description | +| --- | --- | |true|Control success.| |false|Control failure. | @@ -222,11 +254,15 @@ Set the power saving automatic shutdown function. **Function argument** +| Param | Description | +| --- | --- | |true|Enable energy saving shutdown function.| |false|Disable energy saving shutdown function.| **Function return value** +| Param | Description | +| --- | --- | |true|Control success.| |false|Control failure. | @@ -243,11 +279,15 @@ Set whether to automatically start when power consumption occurs on the secondar **Function argument** +| Param | Description | +| --- | --- | |true|Enable the auto start function.| |false|Disable auto start function.| **Function return value** +| Param | Description | +| --- | --- | |true|Control success.| |false|Control failure. | @@ -266,11 +306,15 @@ try set charge enable->disable->enable, It can be recharged. **Function argument** +| Param | Description | +| --- | --- | |true|Start charging, | |false| Stop charging. | **Function return value** +| Param | Description | +| --- | --- | |true|Control success.| |false|Control failure. | @@ -290,6 +334,8 @@ No argument. **Function return value** +| Param | Description | +| --- | --- | |true|Full charged, | |false|Not full charged. | @@ -310,6 +356,8 @@ No argument. **Function return value** +| Param | Description | +| --- | --- | |true|Battery controller is found, | |false|Battery controller is not found. | @@ -330,6 +378,8 @@ No argument. **Function return value** +| Param | Description | +| --- | --- | |true|In charging, | |false| Not in charging.| @@ -366,6 +416,8 @@ Sets the signal port to monitor when waking from sleep. **Function argument** +| Param | Description | +| --- | --- | |button| number of port. | **Function return value** @@ -413,6 +465,8 @@ No argument, **Function return value** +| Param | Description | +| --- | --- | |true| By software reset| |false| For other reasons| @@ -432,6 +486,8 @@ No argument, **Function return value** +| Param | Description | +| --- | --- | |true | By watchdog| |false| For other reasons| @@ -451,6 +507,8 @@ No argument, **Function return value** +| Param | Description | +| --- | --- | |true | after deepSleep()| |false| For other reasons| @@ -470,6 +528,8 @@ No argument, **Function return value** +| Param | Description | +| --- | --- | |true | By PowerSwitch| |false| For other reasons| diff --git a/docs/ja/api/gpio.md b/docs/ja/api/gpio.md index 473b1319..0861063d 100644 --- a/docs/ja/api/gpio.md +++ b/docs/ja/api/gpio.md @@ -13,6 +13,7 @@ 端子の状態を読み取ります。` **引数** + | 引数 |型 |説明 | | --- | --- | --- | | pin | uint8 |ピン番号 | diff --git a/docs/ja/api/power.md b/docs/ja/api/power.md index 2e1474f8..387af76c 100644 --- a/docs/ja/api/power.md +++ b/docs/ja/api/power.md @@ -43,11 +43,15 @@ USB接続時は電源をOFFにできません。 **引数** +| 値 |説明 | +| --- |--- | |true|長押しでON/OFFします。| |false|短押し2回でON/OFFします。 | **戻り値** +| 値 |説明 | +| --- |--- | |true|制御成功。| |false|制御失敗。| @@ -64,11 +68,15 @@ USB接続時は電源をOFFにできません。 **引数** +| 引数 |説明 | +| --- |--- | |true|短押し1回でON/OFFします。| |false|setPowerBoostOnOff()の方法に従います。 | **戻り値** +| 値 |説明 | +| --- |--- | |true|制御成功| |false|制御失敗| @@ -85,11 +93,15 @@ USBなどからの電源供給が途切たとき、 **引数** +| 値 |説明 | +| --- |--- | |true|電源を再投入します。| |false|電源を再投入しません。 | **戻り値** +| 値 |説明 | +| --- |--- | |true|制御成功| |false|制御失敗| @@ -107,11 +119,15 @@ USBなどからの電源供給が途切たとき、 **引数** +| 値 |説明 | +| --- |--- | |true|短押し2回でLEDをつけます| |false|長押しでLEDをつけます| **戻り値** +| 値 |説明 | +| --- |--- | |true|制御成功| |false|制御失敗| @@ -130,11 +146,15 @@ USBなどからの電源供給が途切たとき、 **引数** +| 値 |説明 | +| --- |--- | |true|電源操作を受け付けます。| |false|電源操作を受け付けません。| **戻り値** +| 値 |説明 | +| --- |--- | |true|制御成功| |false|制御失敗| @@ -151,6 +171,8 @@ IP5306が省エネ判断をして電源OFFするまでの待ち時間を設定 **引数** +| 値 |説明 | +| --- |--- | |ShutdownTime::SHUTDOWN_8S |8秒待ちます。| |ShutdownTime::SHUTDOWN_16S|16秒待ちます。| |ShutdownTime::SHUTDOWN_32S|32秒待ちます。| @@ -158,6 +180,8 @@ IP5306が省エネ判断をして電源OFFするまでの待ち時間を設定 **戻り値** +| 値 |説明 | +| --- |--- | |true|制御成功| |false|制御失敗| @@ -174,11 +198,15 @@ IP5306が省エネ判断をして電源OFFするまでの待ち時間を設定 **引数** +| 値 |説明 | +| --- |--- | |true|電源供給を常に保ちます。 (IP5306スリープ無効)| |false| 電源供給はIP5306が判断します。(IP5306スリープ有効)| **戻り値** +| 値 |説明 | +| --- |--- | |true|制御成功| |false|制御失敗| @@ -196,11 +224,15 @@ IP5306が省エネ判断をして電源OFFするまでの待ち時間を設定 **引数** +| 値 |説明 | +| --- |--- | |true| 軽負荷時に自動シャットダウンしません。 | |false| 軽負荷時に自動シャットダウンします。 | **戻り値** +| 値 |説明 | +| --- |--- | |true|制御成功| |false|制御失敗| @@ -218,11 +250,15 @@ IP5306が省エネ判断をして電源OFFするまでの待ち時間を設定 **引数** +| 値 |説明 | +| --- |--- | |true|省エネシャットダウン機能を有効にします。| |false|省エネシャットダウン機能を無効にします。| **戻り値** +| 値 |説明 | +| --- |--- | |true|制御成功| |false|制御失敗| @@ -238,11 +274,15 @@ IP5306の2次側に電力消費が発生した場合に自動起動するかを **引数** +| 値 |説明 | +| --- |--- | |true|自動起動機能を有効にします。| |false|自動起動機能を無効にします。| **戻り値** +| 値 |説明 | +| --- |--- | |true|制御成功| |false|制御失敗| @@ -259,11 +299,15 @@ IP5306の2次側に電力消費が発生した場合に自動起動するかを **引数** +| 値 |説明 | +| --- |--- | |true|充電開始指示。| |false|充電中止指示。| **戻り値** +| 値 |説明 | +| --- |--- | |true|制御成功| |false|制御失敗| @@ -284,6 +328,8 @@ IP5306の2次側に電力消費が発生した場合に自動起動するかを **戻り値** +| 値 |説明 | +| --- |--- | |true|満充電。 | |false|満充電ではない。 | @@ -306,6 +352,8 @@ IP5306の2次側に電力消費が発生した場合に自動起動するかを **戻り値** +| 値 |説明 | +| --- |--- | |true|電源コントローラーを制御可能。| |false|電源コントローラーを制御不可能。| @@ -326,6 +374,8 @@ IP5306の2次側に電力消費が発生した場合に自動起動するかを **戻り値** +| 値 |説明 | +| --- |--- | |true|充電中。| |false|充電中ではない。| @@ -362,7 +412,9 @@ IP5306の2次側に電力消費が発生した場合に自動起動するかを **引数** -button: ポート番号 +| 値 |説明 | +| --- |--- | +|button| ポート番号 | **戻り値** @@ -409,8 +461,10 @@ CPUをリセットし、再起動します。 **戻り値** -true : ソフトウェアリセットによるもの -false: それ以外によるもの +| 値 |説明 | +| --- |--- | +|true| ソフトウェアリセットによるもの| +|false| それ以外によるもの| ## isResetbyWatchdog() @@ -428,6 +482,8 @@ false: それ以外によるもの **戻り値** +| 値 |説明 | +| --- |--- | |true|ウォッチドッグによるもの| |false|それ以外によるもの| @@ -447,6 +503,8 @@ false: それ以外によるもの **戻り値** +| 値 |説明 | +| --- |--- | |true|deepSleep()後の起動| |false|それ以外によるもの| @@ -466,6 +524,8 @@ false: それ以外によるもの **戻り値** +| 値 |説明 | +| --- |--- | |true|パワーSWからの電源投入後の起動| |false|それ以外によるもの| diff --git a/docs/zh_CN/api/commutil.md b/docs/zh_CN/api/commutil.md index afb6e6f6..ebec58c7 100644 --- a/docs/zh_CN/api/commutil.md +++ b/docs/zh_CN/api/commutil.md @@ -14,12 +14,14 @@ 没有参数时使用。 **参数** + | 参数 |型 |功能 | | --- | --- | --- | | address | uint8_t |奴隶地址 | | subAddress | uint8_t |功能地址 | **返回值:** + | 値 |功能 | | --- | --- | |true|发送成功。| @@ -38,6 +40,7 @@ 有一个参数时使用。 **参数** + | 参数 |型 |功能 | | --- | --- | --- | | address | uint8_t |奴隶地址 | @@ -45,6 +48,7 @@ | data | uint8_t |参数 | **返回值:** + | 値 |功能 | | --- | --- | |true|发送成功。| @@ -62,6 +66,7 @@ 在有多个参数时使用。 **参数** + | 参数 |型 |功能 | | --- | --- | --- | | address | uint8_t |奴隶地址 | @@ -70,6 +75,7 @@ | length | uint8_t |参数长度 | **返回值:** + | 値 |功能 | | --- | --- | |true|发送成功。| @@ -86,12 +92,14 @@ 在读取之前没有数据要发送且响应为1个字节时使用。 **参数** + | 参数 |型 |功能 | | --- | --- | --- | | address | uint8_t |奴隶地址 | | result | uint8_t * |结果存储目的地 | **返回值:** + | 値 |功能 | | --- | --- | |true|阅读成功。| @@ -108,6 +116,7 @@ 当读取前发送的数据仅为功能地址且响应为1个字节时使用。 **参数** + | 参数 |型 |功能 | | --- | --- | --- | | address | uint8_t |奴隶地址 | @@ -115,6 +124,7 @@ | result | uint8_t * |结果存储目的地 | **返回值:** + | 値 |功能 | | --- | --- | |true|阅读成功。| @@ -132,6 +142,7 @@ 在加载之前没有数据要发送且有多个响应时使用。 **参数** + | 参数 |型 |功能 | | --- | --- | --- | | address | uint8_t |奴隶地址 | @@ -139,6 +150,7 @@ | result | uint8_t * |结果存储目的地 | **返回值:** + | 値 |功能 | | --- | --- | |true|阅读成功。| @@ -155,6 +167,7 @@ 当在读取之前要发送的数据仅是功能地址并且存在多个响应时使用它。 **参数** + | 参数 |型 |功能 | | --- | --- | --- | | address | uint8_t |奴隶地址 | @@ -163,6 +176,7 @@ | result | uint8_t * |结果存储目的地 | **返回值:** + | 値 |功能 | | --- | --- | |true|阅读成功。| @@ -179,11 +193,13 @@ 在I2C总线上执行设备存在检查。 **参数** + | 参数 |型 |功能 | | --- | --- | --- | | result | bool * |结果存储目标(128字节) | **返回值:** + | 値 |功能 | | --- | --- | |true|阅读成功。| diff --git a/docs/zh_CN/api/power.md b/docs/zh_CN/api/power.md index 3451c6b6..dc29b323 100644 --- a/docs/zh_CN/api/power.md +++ b/docs/zh_CN/api/power.md @@ -45,11 +45,15 @@ Performs initialization of Power class. **参数** +| 値 |功能 | +| --- | --- | |true|按住可打开/关闭。| |false|两次短按打开/关闭。| **返回值** +| 値 |功能 | +| --- | --- | |true| 控制成功 | |false| 控制失败| @@ -60,10 +64,14 @@ Performs initialization of Power class. bool setPowerBoostKeepOn(bool en) **功能:** + 更改电源开/关方法。 通过USB连接时,电源不会关闭。 **参数** + +| 値 |功能 | +| --- | --- | |true| 短按一下开/关。| |false| 遵循setPowerBoostOnOff()方法。| @@ -85,11 +93,15 @@ Performs initialization of Power class. **参数** +| 値 |功能 | +| --- | --- | |true| 电源将再次打开。| |false| 电源不会再次打开。| **返回值** +| 値 |功能 | +| --- | --- | |true| 控制成功 | |false| 控制失败| @@ -106,11 +118,15 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。 **参数** +| 値 |功能 | +| --- | --- | |true| 两次短按即可打开LED| |false| 按住可打开LED| **返回值** +| 値 |功能 | +| --- | --- | |true| 控制成功 | |false| 控制失败| @@ -130,11 +146,15 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。 **参数** +| 値 |功能 | +| --- | --- | |true|接受电源操作。| |false|不接受电源控制。| **返回值** +| 値 |功能 | +| --- | --- | |true| 控制成功 | |false| 控制失败| @@ -151,6 +171,8 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。 **参数** +| 値 |功能 | +| --- | --- | |ShutdownTime::SHUTDOWN_8S | 等待8秒。| |ShutdownTime::SHUTDOWN_16S| 等待16秒。| |ShutdownTime::SHUTDOWN_32S| 等待32秒。| @@ -158,6 +180,8 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。 **返回值** +| 値 |功能 | +| --- | --- | |true| 控制成功 | |false| 控制失败| @@ -174,11 +198,15 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。 **参数** +| 値 |功能 | +| --- | --- | |true|总是输出功率。| |false|不总是输出功率。 | **返回值** +| 値 |功能 | +| --- | --- | |true| 控制成功 | |false| 控制失败| @@ -196,11 +224,15 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。 **参数** +| 値 |功能 | +| --- | --- | |true|当电流消耗低时,不会发生自动关闭 | |false|电流消耗低时自动关闭 | **返回值** +| 値 |功能 | +| --- | --- | |true| 控制成功 | |false| 控制失败| @@ -218,11 +250,15 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。 **参数** +| 値 |功能 | +| --- | --- | |true|启用节能关机功能。| |false|禁用节能关机功能。| **返回值** +| 値 |功能 | +| --- | --- | |true| 控制成功 | |false| 控制失败| @@ -238,11 +274,15 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。 **参数** +| 値 |功能 | +| --- | --- | |true|启用自动启动功能。| |false|禁用自动启动功能。| **返回值** +| 値 |功能 | +| --- | --- | |true| 控制成功 | |false| 控制失败| @@ -254,15 +294,21 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。 bool setCharge(bool en) **功能:** + 此功能设置/取消设置充电模式。电池充满电后, 尝试设置充电启用 - >禁用 - >启用,它可以充电。 **参数** + +| 値 |功能 | +| --- | --- | |true|充电开始指令 | |false|充电停止指令 | **返回值** +| 値 |功能 | +| --- | --- | |true| 控制成功 | |false| 控制失败| @@ -282,6 +328,8 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。 **返回值** +| 値 |功能 | +| --- | --- | |true|完全充电 | |false|没有完全充电 | @@ -302,6 +350,8 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。 **返回值** +| 値 |功能 | +| --- | --- | |true|电源控制器发现 | |false|找不到电源控制器 | @@ -320,6 +370,8 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。 **返回值** +| 値 |功能 | +| --- | --- | |true|在充电过程中| |false|不充电 | @@ -354,7 +406,9 @@ M5GO的IP5306没有接线,无法通过此功能进行控制。 **参数** -button: 端口号 +| 値 |功能 | +| --- | --- | +|button| 端口号| **返回值** @@ -399,6 +453,8 @@ setWakeupButton(BUTTON_A_PIN); **返回值** +| 値 |功能 | +| --- | --- | |true | 通过软件重置| |false| 出于其他原因| @@ -418,6 +474,8 @@ setWakeupButton(BUTTON_A_PIN); **返回值** +| 値 |功能 | +| --- | --- | |true | 通过看门狗| |false| 出于其他原因| @@ -437,6 +495,8 @@ setWakeupButton(BUTTON_A_PIN); **返回值** +| 値 |功能 | +| --- | --- | |true | 在deepSleep()之后| |false| 出于其他原因| @@ -456,6 +516,8 @@ setWakeupButton(BUTTON_A_PIN); **返回值** +| 値 |功能 | +| --- | --- | |true | 通过电源开关| |false| 出于其他原因|