void GPIO_Initialize(void) { INTERRUPT_MASK interrupt_states; /* Disable all interrupts... */ interrupt_states = GetInterruptRegister(); DisableInterruptRegister(ALL_INTERRUPTS_32); /* Replace the old (bootloader) Interrupt Service Routine... */ ((P_ISR_FUNCTION *)ISR_ENTRY_TABLE_LOCATION)[10] = GPIO_ISR; /* Restore previous interrupt states... */ EnableInterruptRegister(interrupt_states); /* ### Initialize Subroutines ### */ LPC_Initialize(); // and others... }
UINT16 Ethercat::HW_GetALEventRegister(void) { GetInterruptRegister(); return EscALEvent.Word; }