Does anyone know how to correlate an interrupt source with a handler, without importing libraries, assuming that you have the addresses for all your registers? An example for any ARM processor would help, but in my case I am using the Pi3's BCM2837. My interpretation of this post about the datasheet, is that the BCM2835 manual is equivalent.
On page 90, I see the address that enables rising edge detection, so I put this code into my program:
//-v- I think this allows me to enable detection on GPIO pins 0-31
#define RisingInterruptEnable (*(int *) 0x7E2004C)
//-^- e.g. "RisingInterruptEnable = 0x1" enables GPIO 0 rising detect
From page 112-117 of the manual,I found the register that enables InterruptReQuests [0x7E00B214], but I honestly don't understand how to use it. I see how to enable gpio_int[0], but I could not find what gpio_int meant after searching the pdf.
From this post about function pointers I know how to "point to" whatever function I use for the handler. However I still do not understand:
How do I correlate an interrupt source with a function [without importing libraries, assuming I know the addresses to all of my registers]?