[lightning-ln882h] Fix GPIO interrupt support (#326)

* fix interrupt handling for the ln882h

- all GPIOS can generate interrupts
- added calls to NVIC_SetPriority/NVIC_EnableIRQ/NVIC_DisableIRQ

* fix clang formatting error

* only call NVIC_DisableIRQ if no other gpio is using an interrupt

* fix (again) clang-format errors

* add IRQ capability on all pins

* don't bother with NVIC_DisableIRQ

* use pin->gpio instead of interruptNumber, use macro GPIO_GET_PORT for clarity

* Mark interrupts as supported for the LN882H

---------

Co-authored-by: lamauny <pub.elc@free.fr>
This commit is contained in:
Luca Olivetti
2025-09-19 22:25:03 +02:00
committed by GitHub
parent 9114bc4c49
commit 895b6e89c5
6 changed files with 38 additions and 23 deletions

View File

@@ -49,7 +49,7 @@ Watchdog timer | ✔️ | ✔️ | ✔️ | ❓
**PERIPHERALS** (Wiring) | | | | | |
Digital I/O | ✔️ | ✔️ | ✔️ | ❓ | ❓ | ✔️
PWM | ✔️ | ✔️ | ✔️ | ❓ | ❓ | ❌
Interrupts | ✔️ | ✔️ | ✔️ | ❓ | ❓ |
Interrupts | ✔️ | ✔️ | ✔️ | ❓ | ❓ | ✔️
Analog input (ADC) | ✔️ | ✔️ | ✔️ | ❓ | ❓ | ✔️
`Wire` (I²C) | ❌ | ❌ | ❗ | ❌ | ❌ | ❓
`SPI` | ❌ | ❌ | ❌ | ❌ | ❌ | ❌