Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
SummerGao.
rt-thread
提交
f818faec
R
rt-thread
项目概览
SummerGao.
/
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,发现更多精彩内容 >>
提交
f818faec
编写于
2月 12, 2021
作者:
Thomas_Fly
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix the code sytle
上级
09625393
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
35 addition
and
25 deletion
+35
-25
bsp/maxim/MAX32660_EVSYS/README.md
bsp/maxim/MAX32660_EVSYS/README.md
+12
-12
bsp/maxim/MAX32660_EVSYS/board/board.h
bsp/maxim/MAX32660_EVSYS/board/board.h
+10
-0
bsp/maxim/libraries/HAL_Drivers/drv_uart.c
bsp/maxim/libraries/HAL_Drivers/drv_uart.c
+13
-13
未找到文件。
bsp/maxim/MAX32660_EVSYS/README.md
浏览文件 @
f818faec
...
...
@@ -12,7 +12,7 @@
开发板datasheet:
[
MAX32660-EVSYS.pdf)
](
https://datasheets.maximintegrated.com/en/ds/MAX32660-EVSYS.pdf
)
支持IDE:
keil
,
[
eclipse
](
https://www.maximintegrated.com/en/design/software-description.html/swpart=SFW0001500A
)
支持IDE:
[
keil pack
](
http://www.mxim.net/microcontroller/pack/Maxim.MAX32660.1.2.0.pack
)
,
[
eclipse
](
https://www.maximintegrated.com/en/design/software-description.html/swpart=SFW0001500A
)
本文主要内容如下:
...
...
@@ -70,17 +70,17 @@ MAX32660-EVSYS开发板常用 **板载资源** 如下:
本 BSP 目前对外设的支持情况如下:
|
**片上外设**
|
**支持情况**
|
**备注**
|
| :----------- | :----------: | :----------: |
| GPIO | | |
| UART | 支持 | UART0, UART1 |
| PWM | | |
| SPI | | |
| RTC | | |
| I2S | | |
| I2C | | |
| TIMER | | |
| Watchdog | | |
|
**片上外设**
|
**支持情况**
|
**备注**
|
| :----------- | :----------: | :----------
---------
: |
| GPIO | |
|
| UART | 支持 | UART0, UART1
(console)
|
| PWM | |
|
| SPI | |
|
| RTC | |
|
| I2S | |
|
| I2C | |
|
| TIMER | |
|
| Watchdog | |
|
...
...
bsp/maxim/MAX32660_EVSYS/board/board.h
浏览文件 @
f818faec
/*
* Copyright (c) 2006-2020, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-02-11 supperthomas first version
*
*/
#ifndef _BOARD_H_
#define _BOARD_H_
...
...
bsp/maxim/libraries/HAL_Drivers/drv_uart.c
浏览文件 @
f818faec
...
...
@@ -15,19 +15,22 @@
#include "rtdevice.h"
#ifdef RT_USING_SERIAL
//#define DRV_DEBUG
//#define LOG_TAG "drv.usart"
//#include <drv_log.h>
#define UART0_CONFIG \
{ \
.name = "uart0", \
.Instance = MXC_UART_GET_UART(0),
\
.irq_type = MXC_UART_GET_IRQ(0),
\
.Instance = MXC_UART_GET_UART(0), \
.irq_type = MXC_UART_GET_IRQ(0), \
}
#define UART1_CONFIG \
{ \
.name = "uart1", \
.Instance = MXC_UART_GET_UART(1),
\
.irq_type = MXC_UART_GET_IRQ(1),
\
.Instance = MXC_UART_GET_UART(1), \
.irq_type = MXC_UART_GET_IRQ(1), \
}
struct
mcu_uart_config
...
...
@@ -49,10 +52,6 @@ struct mcu_uart
//#define DRV_DEBUG
//#define LOG_TAG "drv.usart"
//#include <drv_log.h>
#if !defined(BSP_USING_UART0) && !defined(BSP_USING_UART1)
#error "Please define at least one BSP_USING_UARTx"
...
...
@@ -92,7 +91,7 @@ void UART1_IRQHandler(void)
uint32_t
intst
=
0
;
intst
=
MXC_UART1
->
int_fl
;
MXC_UART1
->
int_fl
=
intst
;
rt_interrupt_leave
();
}
#endif
...
...
@@ -138,9 +137,10 @@ static rt_err_t mcu_configure(struct rt_serial_device *serial, struct serial_con
mcu_cfg
.
pol
=
UART_FLOW_POL_EN
;
error
=
UART_Init
(
uart
->
handle
,
&
mcu_cfg
,
&
sys_uart_cfg
);
if
(
error
!=
E_NO_ERROR
)
{
if
(
error
!=
E_NO_ERROR
)
{
rt_kprintf
(
"Error initializing UART %d
\n
"
,
error
);
while
(
1
)
{}
while
(
1
)
{}
}
return
RT_EOK
;
}
...
...
@@ -171,7 +171,7 @@ static rt_err_t mcu_control(struct rt_serial_device *serial, int cmd, void *arg)
uart
->
handle
->
ctrl
|=
0x05
<<
MXC_F_UART_CTRL_RX_TO_POS
;
uart
->
handle
->
int_en
|=
MXC_F_UART_INT_EN_RX_FIFO_THRESH
|
\
MXC_F_UART_INT_EN_RX_TIMEOUT
;
uart
->
handle
->
int_en
|=
MXC_F_UART_INT_EN_RX_FRAME_ERROR
|
\
MXC_F_UART_INT_EN_RX_PARITY_ERROR
|
\
MXC_F_UART_INT_EN_RX_OVERRUN
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录