Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
rt-thread
提交
2ccb3c75
R
rt-thread
项目概览
BaiXuePrincess
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2ccb3c75
编写于
3月 23, 2013
作者:
wuyangyong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update LPC2478: Modify the interrupt interface implementations.
上级
1549b7db
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
36 deletion
+13
-36
bsp/lpc2478/drivers/board.c
bsp/lpc2478/drivers/board.c
+1
-1
bsp/lpc2478/drivers/serial.c
bsp/lpc2478/drivers/serial.c
+4
-29
libcpu/arm/lpc24xx/interrupt.c
libcpu/arm/lpc24xx/interrupt.c
+6
-4
libcpu/arm/lpc24xx/trap.c
libcpu/arm/lpc24xx/trap.c
+2
-2
未找到文件。
bsp/lpc2478/drivers/board.c
浏览文件 @
2ccb3c75
...
...
@@ -37,7 +37,7 @@ void rt_timer_handler(int vector, void* param)
/**
* This function will init LPC2478 board
*/
void
rt_hw_board_init
()
void
rt_hw_board_init
(
void
)
{
#if defined(RT_USING_DEVICE) && defined(RT_USING_UART1)
rt_hw_serial_init
();
...
...
bsp/lpc2478/drivers/serial.c
浏览文件 @
2ccb3c75
...
...
@@ -64,9 +64,10 @@ void rt_hw_serial_init(void);
#define U0PINS 0x00000005
void
rt_hw_uart_isr
(
struct
rt_lpcserial
*
lpc_serial
)
void
rt_hw_uart_isr
(
int
irqno
,
void
*
param
)
{
UNUSED
rt_uint32_t
iir
;
struct
rt_lpcserial
*
lpc_serial
=
(
struct
rt_lpcserial
*
)
param
;
RT_ASSERT
(
lpc_serial
!=
RT_NULL
)
...
...
@@ -112,21 +113,6 @@ void rt_hw_uart_isr(struct rt_lpcserial* lpc_serial)
VICVectAddr
=
0
;
}
#ifdef RT_USING_UART1
void
rt_hw_uart_isr_1
(
int
irqno
,
void
*
param
)
{
/* get lpc serial device */
rt_hw_uart_isr
(
&
serial1
);
}
#endif
#ifdef RT_USING_UART2
void
rt_hw_uart_isr_2
(
int
irqno
,
void
*
param
)
{
/* get lpc serial device */
rt_hw_uart_isr
(
&
serial2
);
}
#endif
/**
* @addtogroup LPC214x
...
...
@@ -150,19 +136,8 @@ static rt_err_t rt_serial_open(rt_device_t dev, rt_uint16_t oflag)
UART_IER
(
lpc_serial
->
hw_base
)
=
0x01
;
/* install ISR */
if
(
lpc_serial
->
irqno
==
UART0_INT
)
{
#ifdef RT_USING_UART1
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
,
"uart2"
);
#endif
}
rt_hw_interrupt_install
(
lpc_serial
->
irqno
,
rt_hw_uart_isr
,
lpc_serial
,
RT_NULL
);
rt_hw_interrupt_umask
(
lpc_serial
->
irqno
);
}
...
...
libcpu/arm/lpc24xx/interrupt.c
浏览文件 @
2ccb3c75
...
...
@@ -10,8 +10,10 @@
* Change Logs:
* Date Author Notes
* 2008-12-11 XuXinming first version
* 2013-03-29 aozima Modify the interrupt interface implementations.
*/
#include <rtthread.h>
#include <rthw.h>
#include "LPC24xx.h"
...
...
@@ -35,7 +37,7 @@ void rt_hw_interrupt_handler(int vector, void *param)
rt_kprintf
(
"Unhandled interrupt %d occured!!!
\n
"
,
vector
);
}
void
rt_hw_interrupt_init
()
void
rt_hw_interrupt_init
(
void
)
{
register
int
i
;
...
...
@@ -47,10 +49,10 @@ void rt_hw_interrupt_init()
VICIntSelect
=
0
;
/* init exceptions table */
rt_memset
(
irq_desc
,
0x00
,
sizeof
(
irq_desc
));
for
(
i
=
0
;
i
<
MAX_HANDLERS
;
i
++
)
{
irq_desc
[
i
].
handler
=
(
rt_isr_handler_t
)
rt_hw_interrupt_handler
;
irq_desc
[
i
].
param
=
RT_NULL
;
irq_desc
[
i
].
handler
=
rt_hw_interrupt_handler
;
vect_addr
=
(
rt_uint32_t
*
)(
VIC_BASE_ADDR
+
0x100
+
i
*
4
);
vect_cntl
=
(
rt_uint32_t
*
)(
VIC_BASE_ADDR
+
0x200
+
i
*
4
);
...
...
@@ -94,7 +96,7 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler,
old_handler
=
irq_desc
[
vector
].
handler
;
if
(
handler
!=
RT_NULL
)
{
irq_desc
[
vector
].
handler
=
(
rt_isr_handler_t
)
handler
;
irq_desc
[
vector
].
handler
=
handler
;
irq_desc
[
vector
].
param
=
param
;
}
}
...
...
libcpu/arm/lpc24xx/trap.c
浏览文件 @
2ccb3c75
...
...
@@ -126,7 +126,7 @@ void rt_hw_trap_resv(struct rt_hw_register *regs)
}
extern
rt_isr_handler_t
isr_table
[];
void
rt_hw_trap_irq
()
void
rt_hw_trap_irq
(
void
)
{
int
irqno
;
struct
rt_irq_desc
*
irq
;
...
...
@@ -139,7 +139,7 @@ void rt_hw_trap_irq()
irq
->
handler
(
irqno
,
irq
->
param
);
}
void
rt_hw_trap_fiq
()
void
rt_hw_trap_fiq
(
void
)
{
rt_kprintf
(
"fast interrupt request
\n
"
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录