AnsweredAssumed Answered

HAL_LockTypeDef type error

Question asked by greenwood.greg on May 28, 2016
Latest reply on May 30, 2016 by FTITI.Walid
I am compiling code for STM32F746G discovery and I am stuck on an error that makes no sense.  The error occurs in stm32f7xx_hal_dma2d.h when in line 190 is declared:
  HAL_LockTypeDef             Lock;
The compiler complains, unknown type name 'HAL_LockTypeDef' but the type is defined in #include "stm32f7xx_hal_def.h" on line 47 and in stm32f7xx_hal_def.h the typedef is:
typedef enum {
  HAL_UNLOCKED = 0x00,
  HAL_LOCKED   = 0x01  
} HAL_LockTypeDef;

This should be straight forward but I cannot see reason for the error.
All of the file mentioned are in the latest version of Repo for stm32f7.

I tried using the typedef just below the declaration and it works.
I tried moving the test declaration just after the include and it generates the error as if the include was not included.  The paths are all there and the include call does not fail for file not found.  Why within the scope of the ...dma2d.h file would the definition be lost after the include of the ..._hal_def.h file?

 

Outcomes