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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [ARM7_LPC2368_Eclipse/] [RTOSDemo/] [webserver/] [EMAC_ISR.c] - Blame information for rev 609

Go to most recent revision | 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 handler that does the actual work. */
9
void vEMAC_ISR_Handler( void ) __attribute__((noinline));
10
 
11
extern xSemaphoreHandle xEMACSemaphore;
12
 
13
 
14
void vEMAC_ISR_Handler( void )
15
{
16
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
17
 
18
    /* Clear the interrupt. */
19
    MAC_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
        /* Giving the semaphore woke a task. */
28
        portYIELD_FROM_ISR();
29
    }
30
}
31
/*-----------------------------------------------------------*/
32
 
33
void vEMAC_ISR_Wrapper( void )
34
{
35
        /* Save the context of the interrupted task. */
36
    portSAVE_CONTEXT();
37
 
38
    /* Call the handler.  This must be a separate function unless you can
39
    guarantee that no stack will be used. */
40
    __asm volatile ( "bl vEMAC_ISR_Handler" );
41
 
42
    /* Restore the context of whichever task is going to run next. */
43
    portRESTORE_CONTEXT();
44
}
45
 

powered by: WebSVN 2.1.0

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