ESP32 port missing "hard" kwarg in pin.irq()
The ESP8266 has hard keyword argument in pin.irq() function. This is missing in ESP32 port.
See also: https://forum.micropython.org/viewtopic.php?p=30748#p30745
zephyr: Implement machine.Pin.irq() for setting callbacks on pin change.
This PR adds support for hard and soft pin interrupts in the zephyr port. In the current implementation, soft interrupt callbacks will only be called when the VM is executing, ie they will not be called during a blocking kernel call like k_msleep. And the behaviour of hard interrupt callbacks will depend on the underlying device, as well as the amount of ISR stack space.
Soft and hard interrupts tested on frdm_k64f and nucleo_f767zi boards.
This will eventually help with testing #6110 and #6125 (uevent and uasyncio)
To test on a frdm_k64f board do:
import machine
usr = machine.Pin(('GPIO_2', 6))
usr.irq(lambda p: print('irq', p), hard=1)
@MaureenHelm FYI