forked from Imagelibrary/rtems
2007-10-05 Ray Xu <xr@trasin.net>
* lpc22xx/clock/clockdrv.c, lpc22xx/irq/irq.c, lpc22xx/irq/irq.h: Now runs in Skyeye.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2007-10-05 Ray Xu <xr@trasin.net>
|
||||
|
||||
* lpc22xx/clock/clockdrv.c, lpc22xx/irq/irq.c, lpc22xx/irq/irq.h: Now
|
||||
runs in Skyeye.
|
||||
|
||||
2007-09-12 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
PR 1257/bsps
|
||||
|
||||
@@ -91,6 +91,7 @@ rtems_irq_connect_data clock_isr_data = {LPC22xx_INTERRUPT_TIMER0,
|
||||
T0MCR |= 0x03; /* generate interrupt when T0MR0 match T0TC and Reset Timer Count*/ \
|
||||
T0EMR = 0; /*No external match*/ \
|
||||
T0TCR = 1; /*enable timer0*/ \
|
||||
T0IR|=0x01;/*enable interrupt, skyeye will check this*/\
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,7 +37,6 @@ int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
|
||||
rtems_interrupt_level level;
|
||||
rtems_irq_hdl *bsp_tbl;
|
||||
int *vic_cntl;
|
||||
static int irq_counter = 0;
|
||||
|
||||
bsp_tbl = (rtems_irq_hdl *)VICVectAddrBase;
|
||||
|
||||
@@ -51,7 +50,7 @@ int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
|
||||
* Check if default handler is actually connected. If not issue an error.
|
||||
*/
|
||||
|
||||
if (bsp_tbl[irq_counter] != default_int_handler) {
|
||||
if (bsp_tbl[irq->name] != default_int_handler) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -60,12 +59,12 @@ int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
|
||||
/*
|
||||
* store the new handler
|
||||
*/
|
||||
bsp_tbl[irq_counter] = irq->hdl;
|
||||
bsp_tbl[irq->name] = irq->hdl;
|
||||
/* *(volatile unsigned long*)(VICVectAddr0+(irq->name * 4)&0x7c )= (uint32_t) irq->hdl;*/
|
||||
/*
|
||||
* Enable interrupt on device
|
||||
*/
|
||||
vic_cntl[irq_counter] = 0x20 | irq->name;
|
||||
vic_cntl[irq->name] = 0x20 | irq->name;
|
||||
|
||||
VICIntEnable |= 1 << irq->name;
|
||||
|
||||
@@ -74,7 +73,6 @@ int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
|
||||
irq->on(irq);
|
||||
}
|
||||
|
||||
irq_counter++;
|
||||
|
||||
rtems_interrupt_enable(level);
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ extern void default_int_handler();
|
||||
#define LPC22xx_INTERRUPT_EINT2 16 /* Externel Interrupt 2 */
|
||||
#define LPC22xx_INTERRUPT_EINT3 17 /* Externel Interrupt 3 */
|
||||
#define LPC22xx_INTERRUPT_ADC 18 /* AD Converter */
|
||||
/* Following interrupt used by lpc229x */
|
||||
#define LPC22xx_INTERRUPT_CANERR 19 /* CAN LUTerr interrupt */
|
||||
#define LPC22xx_INTERRUPT_CAN1TX 20 /* CAN1 Tx interrupt */
|
||||
#define LPC22xx_INTERRUPT_CAN1RX 21 /* CAN1 Rx interrupt */
|
||||
|
||||
Reference in New Issue
Block a user