xtensa/irq.h: Add a macro to convert to an IRQ from a peripheral ID.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
Abdelatif Guettouche 2021-08-04 16:37:10 +02:00 committed by Gustavo Henrique Nihei
parent 7dc31637aa
commit cd0f64d779
1 changed files with 1 additions and 0 deletions

View File

@ -188,6 +188,7 @@
*/
#define ESP32_IRQ2PERIPH(irq) ((irq)-XTENSA_IRQ_FIRSTPERIPH)
#define ESP32_PERIPH2IRQ(id) ((id)+XTENSA_IRQ_FIRSTPERIPH)
/* PRO_INTR_STATUS_REG_0 / APP_INTR_STATUS_REG_0 */