/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h(276): error: #20: identifier "HAL_StatusTypeDef" is undefined
刚开始用是stm32 hal库,这个工程是stm32cubeMax软件生成的,编译的时候确发生错误,
明明已经加了 #include "stm32f1xx_hal_def.h",
这个枚举变量也是有加入编译的,但是依然报错,后来发现是
这种工程不能够直接使用
#include "stm32f1xx_hal_dma.h"
#include "stm32f1xx_hal_spi.h"
#include "stm32f1xx_hal_gpio.h"
而是应该替换为 #include "stm32f1xx_hal.h"