External interrupt sources
There is a minor issue with interrupt pins. According to the AN0012 :
"The pins with the same number from each of the ports are grouped
together to generate an interrupt, meaning that the user can't, for
instances, use pin 0 from both PORT A and B as external interrupt
sources. There can be up to 16 external interrupt sources, which are
connected to 2 interrupt lines. The even numbered pins will generate
an interrupt on the even interrupt line, and the odd numbered pins on
the odd line. The interrupts can be generated by a rising edge
transition, falling edge or both."
It means that we cannot easily distinguish between an interrupt coming
from the ambient light sensor (PA6) and bottom-left button (PC6).
I think right now we will have timer based polling, but it could be
improved in rev2.