Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
rt-thread
提交
61e993d6
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,发现更多精彩内容 >>
未验证
提交
61e993d6
编写于
10月 14, 2021
作者:
G
guo
提交者:
GitHub
10月 14, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #5163 from cndabai/stm32g
修复stm32g系列不同芯片串口中断不匹配
上级
ba5c6231
3c5ed4b1
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
80 addition
and
9 deletion
+80
-9
bsp/stm32/libraries/HAL_Drivers/config/g0/uart_config.h
bsp/stm32/libraries/HAL_Drivers/config/g0/uart_config.h
+80
-9
未找到文件。
bsp/stm32/libraries/HAL_Drivers/config/g0/uart_config.h
浏览文件 @
61e993d6
...
...
@@ -13,6 +13,10 @@
#include <rtthread.h>
#ifdef __cplusplus
extern
"C"
{
#endif
#if defined(BSP_USING_LPUART1)
#ifndef LPUART1_CONFIG
#define LPUART1_CONFIG \
...
...
@@ -61,12 +65,21 @@
#if defined(BSP_USING_UART2)
#ifndef UART2_CONFIG
#if defined(STM32G0B1xx) || defined(STM32G0C1xx)
#define UART2_CONFIG \
{ \
.name = "uart2", \
.Instance = USART2, \
.irq_type = USART2_LPUART2_IRQn , \
}
#else
#define UART2_CONFIG \
{ \
.name = "uart2", \
.Instance = USART2, \
.irq_type = USART2_IRQn, \
}
#endif
/* defined(STM32G0B1xx) || defined(STM32G0C1xx) */
#endif
/* UART2_CONFIG */
#endif
/* BSP_USING_UART2 */
...
...
@@ -84,21 +97,42 @@
#if defined(BSP_USING_UART3)
#ifndef UART3_CONFIG
#if
ndef SOC_SERIES_STM32G0
#if
defined(STM32G0B1xx) || defined(STM32G0C1xx)
#define UART3_CONFIG \
{ \
.name = "uart3", \
.Instance = USART3, \
.irq_type = USART3_
IRQn,
\
.irq_type = USART3_
4_5_6_LPUART1_IRQn,
\
}
#else
#elif defined(STM32G070xx)
#define UART3_CONFIG \
{ \
.name = "uart3", \
.Instance = USART3, \
.irq_type = USART3_4_IRQn, \
}
#elif defined(STM32G071xx) || defined(STM32G081xx)
#define UART3_CONFIG \
{ \
.name = "uart3", \
.Instance = USART3, \
.irq_type = USART3_4_LPUART1_IRQn, \
}
#endif
/* SOC_SERIES_STM32G0 */
#elif defined(STM32G0B0xx)
#define UART3_CONFIG \
{ \
.name = "uart3", \
.Instance = USART3, \
.irq_type = USART3_4_5_6_IRQn, \
}
#else
#define UART3_CONFIG \
{ \
.name = "uart3", \
.Instance = USART3, \
.irq_type = USART3_IRQn, \
}
#endif
/* defined(STM32G0B1xx) || defined(STM32G0C1xx) */
#endif
/* UART3_CONFIG */
#endif
/* BSP_USING_UART3 */
...
...
@@ -116,22 +150,43 @@
#if defined(BSP_USING_UART4)
#ifndef UART4_CONFIG
#if
ndef SOC_SERIES_STM32G0
#if
defined(STM32G0B1xx) || defined(STM32G0C1xx)
#define UART4_CONFIG \
{ \
.name = "uart4", \
.Instance = U
ART4,
\
.irq_type = U
ART4_IRQn,
\
.Instance = U
SART4,
\
.irq_type = U
SART3_4_5_6_LPUART1_IRQn,
\
}
#else
#elif defined(STM32G070xx)
#define UART4_CONFIG \
{ \
.name = "uart4", \
.Instance = USART4, \
.irq_type = USART3_4_IRQn, \
}
#elif defined(STM32G071xx) || defined(STM32G081xx)
#define UART4_CONFIG \
{ \
.name = "uart4", \
.Instance = USART4, \
.irq_type = USART3_4_LPUART1_IRQn, \
}
#elif defined(STM32G0B0xx)
#define UART4_CONFIG \
{ \
.name = "uart4", \
.Instance = USART4, \
.irq_type = USART3_4_5_6_IRQn, \
}
#else
#define UART4_CONFIG \
{ \
.name = "uart4", \
.Instance = USART4, \
.irq_type = USART4_IRQn, \
}
#endif
/* defined(STM32G0B1xx) || defined(STM32G0C1xx) */
#endif
/* UART4_CONFIG */
#endif
/* SOC_SERIES_STM32G0 */
#endif
/* BSP_USING_UART4 */
#if defined(BSP_UART4_RX_USING_DMA)
...
...
@@ -148,12 +203,28 @@
#if defined(BSP_USING_UART5)
#ifndef UART5_CONFIG
#if defined(STM32G0B1xx) || defined(STM32G0C1xx)
#define UART5_CONFIG \
{ \
.name = "uart5", \
.Instance = UART5, \
.irq_type = USART3_4_5_6_LPUART1_IRQn, \
}
#elif defined(STM32G0B0xx)
#define UART5_CONFIG \
{ \
.name = "uart5", \
.Instance = UART5, \
.irq_type = USART3_4_5_6_IRQn, \
}
#else
#define UART5_CONFIG \
{ \
.name = "uart5", \
.Instance = UART5, \
.irq_type = UART5_IRQn, \
}
#endif
/* defined(STM32G0B1xx) || defined(STM32G0C1xx) */
#endif
/* UART5_CONFIG */
#endif
/* BSP_USING_UART5 */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录