void GPIO_interruptEdgeSelect(uint8_t selectedPort,
uint16_t selectedPins,
uint8_t edgeSelect) {
uint16_t baseAddress = GPIO_PORT_TO_BASE[selectedPort];
#ifndef NDEBUG
if(baseAddress == 0xFFFF)
{
return;
}
#endif
// Shift by 8 if port is even (upper 8-bits)
if((selectedPort & 1) ^ 1)
{
selectedPins <<= 8;
}
if(GPIO_LOW_TO_HIGH_TRANSITION == edgeSelect)
{
HWREG16(baseAddress + OFS_PAIES) &= ~selectedPins;
}
else
{
HWREG16(baseAddress + OFS_PAIES) |= selectedPins;
}
}
那个地方是区分字节和字节的啊 |