From 036bc2b8e1a00c798abba40b039246701aba4308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnold=20Feng=28=E5=86=AF=E6=BB=A1=E5=BE=B7=29?= Date: Tue, 17 Jun 2025 16:26:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0API=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- quecpython_stubs/app_fota.pyi | 2 +- quecpython_stubs/atcmd.pyi | 3 +- quecpython_stubs/wakeup.pyi | 66 +++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 quecpython_stubs/wakeup.pyi diff --git a/quecpython_stubs/app_fota.pyi b/quecpython_stubs/app_fota.pyi index eac37d4..890a5c1 100644 --- a/quecpython_stubs/app_fota.pyi +++ b/quecpython_stubs/app_fota.pyi @@ -3,7 +3,7 @@ Function: The app_fota module is used for user file upgrades. Descriptions taken from: -https://python.quectel.com/doc/quecpython/API_reference/zh/syslib/app_fota.html +https://python.quectel.com/doc/quecpython/API_reference/en/syslib/app_fota.html """ diff --git a/quecpython_stubs/atcmd.pyi b/quecpython_stubs/atcmd.pyi index 19bc67c..e367a86 100644 --- a/quecpython_stubs/atcmd.pyi +++ b/quecpython_stubs/atcmd.pyi @@ -3,7 +3,8 @@ Function: This module provides a method for sending AT commands, allowing the QuecPython module to send AT commands through Python code. Descriptions taken from: -https://python.quectel.com/doc/quecpython/API_reference/zh/syslib/atcmd.html""" +https://python.quectel.com/doc/quecpython/API_reference/en/syslib/atcmd.html +""" def sendSync(atcmd, resp, include_str, timeout): diff --git a/quecpython_stubs/wakeup.pyi b/quecpython_stubs/wakeup.pyi new file mode 100644 index 0000000..98f50fd --- /dev/null +++ b/quecpython_stubs/wakeup.pyi @@ -0,0 +1,66 @@ +""" +Function: +Module feature: WakeUp interrupt for enabling edge-triggered interrupts and module wake-up from sleep state. +Currently supported modules: EC600E Series, EC800E Series, EC800Z Series. +Note: WakeUp provides interrupt capabilities not available on standard GPIOs, including dual-edge triggering and wake-up from sleep mode. + +Descriptions taken from: +https://developer.quectel.com/doc/quecpython/API_reference/en/pm/WakeUp.html +""" +class WakeUp(object): + """WakeUp Interrupt + + Class feature: Provides edge-triggered interrupts and wake-up capability from sleep mode. + Note: Standard GPIOs on EC600/EC800E series don't support dual-edge interrupts or wake-up from sleep. + Descriptions: https://developer.quectel.com/doc/quecpython/API_reference/en/pm/WakeUp.html + + WakeUp Pin Mapping: + | Module | WAKEUP0 | WAKEUP2 | WAKEUP3 | WAKEUP4 | WAKEUP5 | + |----------|---------|---------|---------|---------|---------| + | EC800E | - | Pin79 | Pin109* | Pin108* | Pin19 | + | EC600E | - | Pin9 | Pin51 | Pin50 | Pin39 | + | EC800Z | Pin87 | Pin79 | Pin109 | Pin108 | Pin19 | + * Not available on EC800ECN_LE/LQ/LC variants + """ + + def __init__(self, WakeupID, pull, edge=IRQ_RISING_FALLING): + """Creates a WakeUp interrupt object. + + :param WakeupID: Integer type. WakeUp pin identifier. Use class constants: WAKEUP0, WAKEUP2, WAKEUP3, WAKEUP4, WAKEUP5. + :param pull: Integer type. Pull mode configuration. Use class constants: PULL_DISABLE, PULL_PU, PULL_PD. + :param edge: Integer type. Edge trigger configuration (EC800Z only). Default: dual-edge. Use class constants: IRQ_RISING, IRQ_FALLING, IRQ_RISING_FALLING. + """ + + def enable(self): + """Enables the WakeUp interrupt. + + When enabled, edge detection will trigger the registered callback function. + + :return: Integer. 0 - Success, -1 - Failure. + """ + + def disable(self): + """Disables the WakeUp interrupt. + + :return: Integer. 0 - Success, -1 - Failure. + """ + + def read(self): + """Reads current pin level. + + :return: Integer. 0 - Low level, 1 - High level. + """ + + def deinit(self): + """Deinitializes and disables WakeUp functionality. + + :return: Integer. 0 - Success, -1 - Failure. + """ + + def set_callback(self, fun): + """Sets the interrupt callback function. + + :param fun: Callback function. Function prototype: fun(level) + Callback Parameter: + level: Integer. 0 = Low level, 1 = High level + """ \ No newline at end of file From 29e1222ba9bff2b5739a0e6925bf4fab88c98432 Mon Sep 17 00:00:00 2001 From: Arnold Feng Date: Mon, 4 Aug 2025 11:30:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86lcd=5Fshow?= =?UTF-8?q?=E5=92=8Clcd=5Fshow=5Fjpg=E7=9A=84=E9=80=82=E7=94=A8=E8=8C=83?= =?UTF-8?q?=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- quecpython_stubs/machine.pyi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quecpython_stubs/machine.pyi b/quecpython_stubs/machine.pyi index 05d0506..9d6bff8 100644 --- a/quecpython_stubs/machine.pyi +++ b/quecpython_stubs/machine.pyi @@ -759,7 +759,8 @@ class LCD(object): def lcd_show(self, file_name, start_x, start_y, width, hight): """This method displays images by reading files. - + Modules that support this method: EC600K/EC800K/EG800P series module. + This file is a bin file generated by Image2Lcd. If the image header file is checked, you needn’t to enter width and height. :param file_name: String type. Image name to be displayed. @@ -772,6 +773,7 @@ class LCD(object): def lcd_show_jpg(self, file_name, start_x, start_y): """This method displays JPEG images by reading files. + Modules that support this method: EC600K/EC800K/EG800P series module. :param file_name: String type. Image name needs to be displayed. :param start_x: Integer type. The start x coordinate.