annotate Common/Drivers/STM32F4xx_HAL_DRIVER_v120/Inc/stm32f4xx_hal_def.h @ 114:79b19d56ab08 FlipDisplay

Eliminate warnings
author Ideenmodellierer
date Thu, 03 Jan 2019 18:35:11 +0100
parents 5f11787b4f42
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 * @file stm32f4xx_hal_def.h
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 * @author MCD Application Team
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 * @version V1.2.0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 * @date 26-December-2014
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 * @brief This file contains HAL common defines, enumeration, macros and
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 * structures definitions.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 * @attention
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 * Redistribution and use in source and binary forms, with or without modification,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 * are permitted provided that the following conditions are met:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 * 1. Redistributions of source code must retain the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 * this list of conditions and the following disclaimer.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 * 2. Redistributions in binary form must reproduce the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 * this list of conditions and the following disclaimer in the documentation
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 * and/or other materials provided with the distribution.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 * may be used to endorse or promote products derived from this software
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 * without specific prior written permission.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
35 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
36 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
37 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
39 /* Define to prevent recursive inclusion -------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 #ifndef __STM32F4xx_HAL_DEF
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41 #define __STM32F4xx_HAL_DEF
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44 extern "C" {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47 /* Includes ------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
48 #include "stm32f4xx.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49 #include "Legacy/stm32_hal_legacy.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51 /* Exported types ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54 * @brief HAL Status structures definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56 typedef enum
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58 HAL_OK = 0x00,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59 HAL_ERROR = 0x01,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60 HAL_BUSY = 0x02,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
61 HAL_TIMEOUT = 0x03
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
62 } HAL_StatusTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
63
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
64 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
65 * @brief HAL Lock structures definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
66 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
67 typedef enum
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
68 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
69 HAL_UNLOCKED = 0x00,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
70 HAL_LOCKED = 0x01
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71 } HAL_LockTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73 /* Exported macro ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74 #ifndef NULL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75 #define NULL 0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
76 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
78 #define HAL_MAX_DELAY 0xFFFFFFFF
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
79
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
80 #define HAL_IS_BIT_SET(REG, BIT) (((REG) & (BIT)) != RESET)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81 #define HAL_IS_BIT_CLR(REG, BIT) (((REG) & (BIT)) == RESET)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
82
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
83 #define __HAL_LINKDMA(__HANDLE__, __PPP_DMA_FIELD__, __DMA_HANDLE__) \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
84 do{ \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
85 (__HANDLE__)->__PPP_DMA_FIELD__ = &(__DMA_HANDLE__); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
86 (__DMA_HANDLE__).Parent = (__HANDLE__); \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
87 } while(0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
88
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
89 #define UNUSED(x) ((void)(x))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
90
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
91 /** @brief Reset the Handle's State field.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92 * @param __HANDLE__: specifies the Peripheral Handle.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
93 * @note This macro can be used for the following purpose:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
94 * - When the Handle is declared as local variable; before passing it as parameter
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
95 * to HAL_PPP_Init() for the first time, it is mandatory to use this macro
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
96 * to set to 0 the Handle's "State" field.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
97 * Otherwise, "State" field may have any random value and the first time the function
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
98 * HAL_PPP_Init() is called, the low level hardware initialization will be missed
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99 * (i.e. HAL_PPP_MspInit() will not be executed).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
100 * - When there is a need to reconfigure the low level hardware: instead of calling
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
101 * HAL_PPP_DeInit() then HAL_PPP_Init(), user can make a call to this macro then HAL_PPP_Init().
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
102 * In this later function, when the Handle's "State" field is set to 0, it will execute the function
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
103 * HAL_PPP_MspInit() which will reconfigure the low level hardware.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
104 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
105 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
106 #define __HAL_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = 0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
107
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
108 #if (USE_RTOS == 1)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
109 /* Reserved for future use */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
110 #error “USE_RTOS should be 0 in the current HAL release”
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
111 #else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
112 #define __HAL_LOCK(__HANDLE__) \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
113 do{ \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
114 if((__HANDLE__)->Lock == HAL_LOCKED) \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
115 { \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
116 return HAL_BUSY; \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117 } \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
118 else \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119 { \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120 (__HANDLE__)->Lock = HAL_LOCKED; \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121 } \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
122 }while (0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
123
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
124 #define __HAL_UNLOCK(__HANDLE__) \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
125 do{ \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
126 (__HANDLE__)->Lock = HAL_UNLOCKED; \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
127 }while (0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
128 #endif /* USE_RTOS */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
129
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130 #if defined ( __GNUC__ )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131 #ifndef __weak
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
132 #define __weak __attribute__((weak))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
133 #endif /* __weak */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
134 #ifndef __packed
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
135 #define __packed __attribute__((__packed__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
136 #endif /* __packed */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
137 #endif /* __GNUC__ */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
138
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
139
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
140 /* Macro to get variable aligned on 4-bytes, for __ICCARM__ the directive "#pragma data_alignment=4" must be used instead */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
141 #if defined (__GNUC__) /* GNU Compiler */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
142 #ifndef __ALIGN_END
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
143 #define __ALIGN_END __attribute__ ((aligned (4)))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
144 #endif /* __ALIGN_END */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
145 #ifndef __ALIGN_BEGIN
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
146 #define __ALIGN_BEGIN
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
147 #endif /* __ALIGN_BEGIN */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
148 #else
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
149 #ifndef __ALIGN_END
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
150 #define __ALIGN_END
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
151 #endif /* __ALIGN_END */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
152 #ifndef __ALIGN_BEGIN
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
153 #if defined (__CC_ARM) /* ARM Compiler */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
154 #define __ALIGN_BEGIN __align(4)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
155 #elif defined (__ICCARM__) /* IAR Compiler */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
156 #define __ALIGN_BEGIN
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
157 #endif /* __CC_ARM */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
158 #endif /* __ALIGN_BEGIN */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
159 #endif /* __GNUC__ */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
160
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
161
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
162 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
163 * @brief __RAM_FUNC definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
164 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
165 #if defined ( __CC_ARM )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
166 /* ARM Compiler
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
167 ------------
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
168 RAM functions are defined using the toolchain options.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
169 Functions that are executed in RAM should reside in a separate source module.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
170 Using the 'Options for File' dialog you can simply change the 'Code / Const'
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
171 area of a module to a memory space in physical RAM.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
172 Available memory areas are declared in the 'Target' tab of the 'Options for Target'
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
173 dialog.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
174 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
175 #define __RAM_FUNC HAL_StatusTypeDef
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
176
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
177 #elif defined ( __ICCARM__ )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
178 /* ICCARM Compiler
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
179 ---------------
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
180 RAM functions are defined using a specific toolchain keyword "__ramfunc".
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
181 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
182 #define __RAM_FUNC __ramfunc HAL_StatusTypeDef
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
183
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
184 #elif defined ( __GNUC__ )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
185 /* GNU Compiler
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
186 ------------
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
187 RAM functions are defined using a specific toolchain attribute
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
188 "__attribute__((section(".RamFunc")))".
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
189 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
190 #define __RAM_FUNC HAL_StatusTypeDef __attribute__((section(".RamFunc")))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
191
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
192 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
193
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
194 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
195 * @brief __NOINLINE definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
196 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
197 #if defined ( __CC_ARM ) || defined ( __GNUC__ )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
198 /* ARM & GNUCompiler
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
199 ----------------
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
200 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
201 #define __NOINLINE __attribute__ ( (noinline) )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
202
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
203 #elif defined ( __ICCARM__ )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
204 /* ICCARM Compiler
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
205 ---------------
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
206 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
207 #define __NOINLINE _Pragma("optimize = no_inline")
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
208
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
209 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
210
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
211 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
212 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
213 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
214
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
215 #endif /* ___STM32F4xx_HAL_DEF */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
216
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
217 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/