Skip to content

Commit 3f9f8be

Browse files
authored
Merge pull request #66 from Mr-FJC/main
获取开机原因接口返回值增加部分值并调整格式;获取关机原因接口返回值说明格式调整
2 parents 19ddcc4 + 29e91dc commit 3f9f8be

File tree

2 files changed

+61
-51
lines changed

2 files changed

+61
-51
lines changed

en-us/api/QuecPythonClasslib.md

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4699,49 +4699,60 @@ The module restarts.
46994699
It gets the reason for module powering on.
47004700

47014701
* Parameter
4702-
47034702
* None
47044703

47054704
* Return Value
47064705

4707-
* The values returned are explained as follows:
4706+
The values returned are explained as follows:
47084707

4709-
1: Power on normally <br/>
4710-
2: Restart <br/>
4711-
3: VBAT <br/>
4712-
4: RTC powers on regularly <br/>
4713-
5: Fault <br/>
4714-
6: VBUS <br/>
4715-
0: Unknown
4708+
| return value | description |
4709+
| ------------ | ----------------------------------------------- |
4710+
| 0 | Fail to get reason for booting or unknow reason |
4711+
| 1 | Press PWRKEY to boot |
4712+
| 2 | Press RESET KEY to restart |
4713+
| 3 | Booting triggered by VBAT |
4714+
| 4 | Booting triggered by RTC |
4715+
| 5 | Booting triggered by watchdog or Abnormal boot |
4716+
| 6 | Booting triggered by VBUS |
4717+
| 7 | Booting triggered by charge in |
4718+
| 8 | Booting from PSM wakeup |
4719+
| 9 | Booting by dump |
47164720

47174721
* Note
47184722

47194723
* BC25PA platform does not support restart reason 5 and 6.
47204724

4725+
4726+
47214727
###### Get the Reason for the Last Powering Down of the Module
47224728

47234729
> **Power. powerDownReason()**
47244730

47254731
It gets the reason for the last powering down of the module.
47264732

47274733
* Parameter
4728-
47294734
* None
47304735

47314736
* Return Value
47324737

4733-
* 1: Power down normally
4734-
* 2: The voltage is too high
4735-
* 3: The voltage is low
4736-
* 4: Over temperature
4737-
* 5: WDT
4738-
* 6: VRTC is low
4739-
* 0: Unknown
4738+
The values returned are explained as follows:
4739+
4740+
| return value | description |
4741+
| ------------ | ------------------------------------------------------------ |
4742+
| 0 | Fail to get reason for shutdown or unknow reason |
4743+
| 1 | Press PWRKEY to shutdown |
4744+
| 2 | Shutdown caused by excessive Vin voltage, exceeding the VSYS_OVER_TH threshold voltage |
4745+
| 3 | Shutdown caused by low Vin voltage |
4746+
| 4 | Shutdown caused by high temperature |
4747+
| 5 | Shutdown triggered by watchdog |
4748+
| 6 | VRTC voltage is lower than VRTC_MIN_TH, which triggers shutdown |
47404749

47414750

47424751
* Note
47434752

4744-
* The BC25PA platform does not support this method.
4753+
* The BC25PA and EC200U/EC600U platform does not support this method.
4754+
4755+
47454756

47464757
###### Get Voltage of the Battery.
47474758

@@ -7864,8 +7875,8 @@ True
78647875
| timeout | Integer type | This parameter is the timeout of upper layer application. When the application triggers timeout, it actively reports the scanned hot spot information. The application automatically reports the hot spot information if it scans all the hop spots which have been set previously or the underlying layer scan reaches the frequency sweeping timeout before the timeout of the application. <br>Range:<br/>600S: 4255; unit: s.<br/>200U/600U: 1205000; unit: ms. |
78657876
| round | Integer type | This parameter is the scanning rounds of wifi. When reaching the scanning rounds, the scan stops and the scanning results are obtained. <br/>Range:<br/>600S: 13; unit: round<br/>200U/600U: 110; unit: round |
78667877
| max_bssid_num | Integer type | This parameter determines the maximum number of hot spots to be scanned. If the number of hot spots scanned by the underlying layer reaches the maximum, the scan stops and the scanning results are obtained. <br/>Range:<br/>600S: 430<br/>200U/600U: 1300 |
7867-
| scan_timeout | Integer type | This parameter is the wifi hot spot scanning timeout of underlying layer. If the underlying layer scan reaches the hot spot scanning timeout set previously, the scan stops and the scanning results are obtained. Range: 1255. Unit: second. |
7868-
| priority | Integer type | This parameter is the priority setting of wifi scanning service. 0 indicates that ps is preferred; 1 indicates that wifi is preferred. When ps is preferred, the wifi scan is terminated when a data service is initiated. When wifi is preferred, RRC connection is not connected when a data service is initiated. wifi scan runs normally. The RRC connection is only established after the scan completes. |
7878+
| scan_timeout | Integer type | This parameter is the wifi hot spot scanning timeout of underlying layer. If the underlying layer scan reaches the hot spot scanning timeout set previously, the scan stops and the scanning results are obtained. Range: 1255. Unit: second. 200U or 600U platforms do not support this parameter. You can set this parameter to 0. |
7879+
| priority | Integer type | This parameter is the priority setting of wifi scanning service. 0 indicates that ps is preferred; 1 indicates that wifi is preferred. When ps is preferred, the wifi scan is terminated when a data service is initiated. When wifi is preferred, RRC connection is not connected when a data service is initiated. wifi scan runs normally. The RRC connection is only established after the scan completes. 200U or 600U platforms do not support this parameter. You can set this parameter to 0. |
78697880

