40#ifndef __STM32F4xx_HAL_DEF
41#define __STM32F4xx_HAL_DEF
51 #include "stm32f4xx.h"
79#define HAL_MAX_DELAY 0xFFFFFFFF
81#define HAL_IS_BIT_SET(REG, BIT) (((REG) & (BIT)) != RESET)
82#define HAL_IS_BIT_CLR(REG, BIT) (((REG) & (BIT)) == RESET)
84#define __HAL_LINKDMA(__HANDLE__, __PPP_DMA_FIELD__, __DMA_HANDLE__) \
86 (__HANDLE__)->__PPP_DMA_FIELD__ = &(__DMA_HANDLE__); \
87 (__DMA_HANDLE__).Parent = (__HANDLE__); \
107#define __HAL_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = 0)
115 #error �USE_RTOS should be 0 in the current HAL release�
117 #define __HAL_LOCK(__HANDLE__) \
119 if((__HANDLE__)->Lock == HAL_LOCKED) \
125 (__HANDLE__)->Lock = HAL_LOCKED; \
129 #define __HAL_UNLOCK(__HANDLE__) \
131 (__HANDLE__)->Lock = HAL_UNLOCKED; \
135#if defined ( __GNUC__ )
137 #define __weak __attribute__((weak))
140 #define __packed __attribute__((__packed__))
146#if defined (__GNUC__)
148 #define __ALIGN_END __attribute__ ((aligned (4)))
150 #ifndef __ALIGN_BEGIN
151 #define __ALIGN_BEGIN
157 #ifndef __ALIGN_BEGIN
158 #if defined (__CC_ARM)
159 #define __ALIGN_BEGIN __align(4)
160 #elif defined (__ICCARM__)
161 #define __ALIGN_BEGIN
170#if defined ( __CC_ARM )
180#define __RAM_FUNC HAL_StatusTypeDef
182#elif defined ( __ICCARM__ )
187#define __RAM_FUNC __ramfunc HAL_StatusTypeDef
189#elif defined ( __GNUC__ )
195#define __RAM_FUNC HAL_StatusTypeDef __attribute__((section(".RamFunc")))
202#if defined ( __CC_ARM ) || defined ( __GNUC__ )
206#define __NOINLINE __attribute__ ( (noinline) )
208#elif defined ( __ICCARM__ )
212#define __NOINLINE _Pragma("optimize = no_inline")
HAL_LockTypeDef
HAL Lock structures definition