void EXTI2_IRQHandler(void) { //Point to the structure describing the network interface NetInterface *interface = &netInterface[0]; //Check interrupt status if(EXTI_GetITStatus(EXTI_Line2) != RESET) { //Clear interrupt flag EXTI_ClearITPendingBit(EXTI_Line2); //A PHY event is pending... interface->phyEvent = TRUE; //Notify the user that the link state has changed osEventSetFromIrq(interface->nicRxEvent); } }
void PIOD_Handler(void) { //Point to the structure describing the network interface NetInterface *interface = &netInterface[0]; //Read status register to clear interrupt volatile uint32_t status = PIOD->PIO_ISR; //Ensure the PHY IRQ pin is asserted if(!(PIOD->PIO_PDSR & PIO_PD28)) { //A PHY event is pending... interface->phyEvent = TRUE; //Notify the user that the link state has changed osEventSetFromIrq(interface->nicRxEvent); } }