Сидел, изучал порт под LPC... И наткнулся вот на этот кусочек...
/*
********************************************************************************
*************************
* IRQ ISR HANDLER
*
* Description : This function is called by OS_CPU_IRQ_ISR() to determine the source of the interrupt
* and process it accordingly.
*
* Arguments : none
********************************************************************************
*************************
*/
void OS_CPU_IRQ_ISR_Handler(void)
{
PFNCT pfnct;
#if 0
pfnct = (PFNCT)VICVectAddr; /* Read the interrupt vector from the VIC */
if (pfnct != (PFNCT)0) { /* Make sure we don't have a NULL pointer */
(*pfnct)(); /* Execute the ISR for the interrupting device */
}
#else
pfnct = (PFNCT)VICVectAddr; /* Read the interrupt vector from the VIC */
while (pfnct != (PFNCT)0) { /* Make sure we don't have a NULL pointer */
(*pfnct)(); /* Execute the ISR for the interrupting device */
pfnct = (PFNCT)VICVectAddr; /* Read the interrupt vector from the VIC */
}
#endif
}
/*
********************************************************************************
*************************
* FIQ ISR HANDLER
*
* Description : This function is called by OS_CPU_FIQ_ISR() to determine the source of the interrupt
* and process it accordingly.
*
* Arguments : none
********************************************************************************
*************************
*/
void OS_CPU_FIQ_ISR_Handler(void)
{
PFNCT pfnct;
#if 0
pfnct = (PFNCT)VICVectAddr; /* Read the interrupt vector from the VIC */
if (pfnct != (PFNCT)0) { /* Make sure we don't have a NULL pointer */
(*pfnct)(); /* Execute the ISR for the interrupting device */
}
#else
pfnct = (PFNCT)VICVectAddr; /* Read the interrupt vector from the VIC */
while (pfnct != (PFNCT)0) { /* Make sure we don't have a NULL pointer */
(*pfnct)(); /* Execute the ISR for the interrupting device */
pfnct = (PFNCT)VICVectAddr; /* Read the interrupt vector from the VIC */
}
#endif
}
Может уважаемые гуру скажут - я чего то не понял, или они для скорости сделали copy/paste не вдумываясь в "физический смысл"? ;-)
В мануале на порт скользко обойден вопрос FIQ, кстати.