diff --git a/docs/API_reference/en/peripherals/misc.PowerKey.md b/docs/API_reference/en/peripherals/misc.PowerKey.md index dab43c6feb5093b400916fbd4e5a586edfc1142c..51b03989cdb76d2484fa7c6221e5cdda4df36361 100644 --- a/docs/API_reference/en/peripherals/misc.PowerKey.md +++ b/docs/API_reference/en/peripherals/misc.PowerKey.md @@ -47,17 +47,15 @@ This method registers the callback function for the powerkey event. > Note:
-> For ECX00S/ECX00N/ECX00M/EG810M/ECX00E series modules: The callback function will be triggered when pressing and releasing the powerkey. +> For ECX00N/ECX00M/EG810M series modules: The callback function will be triggered when pressing and releasing the powerkey. > -> For ECX00G series modules: The callback function will be triggered only when releasing the powerkey and the key have been pressed for at least 500 ms. -> -> For ECX00U/EG91XU series: Switches between the two above features by controlling the powerkey operating mode with optional parameters +> For ECX00U/EG91XU series: Optional parameters are used to control the powerkey working mode and switch between the two features: When the working mode is 0, the callback function will be triggered only when releasing the powerkey and the key have been pressed for at least 500 ms. When the working mode is 1, the callback function will be triggered when pressing and releasing the powerkey. > > For all the above platforms, powerkey long press no longer triggers shutdown after registering the user's callback function. **Example:** -For ECX00S/ECX00N/ECX00M/EG810M/ECX00E series modules: +For ECX00N/ECX00M/EG810M series modules: ```python from misc import PowerKey @@ -73,20 +71,6 @@ def pwk_callback(status): pk.powerKeyEventRegister(pwk_callback) ``` -For ECX00G series modules: - -```python -from misc import PowerKey - -pk = PowerKey() - -def pwk_callback(status): - if status == 0: # The callback will be triggered only when the power key is released - print('powerkey release.') - -pk.powerKeyEventRegister(pwk_callback) -``` - For ECX00U/EG91XU series modules: ```python diff --git a/docs/API_reference/en/stdlib/uos.md b/docs/API_reference/en/stdlib/uos.md index 44bd539c7bdf4c1cc9632fb48540a6c1a6f91cef..93d462e0e390499d3ee78bfe94915a34db0230b9 100644 --- a/docs/API_reference/en/stdlib/uos.md +++ b/docs/API_reference/en/stdlib/uos.md @@ -484,7 +484,7 @@ udev.set_callback(call_back) ## Registering the Storage Device littleFS - SPI NOR FLASH -> Only EG915U and EC600N series modules support this feature currently. It only supports 4-wire spi nor flash. +> Only ECx00M&EG810M&ECx00U&EG91xU series platform is supported. Only 4-wire spi nor flash is supported. ECx00U&EG91xU spi_clk = 3 is not recommended. ### `uos.VfsLfs1` diff --git a/docs/API_reference/zh/peripherals/misc.PowerKey.md b/docs/API_reference/zh/peripherals/misc.PowerKey.md index 51c115e6d00ce2bf74e877e4b471bacee4e520af..9a112788d1ef5e6ec7e2b1dc7b6bb4e2b152a830 100644 --- a/docs/API_reference/zh/peripherals/misc.PowerKey.md +++ b/docs/API_reference/zh/peripherals/misc.PowerKey.md @@ -43,11 +43,9 @@ PowerKey.powerKeyEventRegister(usrFun) #其他平台仅支持设置usrFun `0`表示注册成功,`-1`表示注册失败。 -> ECX00S/ECX00N/ECX00M/EG810M/ECX00E系列,对于powerkey,按下和松开时,都会触发用户注册的回调函数; +> ECX00S/ECX00N/ECX00M/EG810M/ECX00E/ECX00G系列,对于powerkey,按下和松开时,都会触发用户注册的回调函数; > -> ECX00G系列,对于powerkey,只在按键松开时才会触发回调函数,并且按键按下的时间需要维持500ms以上; -> -> ECX00U/EG91XU系列,通过可选参数控制powerkey工作模式,在以上两种特性间切换; +> ECX00U/EG91XU系列,通过可选参数控制powerkey工作模式,在两种特性间切换:当工作模式为0时,只在按键松开时才会触发回调函数,并且按键按下的时间需要维持500ms以上;工作模式为1时,按下和松开时,都会触发用户注册的回调函数; > > 上述所有平台在注册用户的回调函数后,powerkey长按不再触发关机。 @@ -65,7 +63,7 @@ PowerKey.getpowerKeyStatus() **示例:** -ECX00S/ECX00N/ECX00M/EG810M/ECX00E系列: +ECX00S/ECX00N/ECX00M/EG810M/ECX00E/ECX00G系列: ```python from misc import PowerKey @@ -81,20 +79,6 @@ def pwk_callback(status): pk.powerKeyEventRegister(pwk_callback) ``` -ECX00G系列: - -```python -from misc import PowerKey - -pk = PowerKey() - -def pwk_callback(status): - if status == 0: # 只有按键释放时才会触发回调 - print('powerkey release.') - -pk.powerKeyEventRegister(pwk_callback) -``` - ECX00U/EG91XU系列: ```python diff --git a/docs/Application_guide/en/media/system/power-manager/PowerkeyOn.png b/docs/Application_guide/en/media/system/power-manager/PowerkeyOn.png index 1862de3480bd1378e97e0c69b8378464dba41ab0..021d8d49ee60843396d2ff8c0b91383dac0298eb 100644 Binary files a/docs/Application_guide/en/media/system/power-manager/PowerkeyOn.png and b/docs/Application_guide/en/media/system/power-manager/PowerkeyOn.png differ diff --git a/docs/Application_guide/en/media/system/power-manager/VDD_EXTTime.png b/docs/Application_guide/en/media/system/power-manager/VDD_EXTTime.png index b21c32bc97d5bc984866ccc0790716f2bd414735..1ecca6a0985606a7b1fe9dc3845e8a5997d1492c 100644 Binary files a/docs/Application_guide/en/media/system/power-manager/VDD_EXTTime.png and b/docs/Application_guide/en/media/system/power-manager/VDD_EXTTime.png differ