OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [ARM7_LPC2368_Rowley/] [webserver/] [EMAC_ISR.c] - Blame information for rev 577

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 577 jeremybenn
#include "FreeRTOS.h"
2
#include "semphr.h"
3
#include "task.h"
4
 
5
/* The interrupt entry point. */
6
void vEMAC_ISR_Wrapper( void ) __attribute__((naked));
7
 
8
/* The function that actually performs the interrupt processing.  This must be
9
separate to the wrapper to ensure the correct stack frame is set up. */
10
void vEMAC_ISR_Handler( void ) __attribute__((noinline));
11
 
12
extern xSemaphoreHandle xEMACSemaphore;
13
 
14
void vEMAC_ISR_Handler( void )
15
{
16
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
17
 
18
    /* Clear the interrupt. */
19
    IntClear = 0xffff;
20
    VICVectAddr = 0;
21
 
22
    /* Ensure the uIP task is not blocked as data has arrived. */
23
    xSemaphoreGiveFromISR( xEMACSemaphore, &xHigherPriorityTaskWoken );
24
 
25
        if( xHigherPriorityTaskWoken )
26
    {
27
                /* If the uIP task was unblocked then calling "Yield from ISR" here
28
                will ensure the interrupt returns directly to the uIP task, if it
29
                is the highest priority read task. */
30
        portYIELD_FROM_ISR();
31
    }
32
}
33
/*-----------------------------------------------------------*/
34
 
35
void vEMAC_ISR_Wrapper( void )
36
{
37
        /* Save the context of the interrupted task. */
38
        portSAVE_CONTEXT();
39
 
40
        /* Call the handler function.  This must be separate from the wrapper
41
        function to ensure the correct stack frame is set up. */
42
        __asm volatile( "bl vEMAC_ISR_Handler" );
43
 
44
        /* Restore the context of whichever task is going to run next. */
45
        portRESTORE_CONTEXT();
46
}
47
 
48
 
49
 
50
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.