Including specific headers for peripherals result in multiple error STM32
When included only a part of the HAL for a specific peripheral , #include “stm32f4xx_hal_rtc.h”
“error: unknown type name ‘HAL_StatusTypeDef’; did you mean ‘HAL_CF_StatusTypeDef’?”
and an infinite or other similar errors appear.
However, the type HAL_StatusTypeDef is defined in “stm32f4xx_hal_def.h” and stm32f4xx_hal_rtc.h includes the previous header.
Any clue of why this happens?
The solution, based on this post is to include “stm32f4xx_hal.h”
However, I would like to know a little bit about it.