I'm trying to attach an interrupt to digital pin 2, but I also want to set it to priority 0. I'm trying to use the NVIC_SetPriority method, but I'm not sure what parameter to pass that would represent the IRQ number for pin 3 (or maybe it's all of Port A?). Does anyone have any insight on that?
The first param should be one of the following, defined in samd51j19a.h in C:\Users\[username]\AppData\Local\Arduino15\packages\arduino\tools\CMSIS-Atmel\1.2.0\CMSIS\Device\ATMEL\samd51\include on a Windows system.
You can read more about this in Chapter 23 of the processor datasheet, EIC- External Interrupt Controller; the latest one I have is named SAM_D5x_E5x_Family_Data_Sheet_DS60001507G.pdf and is available on the Microchip website.