21#ifndef __STM32F4xx_HAL_DEF
22#define __STM32F4xx_HAL_DEF
57#define UNUSED(X) (void)X
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__); \
85#define __HAL_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = 0U)
89 #error "USE_RTOS should be 0 in the current HAL release"
91 #define __HAL_LOCK(__HANDLE__) \
93 if((__HANDLE__)->Lock == HAL_LOCKED) \
99 (__HANDLE__)->Lock = HAL_LOCKED; \
103 #define __HAL_UNLOCK(__HANDLE__) \
105 (__HANDLE__)->Lock = HAL_UNLOCKED; \
109#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
111 #define __weak __attribute__((weak))
114 #define __packed __attribute__((packed))
116#elif defined ( __GNUC__ ) && !defined (__CC_ARM)
118 #define __weak __attribute__((weak))
121 #define __packed __attribute__((__packed__))
127#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
128 #ifndef __ALIGN_BEGIN
129 #define __ALIGN_BEGIN
132 #define __ALIGN_END __attribute__ ((aligned (4)))
134#elif defined ( __GNUC__ ) && !defined (__CC_ARM)
136#define __ALIGN_END __attribute__ ((aligned (4)))
138 #ifndef __ALIGN_BEGIN
139 #define __ALIGN_BEGIN
145 #ifndef __ALIGN_BEGIN
146 #if defined (__CC_ARM)
147#define __ALIGN_BEGIN __align(4)
148 #elif defined (__ICCARM__)
149 #define __ALIGN_BEGIN
158#if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
170#elif defined ( __ICCARM__ )
175#define __RAM_FUNC __ramfunc
177#elif defined ( __GNUC__ )
183#define __RAM_FUNC __attribute__((section(".RamFunc")))
190#if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) || defined ( __GNUC__ )
194#define __NOINLINE __attribute__ ( (noinline) )
196#elif defined ( __ICCARM__ )
200#define __NOINLINE _Pragma("optimize = no_inline")
This file contains aliases definition for the STM32Cube HAL constants macros and functions maintained...
CMSIS STM32F4xx Device Peripheral Access Layer Header File.
HAL_StatusTypeDef
HAL Status structures definition
Definition stm32f4xx_hal_def.h:39
HAL_LockTypeDef
HAL Lock structures definition
Definition stm32f4xx_hal_def.h:50