Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
红岛
rt-thread
提交
5b7dac8c
R
rt-thread
项目概览
红岛
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5b7dac8c
编写于
4月 23, 2021
作者:
whj123999
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[add] spi config increases irq_type
上级
b7a5319e
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
54 addition
and
0 deletion
+54
-0
bsp/stm32/libraries/HAL_Drivers/config/f0/spi_config.h
bsp/stm32/libraries/HAL_Drivers/config/f0/spi_config.h
+2
-0
bsp/stm32/libraries/HAL_Drivers/config/f1/spi_config.h
bsp/stm32/libraries/HAL_Drivers/config/f1/spi_config.h
+3
-0
bsp/stm32/libraries/HAL_Drivers/config/f2/spi_config.h
bsp/stm32/libraries/HAL_Drivers/config/f2/spi_config.h
+3
-0
bsp/stm32/libraries/HAL_Drivers/config/f4/spi_config.h
bsp/stm32/libraries/HAL_Drivers/config/f4/spi_config.h
+5
-0
bsp/stm32/libraries/HAL_Drivers/config/f7/spi_config.h
bsp/stm32/libraries/HAL_Drivers/config/f7/spi_config.h
+5
-0
bsp/stm32/libraries/HAL_Drivers/config/g0/spi_config.h
bsp/stm32/libraries/HAL_Drivers/config/g0/spi_config.h
+2
-0
bsp/stm32/libraries/HAL_Drivers/config/g4/spi_config.h
bsp/stm32/libraries/HAL_Drivers/config/g4/spi_config.h
+5
-0
bsp/stm32/libraries/HAL_Drivers/config/h7/spi_config.h
bsp/stm32/libraries/HAL_Drivers/config/h7/spi_config.h
+5
-0
bsp/stm32/libraries/HAL_Drivers/config/l1/spi_config.h
bsp/stm32/libraries/HAL_Drivers/config/l1/spi_config.h
+3
-0
bsp/stm32/libraries/HAL_Drivers/config/l4/spi_config.h
bsp/stm32/libraries/HAL_Drivers/config/l4/spi_config.h
+3
-0
bsp/stm32/libraries/HAL_Drivers/config/mp1/spi_config.h
bsp/stm32/libraries/HAL_Drivers/config/mp1/spi_config.h
+5
-0
bsp/stm32/libraries/HAL_Drivers/config/wb/spi_config.h
bsp/stm32/libraries/HAL_Drivers/config/wb/spi_config.h
+3
-0
bsp/stm32/libraries/HAL_Drivers/config/wl/spi_config.h
bsp/stm32/libraries/HAL_Drivers/config/wl/spi_config.h
+3
-0
bsp/stm32/libraries/HAL_Drivers/drv_spi.c
bsp/stm32/libraries/HAL_Drivers/drv_spi.c
+6
-0
bsp/stm32/libraries/HAL_Drivers/drv_spi.h
bsp/stm32/libraries/HAL_Drivers/drv_spi.h
+1
-0
未找到文件。
bsp/stm32/libraries/HAL_Drivers/config/f0/spi_config.h
浏览文件 @
5b7dac8c
...
...
@@ -24,6 +24,7 @@ extern "C" {
{ \
.Instance = SPI1, \
.bus_name = "spi1", \
.irq_type = SPI1_IRQn, \
}
#endif
/* SPI1_BUS_CONFIG */
#endif
/* BSP_USING_SPI1 */
...
...
@@ -56,6 +57,7 @@ extern "C" {
{ \
.Instance = SPI2, \
.bus_name = "spi2", \
.irq_type = SPI2_IRQn, \
}
#endif
/* SPI2_BUS_CONFIG */
#endif
/* BSP_USING_SPI2 */
...
...
bsp/stm32/libraries/HAL_Drivers/config/f1/spi_config.h
浏览文件 @
5b7dac8c
...
...
@@ -24,6 +24,7 @@ extern "C" {
{ \
.Instance = SPI1, \
.bus_name = "spi1", \
.irq_type = SPI1_IRQn, \
}
#endif
/* SPI1_BUS_CONFIG */
#endif
/* BSP_USING_SPI1 */
...
...
@@ -56,6 +57,7 @@ extern "C" {
{ \
.Instance = SPI2, \
.bus_name = "spi2", \
.irq_type = SPI2_IRQn, \
}
#endif
/* SPI2_BUS_CONFIG */
#endif
/* BSP_USING_SPI2 */
...
...
@@ -88,6 +90,7 @@ extern "C" {
{ \
.Instance = SPI3, \
.bus_name = "spi3", \
.irq_type = SPI3_IRQn, \
}
#endif
/* SPI3_BUS_CONFIG */
#endif
/* BSP_USING_SPI3 */
...
...
bsp/stm32/libraries/HAL_Drivers/config/f2/spi_config.h
浏览文件 @
5b7dac8c
...
...
@@ -24,6 +24,7 @@ extern "C" {
{ \
.Instance = SPI1, \
.bus_name = "spi1", \
.irq_type = SPI1_IRQn, \
}
#endif
/* SPI1_BUS_CONFIG */
#endif
/* BSP_USING_SPI1 */
...
...
@@ -58,6 +59,7 @@ extern "C" {
{ \
.Instance = SPI2, \
.bus_name = "spi2", \
.irq_type = SPI2_IRQn, \
}
#endif
/* SPI2_BUS_CONFIG */
#endif
/* BSP_USING_SPI2 */
...
...
@@ -92,6 +94,7 @@ extern "C" {
{ \
.Instance = SPI3, \
.bus_name = "spi3", \
.irq_type = SPI3_IRQn, \
}
#endif
/* SPI3_BUS_CONFIG */
#endif
/* BSP_USING_SPI3 */
...
...
bsp/stm32/libraries/HAL_Drivers/config/f4/spi_config.h
浏览文件 @
5b7dac8c
...
...
@@ -24,6 +24,7 @@ extern "C" {
{ \
.Instance = SPI1, \
.bus_name = "spi1", \
.irq_type = SPI1_IRQn, \
}
#endif
/* SPI1_BUS_CONFIG */
#endif
/* BSP_USING_SPI1 */
...
...
@@ -58,6 +59,7 @@ extern "C" {
{ \
.Instance = SPI2, \
.bus_name = "spi2", \
.irq_type = SPI2_IRQn, \
}
#endif
/* SPI2_BUS_CONFIG */
#endif
/* BSP_USING_SPI2 */
...
...
@@ -92,6 +94,7 @@ extern "C" {
{ \
.Instance = SPI3, \
.bus_name = "spi3", \
.irq_type = SPI3_IRQn, \
}
#endif
/* SPI3_BUS_CONFIG */
#endif
/* BSP_USING_SPI3 */
...
...
@@ -126,6 +129,7 @@ extern "C" {
{ \
.Instance = SPI4, \
.bus_name = "spi4", \
.irq_type = SPI4_IRQn, \
}
#endif
/* SPI4_BUS_CONFIG */
#endif
/* BSP_USING_SPI4 */
...
...
@@ -160,6 +164,7 @@ extern "C" {
{ \
.Instance = SPI5, \
.bus_name = "spi5", \
.irq_type = SPI5_IRQn, \
}
#endif
/* SPI5_BUS_CONFIG */
#endif
/* BSP_USING_SPI5 */
...
...
bsp/stm32/libraries/HAL_Drivers/config/f7/spi_config.h
浏览文件 @
5b7dac8c
...
...
@@ -23,6 +23,7 @@ extern "C" {
{ \
.Instance = SPI1, \
.bus_name = "spi1", \
.irq_type = SPI1_IRQn, \
}
#endif
/* SPI1_BUS_CONFIG */
#endif
/* BSP_USING_SPI1 */
...
...
@@ -57,6 +58,7 @@ extern "C" {
{ \
.Instance = SPI2, \
.bus_name = "spi2", \
.irq_type = SPI2_IRQn, \
}
#endif
/* SPI2_BUS_CONFIG */
#endif
/* BSP_USING_SPI2 */
...
...
@@ -91,6 +93,7 @@ extern "C" {
{ \
.Instance = SPI3, \
.bus_name = "spi3", \
.irq_type = SPI3_IRQn, \
}
#endif
/* SPI3_BUS_CONFIG */
#endif
/* BSP_USING_SPI3 */
...
...
@@ -125,6 +128,7 @@ extern "C" {
{ \
.Instance = SPI4, \
.bus_name = "spi4", \
.irq_type = SPI4_IRQn, \
}
#endif
/* SPI4_BUS_CONFIG */
#endif
/* BSP_USING_SPI4 */
...
...
@@ -159,6 +163,7 @@ extern "C" {
{ \
.Instance = SPI5, \
.bus_name = "spi5", \
.irq_type = SPI5_IRQn, \
}
#endif
/* SPI5_BUS_CONFIG */
#endif
/* BSP_USING_SPI5 */
...
...
bsp/stm32/libraries/HAL_Drivers/config/g0/spi_config.h
浏览文件 @
5b7dac8c
...
...
@@ -24,6 +24,7 @@ extern "C" {
{ \
.Instance = SPI1, \
.bus_name = "spi1", \
.irq_type = SPI1_IRQn, \
}
#endif
/* SPI1_BUS_CONFIG */
#endif
/* BSP_USING_SPI1 */
...
...
@@ -58,6 +59,7 @@ extern "C" {
{ \
.Instance = SPI2, \
.bus_name = "spi2", \
.irq_type = SPI2_IRQn, \
}
#endif
/* SPI2_BUS_CONFIG */
#endif
/* BSP_USING_SPI2 */
...
...
bsp/stm32/libraries/HAL_Drivers/config/g4/spi_config.h
浏览文件 @
5b7dac8c
...
...
@@ -24,6 +24,7 @@ extern "C" {
{ \
.Instance = SPI1, \
.bus_name = "spi1", \
.irq_type = SPI1_IRQn, \
}
#endif
/* SPI1_BUS_CONFIG */
#endif
/* BSP_USING_SPI1 */
...
...
@@ -58,6 +59,7 @@ extern "C" {
{ \
.Instance = SPI2, \
.bus_name = "spi2", \
.irq_type = SPI2_IRQn, \
}
#endif
/* SPI2_BUS_CONFIG */
#endif
/* BSP_USING_SPI2 */
...
...
@@ -92,6 +94,7 @@ extern "C" {
{ \
.Instance = SPI3, \
.bus_name = "spi3", \
.irq_type = SPI3_IRQn, \
}
#endif
/* SPI3_BUS_CONFIG */
#endif
/* BSP_USING_SPI3 */
...
...
@@ -126,6 +129,7 @@ extern "C" {
{ \
.Instance = SPI4, \
.bus_name = "spi4", \
.irq_type = SPI4_IRQn, \
}
#endif
/* SPI4_BUS_CONFIG */
#endif
/* BSP_USING_SPI4 */
...
...
@@ -160,6 +164,7 @@ extern "C" {
{ \
.Instance = SPI5, \
.bus_name = "spi5", \
.irq_type = SPI5_IRQn, \
}
#endif
/* SPI5_BUS_CONFIG */
#endif
/* BSP_USING_SPI5 */
...
...
bsp/stm32/libraries/HAL_Drivers/config/h7/spi_config.h
浏览文件 @
5b7dac8c
...
...
@@ -23,6 +23,7 @@ extern "C" {
{ \
.Instance = SPI1, \
.bus_name = "spi1", \
.irq_type = SPI1_IRQn, \
}
#endif
/* SPI1_BUS_CONFIG */
#endif
/* BSP_USING_SPI1 */
...
...
@@ -57,6 +58,7 @@ extern "C" {
{ \
.Instance = SPI2, \
.bus_name = "spi2", \
.irq_type = SPI2_IRQn, \
}
#endif
/* SPI2_BUS_CONFIG */
#endif
/* BSP_USING_SPI2 */
...
...
@@ -91,6 +93,7 @@ extern "C" {
{ \
.Instance = SPI3, \
.bus_name = "spi3", \
.irq_type = SPI3_IRQn, \
}
#endif
/* SPI3_BUS_CONFIG */
#endif
/* BSP_USING_SPI3 */
...
...
@@ -125,6 +128,7 @@ extern "C" {
{ \
.Instance = SPI4, \
.bus_name = "spi4", \
.irq_type = SPI4_IRQn, \
}
#endif
/* SPI4_BUS_CONFIG */
#endif
/* BSP_USING_SPI4 */
...
...
@@ -159,6 +163,7 @@ extern "C" {
{ \
.Instance = SPI5, \
.bus_name = "spi5", \
.irq_type = SPI5_IRQn, \
}
#endif
/* SPI5_BUS_CONFIG */
#endif
/* BSP_USING_SPI5 */
...
...
bsp/stm32/libraries/HAL_Drivers/config/l1/spi_config.h
浏览文件 @
5b7dac8c
...
...
@@ -24,6 +24,7 @@ extern "C" {
{ \
.Instance = SPI1, \
.bus_name = "spi1", \
.irq_type = SPI1_IRQn, \
}
#endif
/* SPI1_BUS_CONFIG */
#endif
/* BSP_USING_SPI1 */
...
...
@@ -56,6 +57,7 @@ extern "C" {
{ \
.Instance = SPI2, \
.bus_name = "spi2", \
.irq_type = SPI2_IRQn, \
}
#endif
/* SPI2_BUS_CONFIG */
#endif
/* BSP_USING_SPI2 */
...
...
@@ -88,6 +90,7 @@ extern "C" {
{ \
.Instance = SPI3, \
.bus_name = "spi3", \
.irq_type = SPI3_IRQn, \
}
#endif
/* SPI3_BUS_CONFIG */
#endif
/* BSP_USING_SPI3 */
...
...
bsp/stm32/libraries/HAL_Drivers/config/l4/spi_config.h
浏览文件 @
5b7dac8c
...
...
@@ -23,6 +23,7 @@ extern "C" {
{ \
.Instance = SPI1, \
.bus_name = "spi1", \
.irq_type = SPI1_IRQn, \
}
#endif
/* SPI1_BUS_CONFIG */
#endif
/* BSP_USING_SPI1 */
...
...
@@ -57,6 +58,7 @@ extern "C" {
{ \
.Instance = SPI2, \
.bus_name = "spi2", \
.irq_type = SPI2_IRQn, \
}
#endif
/* SPI2_BUS_CONFIG */
#endif
/* BSP_USING_SPI2 */
...
...
@@ -91,6 +93,7 @@ extern "C" {
{ \
.Instance = SPI3, \
.bus_name = "spi3", \
.irq_type = SPI3_IRQn, \
}
#endif
/* SPI3_BUS_CONFIG */
#endif
/* BSP_USING_SPI3 */
...
...
bsp/stm32/libraries/HAL_Drivers/config/mp1/spi_config.h
浏览文件 @
5b7dac8c
...
...
@@ -23,6 +23,7 @@ extern "C" {
{ \
.Instance = SPI1, \
.bus_name = "spi1", \
.irq_type = SPI1_IRQn, \
}
#endif
/* SPI1_BUS_CONFIG */
#endif
/* BSP_USING_SPI1 */
...
...
@@ -57,6 +58,7 @@ extern "C" {
{ \
.Instance = SPI2, \
.bus_name = "spi2", \
.irq_type = SPI2_IRQn, \
}
#endif
/* SPI2_BUS_CONFIG */
#endif
/* BSP_USING_SPI2 */
...
...
@@ -91,6 +93,7 @@ extern "C" {
{ \
.Instance = SPI3, \
.bus_name = "spi3", \
.irq_type = SPI3_IRQn, \
}
#endif
/* SPI3_BUS_CONFIG */
#endif
/* BSP_USING_SPI3 */
...
...
@@ -125,6 +128,7 @@ extern "C" {
{ \
.Instance = SPI4, \
.bus_name = "spi4", \
.irq_type = SPI4_IRQn, \
}
#endif
/* SPI4_BUS_CONFIG */
#endif
/* BSP_USING_SPI4 */
...
...
@@ -159,6 +163,7 @@ extern "C" {
{ \
.Instance = SPI5, \
.bus_name = "spi5", \
.irq_type = SPI5_IRQn, \
}
#endif
/* SPI5_BUS_CONFIG */
#endif
/* BSP_USING_SPI5 */
...
...
bsp/stm32/libraries/HAL_Drivers/config/wb/spi_config.h
浏览文件 @
5b7dac8c
...
...
@@ -23,6 +23,7 @@ extern "C" {
{ \
.Instance = SPI1, \
.bus_name = "spi1", \
.irq_type = SPI1_IRQn, \
}
#endif
/* SPI1_BUS_CONFIG */
#endif
/* BSP_USING_SPI1 */
...
...
@@ -57,6 +58,7 @@ extern "C" {
{ \
.Instance = SPI2, \
.bus_name = "spi2", \
.irq_type = SPI2_IRQn, \
}
#endif
/* SPI2_BUS_CONFIG */
#endif
/* BSP_USING_SPI2 */
...
...
@@ -91,6 +93,7 @@ extern "C" {
{ \
.Instance = SPI3, \
.bus_name = "spi3", \
.irq_type = SPI3_IRQn, \
}
#endif
/* SPI3_BUS_CONFIG */
#endif
/* BSP_USING_SPI3 */
...
...
bsp/stm32/libraries/HAL_Drivers/config/wl/spi_config.h
浏览文件 @
5b7dac8c
...
...
@@ -23,6 +23,7 @@ extern "C" {
{ \
.Instance = SPI1, \
.bus_name = "spi1", \
.irq_type = SPI1_IRQn, \
}
#endif
/* SPI1_BUS_CONFIG */
#endif
/* BSP_USING_SPI1 */
...
...
@@ -57,6 +58,7 @@ extern "C" {
{ \
.Instance = SPI2, \
.bus_name = "spi2", \
.irq_type = SPI2_IRQn, \
}
#endif
/* SPI2_BUS_CONFIG */
#endif
/* BSP_USING_SPI2 */
...
...
@@ -91,6 +93,7 @@ extern "C" {
{ \
.Instance = SPI3, \
.bus_name = "spi3", \
.irq_type = SPI3_IRQn, \
}
#endif
/* SPI3_BUS_CONFIG */
#endif
/* BSP_USING_SPI3 */
...
...
bsp/stm32/libraries/HAL_Drivers/drv_spi.c
浏览文件 @
5b7dac8c
...
...
@@ -263,6 +263,12 @@ static rt_err_t stm32_spi_init(struct stm32_spi *spi_drv, struct rt_spi_configur
HAL_NVIC_SetPriority
(
spi_drv
->
config
->
dma_tx
->
dma_irq
,
0
,
1
);
HAL_NVIC_EnableIRQ
(
spi_drv
->
config
->
dma_tx
->
dma_irq
);
}
if
(
spi_drv
->
spi_dma_flag
&
SPI_USING_TX_DMA_FLAG
||
spi_drv
->
spi_dma_flag
&
SPI_USING_RX_DMA_FLAG
)
{
HAL_NVIC_SetPriority
(
spi_drv
->
config
->
irq_type
,
2
,
0
);
HAL_NVIC_EnableIRQ
(
spi_drv
->
config
->
irq_type
);
}
LOG_D
(
"%s init done"
,
spi_drv
->
config
->
bus_name
);
return
RT_EOK
;
...
...
bsp/stm32/libraries/HAL_Drivers/drv_spi.h
浏览文件 @
5b7dac8c
...
...
@@ -37,6 +37,7 @@ struct stm32_spi_config
{
SPI_TypeDef
*
Instance
;
char
*
bus_name
;
IRQn_Type
irq_type
;
struct
dma_config
*
dma_rx
,
*
dma_tx
;
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录