You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -2676,7 +2676,6 @@ This function sets the current modem functionality.
2676
2676
#### checkNet - Wait for Network to be Ready
2677
2677
2678
2678
Function: The checkNet module is mainly used for the script programs [auto-startup], and provides APIs to wait for the network to be ready. If it times out or exits abnormally, the program returns an error code. Therefore, if there are network-related operations in the your program, the method in the checkNet module should be called at the beginning of the user program to wait for the network to be ready. Of course, you can also implement the functions of this module by yourselves.
2679
-
Note: The BC25PA platform does not support this module function.
2680
2679
##### Create checkNet Object
2681
2680
2682
2681
> **import checkNet**
@@ -3076,7 +3075,6 @@ if __name__ == '__main__':
3076
3075
#### app_fota - Upgrade User File
3077
3076
3078
3077
Module function: Upgrade user file
3079
-
Note: The BC25PA platform does not support this module function.
NOTE:Currently, only the ASR platform and Unisoc supports it.
4773
+
NOTE:Currently, only the ASR platform supports it.
4776
4774
4777
4775
###### Setting the USBNET working type (Take effect after restart)
4778
4776
4779
-
> **USBNET.set_worktype(type)**
4777
+
USBNET.set_worktype(type)
4780
4778
4781
4779
- Parameter
4782
4780
@@ -4788,46 +4786,6 @@ NOTE:Currently, only the ASR platform and Unisoc supports it.
4788
4786
4789
4787
Return 0 if the setting is successful, otherwise return -1.
4790
4788
4791
-
4792
-
4793
-
###### Getting the USBNET working type (Take effect after restart)
4794
-
4795
-
> **USBNET.get_worktype()**
4796
-
4797
-
* Parameter
4798
-
4799
-
None
4800
-
4801
-
* Return Value
4802
-
4803
-
Return the USBNET working type if successful, otherwise return -1.
4804
-
4805
-
1 - ECM type
4806
-
4807
-
3 - RNDIS type
4808
-
4809
-
4810
-
4811
-
###### Getting the USBNET status
4812
-
4813
-
> **USBNET.get_status()**
4814
-
4815
-
* Parameter
4816
-
4817
-
None
4818
-
4819
-
* Return Value
4820
-
4821
-
Return the USBNET status if successful, otherwise return -1.
4822
-
4823
-
status:
4824
-
4825
-
0 - Not connected
4826
-
4827
-
1 - connected
4828
-
4829
-
4830
-
4831
4789
###### Open USBNET
4832
4790
4833
4791
> **USBNET.open()**
@@ -5734,7 +5692,7 @@ Row number of the pin map.
5734
5692
5735
5693
##### RTC
5736
5694
5737
-
Class function: It provides methods to get andsetRTC time.
5695
+
Class function: It provides methods to get andsetRTC time. For bc25pa platform, it can wake up the module from deep sleep or software shutdown.
5738
5696
5739
5697
###### Create RTC Object
5740
5698
@@ -5786,7 +5744,79 @@ When getting the time, return a tuple containing the date and time in the follow
5786
5744
(2020, 3, 12, 4, 12, 12, 14, 0)
5787
5745
```
5788
5746
5747
+
###### Set callback function
5748
+
5749
+
>**rtc.register_callback(usrFun)**
5750
+
5751
+
When RTC expiration time callback function isset (forBC25PA platform, if it is recovered from deep sleep or software shutdown, calling this function will immediately call usrfun once)
| week |int| week,Range0 ~6,Where 0 means Sunday and1~6 means Monday to Saturday respectively. When setting time,this parameter does not work andis reserved. This parameter is valid when getting time |
5786
+
| hour |int| hour,Range0 ~23|
5787
+
| minute |int| minute,Range0 ~59|
5788
+
| second |int| second,Range0 ~59|
5789
+
| microsecond |int| microsecond,The parameter is reserved andnot used yet. When setting the time, the parameter can be written as0|
5790
+
5791
+
* Return Value
5792
+
0 Successful execution.
5793
+
-1 Failed execution.
5794
+
* Example
5795
+
```python
5796
+
>>>data_e=rtc.datetime()
5797
+
>>>data_l=list(data_e)
5798
+
>>> data_l[6] +=30
5799
+
>>>data_e=tuple(data_l)
5800
+
>>> rtc.set_alarm(data_e)
5801
+
0
5802
+
```
5803
+
###### Start / stop RTC timer
5804
+
rtc.enable_alarm(on_off)
5805
+
The timer can be started only when the callback function isset (bc25pa platform)
@@ -5955,7 +5985,7 @@ Adaptation version: EC100Y (V0009) and above; EC600S (V0002) and above.
5955
5985
|EC600S/EC600N| port0:<br />CS:Pin number 58<br />CLK:Pin number 61<br />MOSI:Pin number 60<br />MISO:Pin number 59<br />port1:<br />CS:Pin number 4<br />CLK:Pin number 1<br />MOSI:Pin number 3<br />MISO:Pin number 2|
5956
5986
|EC100Y| port0:<br />CS:Pin number 25<br />CLK:Pin number 26<br />MOSI:Pin number 27<br />MISO:Pin number 28<br />port1:<br />CS:Pin number 105<br />CLK:Pin number 104<br />MOSI:Pin number 107<br />MISO:Pin number 106|
5957
5987
|BC25PA| port0:<br />CS:Pin number 6<br />CLK:Pin number 5<br />MOSI:Pin number 4<br />MISO:Pin number 3|
5958
-
5988
+
* Note:Bc25pa platform does not support 1and2 modes.
5959
5989
- Example
5960
5990
5961
5991
```python
@@ -6465,6 +6495,14 @@ Module function: provide matrix keyboard interface and support platform ec600scn
Note: only ec600ncnlc platform needs to call this function.
6532
-
6533
-
* Return value
6534
-
6535
-
0
6536
6558
6537
6559
###### Uninitialization
6538
6560
@@ -6557,12 +6579,11 @@ keypad=machine.KeyPad()
6557
6579
keypad.init()
6558
6580
def userfun(l_list):
6559
6581
global is_loop
6560
-
if l_list[0] !=90and l_list[1] ==4and l_list[2] ==4 :
6582
+
if l_list[0] !=1 :
6561
6583
is_loop=0
6562
6584
print('will exit')
6563
6585
print(l_list)
6564
6586
6565
-
keypad.setMuliKeyen(1)
6566
6587
keypad.set_callback(userfun)
6567
6588
loop_num=0
6568
6589
@@ -6571,7 +6592,6 @@ while is_loop == 1 and loop_num < 10:
6571
6592
loop_num= loop_num +1
6572
6593
print(" running..... ",is_loop,loop_num)
6573
6594
6574
-
keypad.setMuliKeyen(0)
6575
6595
keypad.deinit()
6576
6596
print('exit!')
6577
6597
```
@@ -10506,7 +10526,23 @@ None.
10506
10526
>>> aep.connect()
10507
10527
0
10508
10528
```
10529
+
###### Query data to be read
10530
+
10531
+
> **aep.check()**
10509
10532
10533
+
-**Parameter**
10534
+
None
10535
+
-**Return Value**
10536
+
Returns the number of pieces of data to be read distributed by the cloud platform
10537
+
10538
+
- Example
10539
+
10540
+
```python
10541
+
>>>from nb importAEP
10542
+
>>> aep=AEP("221.229.214.202","5683")
10543
+
>>> aep.check()
10544
+
0
10545
+
```
10510
10546
###### Receive data
10511
10547
10512
10548
> **aep.recv(data_len,data)**
@@ -10549,8 +10585,7 @@ Failed - not 0
10549
10585
10550
10586
- Note
10551
10587
10552
-
The sent data is a hexadecimal string, and the data length is even.
10553
-
10588
+
The sending data is a hexadecimal string, the data length is an even number, blocking (timeout 3 minutes), and returning success indicates that the sending instruction is executed successfully.
0 commit comments