1 /**
2   ******************************************************************************
3   * @file    stm32f4xx_flash_ramfunc.h
4   * @author  MCD Application Team
5   * @version V1.5.1
6   * @date    22-May-2015
7   * @brief   Header file of FLASH RAMFUNC driver.
8   ******************************************************************************
9   * @attention
10   *
11   * <h2><center>&copy; COPYRIGHT 2015 STMicroelectronics</center></h2>
12   *
13   * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14   * You may not use this file except in compliance with the License.
15   * You may obtain a copy of the License at:
16   *
17   *        http://www.st.com/software_license_agreement_liberty_v2
18   *
19   * Unless required by applicable law or agreed to in writing, software
20   * distributed under the License is distributed on an "AS IS" BASIS,
21   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22   * See the License for the specific language governing permissions and
23   * limitations under the License.
24   *
25   ******************************************************************************
26   */
27 
28 
29 /* Define to prevent recursive inclusion -------------------------------------*/
30 #ifndef __STM32F4xx_FLASH_RAMFUNC_H
31 #define __STM32F4xx_FLASH_RAMFUNC_H
32 
33 #ifdef __cplusplus
34  extern "C" {
35 #endif
36 
37 /* Includes ------------------------------------------------------------------*/
38 #include "stm32f4xx.h"
39 
40 /** @addtogroup STM32F4xx_StdPeriph_Driver
41   * @{
42   */
43 
44 /** @addtogroup FLASH RAMFUNC
45   * @{
46   */
47 
48 /* Exported types ------------------------------------------------------------*/
49 /* Private define ------------------------------------------------------------*/
50 /**
51   * @brief  __RAM_FUNC definition
52   */
53 #if defined ( __CC_ARM   )
54 /* ARM Compiler
55    ------------
56    RAM functions are defined using the toolchain options.
57    Functions that are executed in RAM should reside in a separate source module.
58    Using the 'Options for File' dialog you can simply change the 'Code / Const'
59    area of a module to a memory space in physical RAM.
60    Available memory areas are declared in the 'Target' tab of the 'Options for Target'
61    dialog.
62 */
63 #define __RAM_FUNC void
64 
65 #elif defined ( __ICCARM__ )
66 /* ICCARM Compiler
67    ---------------
68    RAM functions are defined using a specific toolchain keyword "__ramfunc".
69 */
70 #define __RAM_FUNC __ramfunc void
71 
72 #elif defined   (  __GNUC__  )
73 /* GNU Compiler
74    ------------
75   RAM functions are defined using a specific toolchain attribute
76    "__attribute__((section(".RamFunc")))".
77 */
78 #define __RAM_FUNC void  __attribute__((section(".RamFunc")))
79 
80 #endif
81 /* Exported constants --------------------------------------------------------*/
82 /* Exported macro ------------------------------------------------------------*/
83 /* Exported functions --------------------------------------------------------*/
84 __RAM_FUNC FLASH_FlashInterfaceCmd(FunctionalState NewState);
85 __RAM_FUNC FLASH_FlashSleepModeCmd(FunctionalState NewState);
86 
87 
88 #ifdef __cplusplus
89 }
90 #endif
91 
92 #endif /* __STM32F4xx_FLASH_RAMFUNC_H */
93 
94 /**
95   * @}
96   */
97 
98 /**
99   * @}
100   */
101 
102 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
103 
104