22#ifndef __STM32F2xx_HAL_DEF
23#define __STM32F2xx_HAL_DEF
58#define UNUSED(X) (void)X
60#define HAL_MAX_DELAY 0xFFFFFFFFU
62#define HAL_IS_BIT_SET(REG, BIT) (((REG) & (BIT)) == (BIT))
63#define HAL_IS_BIT_CLR(REG, BIT) (((REG) & (BIT)) == 0U)
65#define __HAL_LINKDMA(__HANDLE__, __PPP_DMA_FIELD__, __DMA_HANDLE__) \
67 (__HANDLE__)->__PPP_DMA_FIELD__ = &(__DMA_HANDLE__); \
68 (__DMA_HANDLE__).Parent = (__HANDLE__); \
86#define __HAL_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = 0U)
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 (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
112 #define __weak __attribute__((weak))
115 #define __packed __attribute__((packed))
117#elif defined ( __GNUC__ ) && !defined (__CC_ARM)
119 #define __weak __attribute__((weak))
122 #define __packed __attribute__((__packed__))
128#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
129 #ifndef __ALIGN_BEGIN
130 #define __ALIGN_BEGIN
133 #define __ALIGN_END __attribute__ ((aligned (4)))
135#elif defined ( __GNUC__ ) && !defined (__CC_ARM)
137 #define __ALIGN_END __attribute__ ((aligned (4U)))
139 #ifndef __ALIGN_BEGIN
140 #define __ALIGN_BEGIN
146 #ifndef __ALIGN_BEGIN
147 #if defined (__CC_ARM)
148 #define __ALIGN_BEGIN __align(4U)
149 #elif defined (__ICCARM__)
150 #define __ALIGN_BEGIN
158#if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) || defined ( __GNUC__ )
162#define __NOINLINE __attribute__ ( (noinline) )
164#elif defined ( __ICCARM__ )
168#define __NOINLINE _Pragma("optimize = no_inline")
This file contains aliases definition for the STM32Cube HAL constants macros and functions maintained...
CMSIS STM32F2xx Device Peripheral Access Layer Header File.
HAL_StatusTypeDef
HAL Status structures definition
Definition stm32f2xx_hal_def.h:40
HAL_LockTypeDef
HAL Lock structures definition
Definition stm32f2xx_hal_def.h:51