diff options
| author | aozima <[email protected]> | 2013-03-23 16:38:13 +0800 |
|---|---|---|
| committer | aozima <[email protected]> | 2013-03-31 17:30:30 +0800 |
| commit | fbc1b05dd8c07fb95d9d02a476a604252dbc7ac3 (patch) | |
| tree | f4ef4ef9097a6a95e5e8d84d79c427d6c1b0821d /bsp/mini2440 | |
| parent | 97eadb7d8ee2aa96a3de6acaa9e2815774da2b6f (diff) | |
update mini2440: Modify the interrupt interface implementations.
Diffstat (limited to 'bsp/mini2440')
| -rw-r--r-- | bsp/mini2440/board.c | 22 | ||||
| -rw-r--r-- | bsp/mini2440/dm9000.c | 4 | ||||
| -rw-r--r-- | bsp/mini2440/rtconfig.h | 2 |
3 files changed, 15 insertions, 13 deletions
diff --git a/bsp/mini2440/board.c b/bsp/mini2440/board.c index 23e78e6c7c..fc623386b4 100644 --- a/bsp/mini2440/board.c +++ b/bsp/mini2440/board.c @@ -58,7 +58,7 @@ struct rt_device uart2_device; /** * This function will handle rtos timer */ -static void rt_timer_handler(int vector) +static void rt_timer_handler(int vector, void *param) { rt_tick_increase(); } @@ -66,7 +66,7 @@ static void rt_timer_handler(int vector) /** * This function will handle serial */ -static void rt_serial0_handler(int vector) +static void rt_serial0_handler(int vector, void *param) { INTSUBMSK |= (BIT_SUB_RXD0); @@ -81,7 +81,7 @@ static void rt_serial0_handler(int vector) /** * This function will handle serial */ -static void rt_serial2_handler(int vector) +static void rt_serial2_handler(int vector, void *param) { INTSUBMSK |= (BIT_SUB_RXD2); @@ -133,7 +133,7 @@ static void rt_hw_uart_init(void) uart2.uart_device->ucon = 0x245; /* Set uart0 bps */ uart2.uart_device->ubrd = (rt_int32_t)(PCLK / (BPS * 16)) - 1; - + for (i = 0; i < 100; i++); /* install uart0 isr */ @@ -141,18 +141,18 @@ static void rt_hw_uart_init(void) /* install uart2 isr */ INTSUBMSK &= ~(BIT_SUB_RXD2); - - rt_hw_interrupt_install(INTUART0, rt_serial0_handler, RT_NULL); + + rt_hw_interrupt_install(INTUART0, rt_serial0_handler, RT_NULL, "UART0"); rt_hw_interrupt_umask(INTUART0); - rt_hw_interrupt_install(INTUART2, rt_serial2_handler, RT_NULL); - rt_hw_interrupt_umask(INTUART2); + rt_hw_interrupt_install(INTUART2, rt_serial2_handler, RT_NULL, "UART2"); + rt_hw_interrupt_umask(INTUART2); } /** * This function will init timer4 for system ticks */ -static void rt_hw_timer_init() +static void rt_hw_timer_init(void) { /* timer4, pre = 15+1 */ TCFG0 &= 0xffff00ff; @@ -165,7 +165,7 @@ static void rt_hw_timer_init() /* manual update */ TCON = TCON & (~(0x0f<<20)) | (0x02<<20); /* install interrupt handler */ - rt_hw_interrupt_install(INTTIMER4, rt_timer_handler, RT_NULL); + rt_hw_interrupt_install(INTTIMER4, rt_timer_handler, RT_NULL, "tick"); rt_hw_interrupt_umask(INTTIMER4); /* start timer4, reload */ @@ -175,7 +175,7 @@ static void rt_hw_timer_init() /** * This function will init s3ceb2410 board */ -void rt_hw_board_init() +void rt_hw_board_init(void) { /* initialize the system clock */ rt_hw_clock_init(); diff --git a/bsp/mini2440/dm9000.c b/bsp/mini2440/dm9000.c index ee8e404c82..527be3b7b8 100644 --- a/bsp/mini2440/dm9000.c +++ b/bsp/mini2440/dm9000.c @@ -572,7 +572,7 @@ __error_retry: #define B4_Tacp 0x0 #define B4_PMC 0x0 -void INTEINT4_7_handler(int irqno) +void INTEINT4_7_handler(int irqno, void *param) { rt_uint32_t eint_pend; @@ -637,7 +637,7 @@ void rt_hw_dm9000_init() eth_device_init(&(dm9000_device.parent), "e0"); /* instal interrupt */ - rt_hw_interrupt_install(INTEINT4_7, INTEINT4_7_handler, RT_NULL); + rt_hw_interrupt_install(INTEINT4_7, INTEINT4_7_handler, RT_NULL, "EINT4_7"); rt_hw_interrupt_umask(INTEINT4_7); } diff --git a/bsp/mini2440/rtconfig.h b/bsp/mini2440/rtconfig.h index 3f87e45073..2e4c05bbce 100644 --- a/bsp/mini2440/rtconfig.h +++ b/bsp/mini2440/rtconfig.h @@ -22,6 +22,8 @@ // #define RT_THREAD_DEBUG // <bool name="RT_USING_OVERFLOW_CHECK" description="Thread stack over flow detect" default="true" /> #define RT_USING_OVERFLOW_CHECK +// <bool name="RT_USING_INTERRUPT_INFO" description="Show more interrupt description" default="true" /> +#define RT_USING_INTERRUPT_INFO // </section> // <bool name="RT_USING_HOOK" description="Using hook functions" default="true" /> |
