mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-03-27 01:10:20 +08:00
update to interrupt description
This commit is contained in:
@@ -27,7 +27,7 @@ extern void rt_hw_serial_init(void);
|
||||
*/
|
||||
/*@{*/
|
||||
|
||||
void rt_timer_handler(int vector)
|
||||
void rt_timer_handler(int vector, void* param)
|
||||
{
|
||||
T0IR |= 0x01; /* clear interrupt flag */
|
||||
rt_tick_increase();
|
||||
@@ -49,7 +49,7 @@ void rt_hw_board_init()
|
||||
T0MCR = 0x03;
|
||||
T0MR0 = (DATA_COUNT);
|
||||
|
||||
rt_hw_interrupt_install(TIMER0_INT, rt_timer_handler, RT_NULL);
|
||||
rt_hw_interrupt_install(TIMER0_INT, rt_timer_handler, RT_NULL, "tick");
|
||||
rt_hw_interrupt_umask(TIMER0_INT);
|
||||
|
||||
T0TCR = 0x01; //enable timer0 counter
|
||||
|
||||
@@ -113,7 +113,7 @@ void rt_hw_uart_isr(struct rt_lpcserial* lpc_serial)
|
||||
}
|
||||
|
||||
#ifdef RT_USING_UART1
|
||||
void rt_hw_uart_isr_1(int irqno)
|
||||
void rt_hw_uart_isr_1(int irqno, void* param)
|
||||
{
|
||||
/* get lpc serial device */
|
||||
rt_hw_uart_isr(&serial1);
|
||||
@@ -121,7 +121,7 @@ void rt_hw_uart_isr_1(int irqno)
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_UART2
|
||||
void rt_hw_uart_isr_2(int irqno)
|
||||
void rt_hw_uart_isr_2(int irqno, void* param)
|
||||
{
|
||||
/* get lpc serial device */
|
||||
rt_hw_uart_isr(&serial2);
|
||||
@@ -153,13 +153,13 @@ static rt_err_t rt_serial_open(rt_device_t dev, rt_uint16_t oflag)
|
||||
if (lpc_serial->irqno == UART0_INT)
|
||||
{
|
||||
#ifdef RT_USING_UART1
|
||||
rt_hw_interrupt_install(lpc_serial->irqno, rt_hw_uart_isr_1, RT_NULL);
|
||||
rt_hw_interrupt_install(lpc_serial->irqno, rt_hw_uart_isr_1, RT_NULL, "uart1");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef RT_USING_UART2
|
||||
rt_hw_interrupt_install(lpc_serial->irqno, rt_hw_uart_isr_2, RT_NULL);
|
||||
rt_hw_interrupt_install(lpc_serial->irqno, rt_hw_uart_isr_2, RT_NULL, "uart2");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user