Problem with finding HAL_StatusTypeDef
I’m trying to add some functionality to the project created by CubeMX.
After toggling LED on my Nucleo board and polling a button (with using examples from the FW examples package) I wanted to use EXTI for the button, but could not get the interrupt. After two day of fighting with no lack decided, that for my project I don’t need it yet and tried to use UART.
For the UART I also used examples from the package. And also decided to start from polling UART.
Uncommented
- define HAL_UART_MODULE_ENABLED
- define HAL_UART_MODULE_ENABLED
in the file stm32l1xx_hal_conf.h and copied initialization procedure from according example project.
it seems ok, but during compilation the compiler shows me errors in stm32l1xx_hal.h
And the errors are
unknown type name ‘HAL_StatusTypeDef’
What?!!!
It shows it for the definitions of the functions:
HAL_StatusTypeDef HAL_Init(void);
HAL_StatusTypeDef HAL_DeInit(void);
HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority);
HAL_StatusTypeDef defined in stm32l1xx_hal_def.h
Even though this is a bad practice, I tried to include this file into stm32l1xx_hal.h Obviously, it did not help. Seems like I missed something because of my small experience with ARM programming with using HAL. Probably something very simple, but I can’t figure out
Please, help.