diff options
| author | aozima <[email protected]> | 2013-03-23 17:48:36 +0800 |
|---|---|---|
| committer | aozima <[email protected]> | 2013-03-31 17:32:20 +0800 |
| commit | 93e04a13667608cb20d098f56a5f1cce75fd8f07 (patch) | |
| tree | 7f59a18ba2db1a15e53370d2878aa3d61e0d78d9 /bsp/dev3210 | |
| parent | 6058efbd9ba70da9113c50c13e2493453c32c772 (diff) | |
update loongson dev3210: Modify the interrupt interface implementations.
Diffstat (limited to 'bsp/dev3210')
| -rw-r--r-- | bsp/dev3210/rtconfig.h | 1 | ||||
| -rw-r--r-- | bsp/dev3210/uart.c | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/bsp/dev3210/rtconfig.h b/bsp/dev3210/rtconfig.h index 7968b263f3..cd94adf742 100644 --- a/bsp/dev3210/rtconfig.h +++ b/bsp/dev3210/rtconfig.h @@ -18,6 +18,7 @@ /* Thread Debug */ #define RT_DEBUG #define RT_USING_OVERFLOW_CHECK +#define RT_USING_INTERRUPT_INFO /* Using Hook */ #define RT_USING_HOOK diff --git a/bsp/dev3210/uart.c b/bsp/dev3210/uart.c index 1b8db9ec39..9d638a515a 100644 --- a/bsp/dev3210/uart.c +++ b/bsp/dev3210/uart.c @@ -25,7 +25,7 @@ /* UART interrupt enable register value */ #define UARTIER_IME (1 << 3) -#define UARTIER_ILE (1 << 2) +#define UARTIER_ILE (1 << 2) #define UARTIER_ITXE (1 << 1) #define UARTIER_IRXE (1 << 0) @@ -59,7 +59,7 @@ struct rt_uart_soc3210 rt_uint8_t rx_buffer[RT_UART_RX_BUFFER_SIZE]; }uart_device; -static void rt_uart_irqhandler(int irqno) +static void rt_uart_irqhandler(int irqno, void *param) { rt_ubase_t level; rt_uint8_t isr; @@ -142,7 +142,7 @@ static rt_err_t rt_uart_open(rt_device_t dev, rt_uint16_t oflag) UART_IER(uart->hw_base) |= UARTIER_IRXE; /* install interrupt */ - rt_hw_interrupt_install(uart->irq, rt_uart_irqhandler, RT_NULL); + rt_hw_interrupt_install(uart->irq, rt_uart_irqhandler, RT_NULL, "UART"); rt_hw_interrupt_umask(uart->irq); } return RT_EOK; |
