Skip to content

Commit a750d7b

Browse files
committed
添加 wakeup.pyi 和其他链接修改
1 parent d488000 commit a750d7b

File tree

3 files changed

+69
-2
lines changed

3 files changed

+69
-2
lines changed

quecpython_stubs/app_fota.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Function:
33
The app_fota module is used for user file upgrades.
44
55
Descriptions taken from:
6-
https://python.quectel.com/doc/quecpython/API_reference/zh/syslib/app_fota.html
6+
https://python.quectel.com/doc/quecpython/API_reference/en/syslib/app_fota.html
77
"""
88

99

quecpython_stubs/atcmd.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ Function:
33
This module provides a method for sending AT commands, allowing the QuecPython module to send AT commands through Python code.
44
55
Descriptions taken from:
6-
https://python.quectel.com/doc/quecpython/API_reference/zh/syslib/atcmd.html"""
6+
https://python.quectel.com/doc/quecpython/API_reference/en/syslib/atcmd.html
7+
"""
78

89

910
def sendSync(atcmd, resp, include_str, timeout):

quecpython_stubs/wakeup.pyi

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
"""
2+
Function:
3+
Module feature: WakeUp interrupt for enabling edge-triggered interrupts and module wake-up from sleep state.
4+
Currently supported modules: EC600E Series, EC800E Series, EC800Z Series.
5+
Note: WakeUp provides interrupt capabilities not available on standard GPIOs, including dual-edge triggering and wake-up from sleep mode.
6+
7+
Descriptions taken from:
8+
https://developer.quectel.com/doc/quecpython/API_reference/en/pm/WakeUp.html
9+
"""
10+
class WakeUp(object):
11+
"""WakeUp Interrupt
12+
13+
Class feature: Provides edge-triggered interrupts and wake-up capability from sleep mode.
14+
Note: Standard GPIOs on EC600/EC800E series don't support dual-edge interrupts or wake-up from sleep.
15+
Descriptions: https://developer.quectel.com/doc/quecpython/API_reference/en/pm/WakeUp.html
16+
17+
WakeUp Pin Mapping:
18+
| Module | WAKEUP0 | WAKEUP2 | WAKEUP3 | WAKEUP4 | WAKEUP5 |
19+
|----------|---------|---------|---------|---------|---------|
20+
| EC800E | - | Pin79 | Pin109* | Pin108* | Pin19 |
21+
| EC600E | - | Pin9 | Pin51 | Pin50 | Pin39 |
22+
| EC800Z | Pin87 | Pin79 | Pin109 | Pin108 | Pin19 |
23+
* Not available on EC800ECN_LE/LQ/LC variants
24+
"""
25+
26+
def __init__(self, WakeupID, pull, edge=IRQ_RISING_FALLING):
27+
"""Creates a WakeUp interrupt object.
28+
29+
:param WakeupID: Integer type. WakeUp pin identifier. Use class constants: WAKEUP0, WAKEUP2, WAKEUP3, WAKEUP4, WAKEUP5.
30+
:param pull: Integer type. Pull mode configuration. Use class constants: PULL_DISABLE, PULL_PU, PULL_PD.
31+
:param edge: Integer type. Edge trigger configuration (EC800Z only). Default: dual-edge. Use class constants: IRQ_RISING, IRQ_FALLING, IRQ_RISING_FALLING.
32+
"""
33+
34+
def enable(self):
35+
"""Enables the WakeUp interrupt.
36+
37+
When enabled, edge detection will trigger the registered callback function.
38+
39+
:return: Integer. 0 - Success, -1 - Failure.
40+
"""
41+
42+
def disable(self):
43+
"""Disables the WakeUp interrupt.
44+
45+
:return: Integer. 0 - Success, -1 - Failure.
46+
"""
47+
48+
def read(self):
49+
"""Reads current pin level.
50+
51+
:return: Integer. 0 - Low level, 1 - High level.
52+
"""
53+
54+
def deinit(self):
55+
"""Deinitializes and disables WakeUp functionality.
56+
57+
:return: Integer. 0 - Success, -1 - Failure.
58+
"""
59+
60+
def set_callback(self, fun):
61+
"""Sets the interrupt callback function.
62+
63+
:param fun: Callback function. Function prototype: fun(level)
64+
Callback Parameter:
65+
level: Integer. 0 = Low level, 1 = High level
66+
"""

0 commit comments

Comments
 (0)