78707881
* Return Value:
78717882

zh-cn/api/QuecPythonClasslib.md

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4800,26 +4800,26 @@ while 1:
48004800

48014801
* 返回值
48024802

4803-
返回int数值,解释如下:
4803+
返回整形数值,表示开机原因,解释如下:
4804+
4805+
|| 说明 |
4806+
| ---- | -------------------------------- |
4807+
| 0 | 获取开机原因失败或者开机原因未知 |
4808+
| 1 |PWRKEY 开机 |
4809+
| 2 |RESET 重启 |
4810+
| 3 | VBAT 触发的开机 |
4811+
| 4 | RTC 定时开机 |
4812+
| 5 | watchdog 触发重启或异常开机 |
4813+
| 6 | VBUS 触发的开机 |
4814+
| 7 | 充电开机 |
4815+
| 8 | PSM 唤醒开机 |
4816+
| 9 | 发生 Dump 后重启 |
48044817

4805-
1:正常电源开机
4806-
4807-
2:重启
4808-
4809-
3VBAT
4810-
4811-
4RTC定时开机
4812-
4813-
5:Fault
4814-
4815-
6VBUS
4816-
4817-
0:未知
4818+
* 注意
48184819

4820+
BC25PA平台不支持重启原因56
48194821

4820-
* 注意
48214822

4822-
BC25PA平台不支持重启原因56
48234823

48244824
###### 获取模块上次关机原因
48254825

@@ -4833,23 +4833,22 @@ while 1:
48334833

48344834
* 返回值
48354835

4836-
1:正常电源关机
4836+
返回整形数值,表示上次关机原因,解释如下:
48374837

4838-
2:电压过高
4839-
4840-
3:电压偏低
4841-
4842-
4:超温
4843-
4844-
5WDT
4845-
4846-
6VRTC 偏低
4847-
4848-
0:未知
4838+
|| 说明 |
4839+
| ---- | --------------------- |
4840+
| 0 | 原因未知 |
4841+
| 1 | 正常关机 |
4842+
| 2 | 供电电压过高导致关机 |
4843+
| 3 | 供电电压过低导致关机 |
4844+
| 4 | 温度过高导致关机 |
4845+
| 5 | 看门狗触发的关机 |
4846+
| 6 | VRTC 电压过低触发关机 |
48494847

48504848
* 注意
48514849

4852-
BC25PA平台不支持此方法。
4850+
BC25PA平台和EC200U/EC600U平台不支持此方法。
4851+
48534852

48544853

48554854
###### 获取电池电压
@@ -7903,8 +7902,8 @@ True
79037902
| timeout | 整型 | 该超时时间参数是上层应用的超时,当触发超时会主动上报已扫描到的热点信息,若在超时前扫描到设置的热点个数或达到底层扫频超时时间会自动上报热点信息。<br>参数范围:<br/>600S4-255<br/>200U/600U120-5000毫秒 |
79047903
| round | 整型 | 该参数是wifi扫描轮,达到扫描轮数后,会结束扫描并获取扫描结果。<br/>参数范围:<br/>600S1-3轮次<br/>200U/600U1-10轮次 |
79057904
| max_bssid_num | 整型 | 该参数是wifi扫描热点最大个,若底层扫描热点个数达到设置的最大个数,会结束扫描并获取扫描结果。<br/>参数范围:<br/>600S4-30<br/>200U/600U1-300|
7906-
| scan_timeout | 整型 | 该参数是底层wifi扫描热点超时时间,若底层扫描热点时间达到设置的超时时间,会结束扫描并获取扫描结果。该参数设置范围为1-255秒。 |
7907-
| priority | 整型 | 该参数是wifi扫描业务优先级设置,0为ps优先,1为wifi优先。ps优先时,当有数据业务发起时会中断wifi扫描。Wifi优先时,当有数据业务发起时,不会建立RRC连接,保障wifi扫描正常执行,扫描结束后才会建立RRC连接。 |
7905+
| scan_timeout | 整型 | 该参数是底层wifi扫描热点超时时间,若底层扫描热点时间达到设置的超时时间,会结束扫描并获取扫描结果。该参数设置范围为1-255秒。200U/600U 平台不支持该参数,设置时写0即可。 |
7906+
| priority | 整型 | 该参数是wifi扫描业务优先级设置,0为ps优先,1为wifi优先。ps优先时,当有数据业务发起时会中断wifi扫描。Wifi优先时,当有数据业务发起时,不会建立RRC连接,保障wifi扫描正常执行,扫描结束后才会建立RRC连接。200U/600U 平台不支持该参数,设置时写0即可。 |
79087907

79097908
* 返回值:
79107909

0 commit comments

Comments
 (0)