Pretty sure I know the answer to this, but ..... is there a function defined somewhere in the Arduino “core” that can be called from an ISR to determine which interrupt number fired?
I’m specifically interested in External Pin interrupts. I want the interrupt number, not the pin number. I imagine that the telltale flag bits are cleared before the attached ISR gets called. Even if they weren’t the ISR would have to access different flag registers for each type of processor (AVR, Teensy Kinetis, Feather SAMD, etc). So, that’s why I’m wondering if there’s a standard function call that will provide the info.
In the case of pin change interrupts, you do need to find out which pin triggered the interrupt, by reading the port and comparing to a saved value.
Looking at the source code for attachedInterrupt(), I see no reason the same ISR can't be attached to multiple interrupts -- for a Teensy 3.x anyway. The same function pointer would simply exist in multiple entries in the table.
I'm not interested in pin change interrupts. Just the ones that are usable with attachedInterrupt().
Anyway, what I want to know is as stated in my original question. That remains unanswered.