Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Keyboard Man_俊
rt-thread
提交
dc3d3817
R
rt-thread
项目概览
Keyboard Man_俊
/
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,发现更多精彩内容 >>
提交
dc3d3817
编写于
7月 29, 2017
作者:
T
tanek liang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[bsp] fixed typo in bsp/lpc824
上级
a9f03fb4
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
23 deletion
+22
-23
bsp/lpc824/applications/startup.c
bsp/lpc824/applications/startup.c
+2
-2
bsp/lpc824/drivers/board.c
bsp/lpc824/drivers/board.c
+1
-2
bsp/lpc824/drivers/usart.c
bsp/lpc824/drivers/usart.c
+19
-19
未找到文件。
bsp/lpc824/applications/startup.c
浏览文件 @
dc3d3817
...
...
@@ -10,7 +10,7 @@
* Change Logs:
* Date Author Notes
* 2006-08-31 Bernard first implementation
* 201
1-06-05 Bernard modify for STM32F107
version
* 201
7-07-29 Tanek modify for LPC8xx
version
*/
#include <stdint.h>
...
...
@@ -20,7 +20,7 @@
#include "board.h"
/**
* @addtogroup
STM32
* @addtogroup
LPC8xx
*/
/*@{*/
...
...
bsp/lpc824/drivers/board.c
浏览文件 @
dc3d3817
...
...
@@ -54,10 +54,9 @@ void SysTick_Handler(void)
rt_interrupt_leave
();
}
/* re-implement tick interface for STM32 HAL */
/**
* This function will initial
STM32
board.
* This function will initial
LPC8XX
board.
*/
void
rt_hw_board_init
()
{
...
...
bsp/lpc824/drivers/usart.c
浏览文件 @
dc3d3817
...
...
@@ -24,8 +24,8 @@
#define UART_RX_BUFSZ 8
/*
STM32
uart driver */
struct
stm32
_uart
/*
LPC8XX
uart driver */
struct
lpc8xx
_uart
{
struct
rt_device
parent
;
struct
rt_ringbuffer
rx_rb
;
...
...
@@ -35,18 +35,18 @@ struct stm32_uart
};
#ifdef RT_USING_UART0
struct
stm32
_uart
uart0_device
;
struct
lpc8xx
_uart
uart0_device
;
#endif
#ifdef RT_USING_UART1
struct
stm32
_uart
uart1_device
;
struct
lpc8xx
_uart
uart1_device
;
#endif
#ifdef RT_USING_UART2
struct
stm32
_uart
uart2_device
;
struct
lpc8xx
_uart
uart2_device
;
#endif
void
uart_irq_handler
(
struct
stm32
_uart
*
uart
)
void
uart_irq_handler
(
struct
lpc8xx
_uart
*
uart
)
{
uint32_t
status
;
...
...
@@ -147,9 +147,9 @@ static void uart_ll_init(LPC_USART_T * uart)
static
rt_err_t
rt_uart_init
(
rt_device_t
dev
)
{
struct
stm32
_uart
*
uart
;
struct
lpc8xx
_uart
*
uart
;
RT_ASSERT
(
dev
!=
RT_NULL
);
uart
=
(
struct
stm32
_uart
*
)
dev
;
uart
=
(
struct
lpc8xx
_uart
*
)
dev
;
uart1_io_init
(
uart
->
uart_base
);
uart_ll_init
(
uart
->
uart_base
);
...
...
@@ -159,9 +159,9 @@ static rt_err_t rt_uart_init (rt_device_t dev)
static
rt_err_t
rt_uart_open
(
rt_device_t
dev
,
rt_uint16_t
oflag
)
{
struct
stm32
_uart
*
uart
;
struct
lpc8xx
_uart
*
uart
;
RT_ASSERT
(
dev
!=
RT_NULL
);
uart
=
(
struct
stm32
_uart
*
)
dev
;
uart
=
(
struct
lpc8xx
_uart
*
)
dev
;
if
(
dev
->
flag
&
RT_DEVICE_FLAG_INT_RX
)
{
...
...
@@ -174,9 +174,9 @@ static rt_err_t rt_uart_open(rt_device_t dev, rt_uint16_t oflag)
static
rt_err_t
rt_uart_close
(
rt_device_t
dev
)
{
struct
stm32
_uart
*
uart
;
struct
lpc8xx
_uart
*
uart
;
RT_ASSERT
(
dev
!=
RT_NULL
);
uart
=
(
struct
stm32
_uart
*
)
dev
;
uart
=
(
struct
lpc8xx
_uart
*
)
dev
;
if
(
dev
->
flag
&
RT_DEVICE_FLAG_INT_RX
)
{
...
...
@@ -193,9 +193,9 @@ static rt_size_t rt_uart_read(rt_device_t dev, rt_off_t pos, void* buffer, rt_si
rt_base_t
level
;
rt_size_t
length
;
struct
stm32
_uart
*
uart
;
struct
lpc8xx
_uart
*
uart
;
RT_ASSERT
(
serial
!=
RT_NULL
);
uart
=
(
struct
stm32
_uart
*
)
dev
;
uart
=
(
struct
lpc8xx
_uart
*
)
dev
;
RT_ASSERT
(
uart
!=
RT_NULL
);
...
...
@@ -212,9 +212,9 @@ static rt_size_t rt_uart_read(rt_device_t dev, rt_off_t pos, void* buffer, rt_si
static
rt_size_t
rt_uart_write
(
rt_device_t
dev
,
rt_off_t
pos
,
const
void
*
buffer
,
rt_size_t
size
)
{
char
*
ptr
=
(
char
*
)
buffer
;
struct
stm32
_uart
*
uart
;
struct
lpc8xx
_uart
*
uart
;
RT_ASSERT
(
serial
!=
RT_NULL
);
uart
=
(
struct
stm32
_uart
*
)
dev
;
uart
=
(
struct
lpc8xx
_uart
*
)
dev
;
if
(
dev
->
open_flag
&
RT_DEVICE_FLAG_STREAM
)
{
...
...
@@ -253,7 +253,7 @@ int rt_hw_usart_init(void)
{
#ifdef RT_USING_UART0
{
struct
stm32
_uart
*
uart
;
struct
lpc8xx
_uart
*
uart
;
/* get uart device */
uart
=
&
uart1_device
;
...
...
@@ -280,7 +280,7 @@ int rt_hw_usart_init(void)
#ifdef RT_USING_UART1
{
struct
stm32
_uart
*
uart
;
struct
lpc8xx
_uart
*
uart
;
/* get uart device */
uart
=
&
uart1_device
;
...
...
@@ -307,7 +307,7 @@ int rt_hw_usart_init(void)
#ifdef RT_USING_UART2
{
struct
stm32
_uart
*
uart
;
struct
lpc8xx
_uart
*
uart
;
/* get uart device */
uart
=
&
uart2_device
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录