pyb.ExtInt ========== .. This document was autogenerated by Sphinx-autoapi from a .pyi stub or a source code file. .. Do not edit this file, instead edit the source file and run Sphinx to update. .. Source: docs/stubs/pyb/ExtInt.pyi .. py:module:: pyb.ExtInt Classes ------- .. autoapisummary:: pyb.ExtInt.ExtInt Module Contents --------------- .. py:class:: ExtInt(pin, mode, pull, callback) Create an ExtInt object: - ``pin`` is the pin on which to enable the interrupt (can be a pin object or any valid pin name). - ``mode`` can be one of: - ``ExtInt.IRQ_RISING`` - trigger on a rising edge; - ``ExtInt.IRQ_FALLING`` - trigger on a falling edge; - ``ExtInt.IRQ_RISING_FALLING`` - trigger on a rising or falling edge. - ``pull`` can be one of: - ``pyb.Pin.PULL_NONE`` - no pull up or down resistors; - ``pyb.Pin.PULL_UP`` - enable the pull-up resistor; - ``pyb.Pin.PULL_DOWN`` - enable the pull-down resistor. - ``callback`` is the function to call when the interrupt triggers. The callback function must accept exactly 1 argument, which is the line that triggered the interrupt. .. py:method:: disable() -> None Disable the interrupt associated with the ExtInt object. This could be useful for debouncing. .. py:method:: enable() -> None Enable a disabled interrupt. .. py:method:: line() -> int Return the line number that the pin is mapped to. .. py:method:: regs() -> _typeshed.Incomplete :classmethod: Dump the values of the EXTI registers. .. py:method:: swint() -> _typeshed.Incomplete Trigger the callback from software. .. py:attribute:: IRQ_FALLING :type: _typeshed.Incomplete interrupt on a falling edge .. py:attribute:: IRQ_RISING :type: _typeshed.Incomplete interrupt on a rising edge .. py:attribute:: IRQ_RISING_FALLING :type: _typeshed.Incomplete interrupt on a rising or falling edge