1 #include "FreeRTOS.h"
\r
5 /* The interrupt entry point. */
\r
6 void vEMAC_ISR_Wrapper( void ) __attribute__((naked));
\r
8 /* The handler that does the actual work. */
\r
9 void vEMAC_ISR_Handler( void );
\r
11 extern xSemaphoreHandle xEMACSemaphore;
\r
14 void vEMAC_ISR_Handler( void )
\r
16 portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
\r
18 /* Clear the interrupt. */
\r
19 MAC_INTCLEAR = 0xffff;
\r
22 /* Ensure the uIP task is not blocked as data has arrived. */
\r
23 xSemaphoreGiveFromISR( xEMACSemaphore, &xHigherPriorityTaskWoken );
\r
25 if( xHigherPriorityTaskWoken )
\r
27 /* Giving the semaphore woke a task. */
\r
28 portYIELD_FROM_ISR();
\r
31 /*-----------------------------------------------------------*/
\r
33 void vEMAC_ISR_Wrapper( void )
\r
35 /* Save the context of the interrupted task. */
\r
38 /* Call the handler. This must be a separate function unless you can
\r
39 guarantee that no stack will be used. */
\r
40 vEMAC_ISR_Handler();
\r
42 /* Restore the context of whichever task is going to run next. */
\r
43 portRESTORE_CONTEXT();
\r