Disable GPIO irq

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
User avatar
Alex_III
Posts: 5
Joined: Thu Mar 25, 2021 9:05 pm

Disable GPIO irq

Post by Alex_III » Sat Apr 03, 2021 6:21 am

Code: Select all

p0 = Pin(0, Pin.IN)
p0.irq(trigger=Pin.IRQ_RISING | Pin.IRQ_FALLING, handler=callback_read)
I am writing the protocol DALI. Reading is not required there very often, so I would like to be able to disable interrupts.
How to do it? Will re-configuring the port help?

Code: Select all

p0 = Pin(0, Pin.IN)
Possibly disable interrupts if you don't specify a callback function?

Code: Select all

p0.irq(trigger=Pin.IRQ_RISING | Pin.IRQ_FALLING)

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Disable GPIO irq

Post by Roberthh » Sat Apr 03, 2021 12:06 pm

If you do not set up an interrupt, then there will be no interrupt.

Post Reply