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__); \
70#define UNUSED(x) ((void)(x))
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; \
111#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
113 #define __weak __attribute__((weak))
116 #define __packed __attribute__((packed))
118#elif defined ( __GNUC__ ) && !defined (__CC_ARM)
120 #define __weak __attribute__((weak))
123 #define __packed __attribute__((__packed__))
129#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
130 #ifndef __ALIGN_BEGIN
131 #define __ALIGN_BEGIN
134 #define __ALIGN_END __attribute__ ((aligned (4)))
136#elif defined ( __GNUC__ ) && !defined (__CC_ARM)
138 #define __ALIGN_END __attribute__ ((aligned (4)))
140 #ifndef __ALIGN_BEGIN
141 #define __ALIGN_BEGIN
147 #ifndef __ALIGN_BEGIN
148 #if defined (__CC_ARM)
149 #define __ALIGN_BEGIN __align(4)
150 #elif defined (__ICCARM__)
151 #define __ALIGN_BEGIN
157#if defined (__GNUC__)
158 #define ALIGN_32BYTES(buf) buf __attribute__ ((aligned (32)))
159#elif defined (__ICCARM__)
160 #define ALIGN_32BYTES(buf) _Pragma("data_alignment=32") buf
161#elif defined (__CC_ARM)
162 #define ALIGN_32BYTES(buf) __align(32) buf
168#if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
180#elif defined ( __ICCARM__ )
185#define __RAM_FUNC __ramfunc
187#elif defined ( __GNUC__ )
193#define __RAM_FUNC __attribute__((section(".RamFunc")))
200#if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) || defined ( __GNUC__ )
204#define __NOINLINE __attribute__ ( (noinline) )
206#elif defined ( __ICCARM__ )
210#define __NOINLINE _Pragma("optimize = no_inline")
This file contains aliases definition for the STM32Cube HAL constants macros and functions maintained...
CMSIS STM32H7xx Device Peripheral Access Layer Header File.
HAL_StatusTypeDef
HAL Status structures definition.
Definition stm32h7xx_hal_def.h:41
HAL_LockTypeDef
HAL Lock structures definition.
Definition stm32h7xx_hal_def.h:52