RT-Thread / rt-thread

RT-Thread is an open source IoT Real-Time Operating System (RTOS).
https://www.rt-thread.io
Apache License 2.0
10.46k stars 5.01k forks source link

[stm32f10x-HAL] SPI 驱动编译 SPI_TypeDef is undefined #2709

Closed wuhanstudio closed 5 years ago

wuhanstudio commented 5 years ago

使用 stm32f10x-HAL 如果使用了硬件 SPI 就会编译出错,虽然只要在 drv_spi.h 包含一个头文件就可以了,添加的头文件可以直接查看定义就找到了。

TIM图片20190507152504

不知道这是不是官方 bsp 考虑到不同板子需要包含的头文件不同,所以特意没有包含头文件。

但是这样会导致添加硬件 SPI 就会编译出错,这样会不会不大好

SummerGift commented 5 years ago

stm32f10x-HAL 该 BSP 已经逐渐不再维护了,推荐使用 stm32 目录下的 BSP。

https://github.com/RT-Thread/rt-thread/tree/master/bsp/stm32

wuhanstudio commented 5 years ago

stm32f10x-HAL 该 BSP 已经逐渐不再维护了,推荐使用 stm32 目录下的 BSP。

https://github.com/RT-Thread/rt-thread/tree/master/bsp/stm32

原来如此,谢谢