22#ifndef STM32H7xx_HAL_DEF
23#define STM32H7xx_HAL_DEF
59#define HAL_MAX_DELAY 0xFFFFFFFFU
61#define HAL_IS_BIT_SET(REG, BIT) (((REG) & (BIT)) == (BIT))
62#define HAL_IS_BIT_CLR(REG, BIT) (((REG) & (BIT)) == 0U)
64#define __HAL_LINKDMA(__HANDLE__, __PPP_DMA_FIELD__, __DMA_HANDLE__) \
66 (__HANDLE__)->__PPP_DMA_FIELD__ = &(__DMA_HANDLE__); \
67 (__DMA_HANDLE__).Parent = (__HANDLE__); \
87#define __HAL_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = 0)
90 #error " USE_RTOS should be 0 in the current HAL release "
92 #define __HAL_LOCK(__HANDLE__) \
94 if((__HANDLE__)->Lock == HAL_LOCKED) \
100 (__HANDLE__)->Lock = HAL_LOCKED; \
104 #define __HAL_UNLOCK(__HANDLE__) \
106 (__HANDLE__)->Lock = HAL_UNLOCKED; \
110#if defined ( __GNUC__ )
112 #define __weak __attribute__((weak))
115 #define __packed __attribute__((__packed__))
121#if defined (__GNUC__)
123 #define __ALIGN_END __attribute__ ((aligned (4)))
125 #ifndef __ALIGN_BEGIN
126 #define __ALIGN_BEGIN
132 #ifndef __ALIGN_BEGIN
133 #if defined (__CC_ARM)
134 #define __ALIGN_BEGIN __align(4)
135 #elif defined (__ICCARM__)
136 #define __ALIGN_BEGIN
142#if defined (__GNUC__)
143 #define ALIGN_32BYTES(buf) buf __attribute__ ((aligned (32)))
144#elif defined (__ICCARM__)
145 #define ALIGN_32BYTES(buf) _Pragma("data_alignment=32") buf
146#elif defined (__CC_ARM)
147 #define ALIGN_32BYTES(buf) __align(32) buf
153#if defined ( __CC_ARM )
165#elif defined ( __ICCARM__ )
170#define __RAM_FUNC __ramfunc
172#elif defined ( __GNUC__ )
178#define __RAM_FUNC __attribute__((section(".RamFunc")))
HAL_LockTypeDef
HAL Lock structures definition.