Closed RetoFx closed 1 month ago
Hi @RetoFx,
Thank you for this other suggestion. Both points you raised are legitimate. However, such naming is currently deployed on almost all HAL drivers and we cannot afford any refactoring action.
I will forward your request to our development teams so it is considered for future development. Please allow me to close this issue. Thank you for your comprehension.
With regards,
But please add a struct name to any struct in any build variant. struct names are requierd to match forward declaration of a struct in C.
You add more and more names for your struct like
if USE_HAL_CAN_REGISTER_CALLBACKS == 1
typedef struct __CAN_HandleTypeDef
else
typedef struct
endif / USE_HAL_CAN_REGISTER_CALLBACKS /
in stm32f2xx_hal_can.h
I prefer that you always add a name to any struct. This reduced the #if #else #endif and simplified the source. Some other tools like pclint can reference to this name in the output.
Please don't use any symbols starting with an underscore. They are reserved for the compiler and should not be used for libraries or application code.
You can use for example
typedef struct CAN_HandleStruct { } CAN_HandleTypeDef;