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