Changeset 583eb458 in rtems


Ignore:
Timestamp:
Jul 15, 2013, 9:34:45 AM (8 years ago)
Author:
Vipul Nayyar <nayyar_vipul@…>
Branches:
4.11, 5, master
Children:
c8d78ee
Parents:
818d4b0
git-author:
Vipul Nayyar <nayyar_vipul@…> (07/15/13 09:34:45)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/15/13 09:51:50)
Message:

bsp/rtl22xx: Use IRQ extensions API

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/rtl22xx/network/network.c

    r818d4b0 r583eb458  
    44#include <bsp/irq.h>
    55#include <libchip/cs8900.h>
     6#include <assert.h>
    67
    78#define CS8900_BASE 0x20000300
    89unsigned int bsp_cs8900_io_base = 0;
    910unsigned int bsp_cs8900_memory_base = 0;
    10 cs8900_device *g_cs;
    11 void cs8900_isr(rtems_irq_hdl_param unused);
    12 rtems_irq_connect_data cs8900_isr_data = {LPC22xx_INTERRUPT_EINT2,
    13                                          cs8900_isr,
    14                                           NULL,
    15                                           NULL,
    16                                           NULL,
    17                                           NULL};
     11static void cs8900_isr(void *);
    1812
    1913char g_enetbuf[1520];
    2014
    21 void cs8900_isr(rtems_irq_hdl_param unused)
     15static void cs8900_isr(void *arg)
    2216{
    23     cs8900_interrupt(LPC22xx_INTERRUPT_EINT2, g_cs);
     17    cs8900_interrupt(LPC22xx_INTERRUPT_EINT2, arg);
    2418}
    2519
     
    7064void cs8900_attach_interrupt (cs8900_device *cs)
    7165{
    72     g_cs = cs;
    73     BSP_install_rtems_irq_handler(&cs8900_isr_data);
     66    rtems_status_code status = RTEMS_SUCCESSFUL;
     67    status = rtems_interrupt_handler_install(
     68        LPC22xx_INTERRUPT_EINT2,
     69        "Network",
     70        RTEMS_INTERRUPT_UNIQUE,
     71        cs8900_isr,
     72        cs
     73    );
     74    assert(status == RTEMS_SUCCESSFUL);
    7475}
    7576
    7677void cs8900_detach_interrupt (cs8900_device *cs)
    7778{
    78     BSP_remove_rtems_irq_handler(&cs8900_isr_data);
     79    rtems_status_code status = RTEMS_SUCCESSFUL;
     80    status = rtems_interrupt_handler_remove(
     81        LPC22xx_INTERRUPT_EINT2,
     82        cs8900_isr,
     83        cs
     84    );
     85    assert(status == RTEMS_SUCCESSFUL);
    7986}
    8087
Note: See TracChangeset for help on using the changeset viewer.