Micropython: ESP32 port missing "hard" kwarg in pin.irq()

Created on 5 Oct 2018  路  2Comments  路  Source: micropython/micropython

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

Most helpful comment

It's also undocumented. Is support intended to be cross-platform, or is the option deprecated? I'm happy to submit a docs PR for machine if the option is to stay.

All 2 comments

It's also undocumented. Is support intended to be cross-platform, or is the option deprecated? I'm happy to submit a docs PR for machine if the option is to stay.

I was wondering about this too. Diging into the code I found the reason:

https://github.com/micropython/micropython/blob/673db939b5c1f42c9411f684343d39811b7a16b2/ports/esp32/machine_pin.c#L106

With this gpio_install_isr_service(0); all pin interrupts share the same priority no distinction is possible.

ESP-IDF doc

Not sure which priority will be used with 0 though. Probably this could be raised to ESP_INTR_FLAG_LEVEL3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

miketeachman picture miketeachman  路  5Comments

hetvishah08 picture hetvishah08  路  5Comments

joelhoro picture joelhoro  路  5Comments

rolandvs picture rolandvs  路  3Comments

nickzoic picture nickzoic  路  3Comments