Using the Arduino compiler, is it possible to use Atmega2560 interrupt pins that are unused by Mega? Looking into the schematics for the Arduino Mega I noticed that pins PE6 and PE7 are interrupt-enabled (INT6 and INT7 respectively); however, they remain unconnected to any Arduino I/O pin.

I'm designing a custom board based on the Atmega2560 and want to use the Arduino IDE/Compiler to upload my code to it, so I'm pretty much replicating a big part of the Arduino Mega schematic into my board.

However, I would really like to enable these two extra interrupt pins (having 8 interrupt pins in total) in my board, but I'm now sure how to proceed from the software side. How could I enable this new pins in order to use them from the Arduino compiler?



Thanks!
If you are not afraid of getting your hands dirty by touching hardware
registers, you can access those pins bare-metal style, using port
manipulation. You will have to read the datasheet,
specifically the section “External Interrupts” if that's what you are
after.

This works with the stock Arduino core (or even without core), which may
be interesting from a maintenance point of view, but it's not as easy to
use as the Arduino interrupt API.