stm32f4xx_flash_ramfunc.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /**
  2. ******************************************************************************
  3. * @file stm32f4xx_flash_ramfunc.h
  4. * @author MCD Application Team
  5. * @version V1.5.0
  6. * @date 06-March-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. /* Define to prevent recursive inclusion -------------------------------------*/
  28. #ifndef __STM32F4xx_FLASH_RAMFUNC_H
  29. #define __STM32F4xx_FLASH_RAMFUNC_H
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33. /* Includes ------------------------------------------------------------------*/
  34. #include "stm32f4xx.h"
  35. /** @addtogroup STM32F4xx_StdPeriph_Driver
  36. * @{
  37. */
  38. /** @addtogroup FLASH RAMFUNC
  39. * @{
  40. */
  41. /* Exported types ------------------------------------------------------------*/
  42. /* Private define ------------------------------------------------------------*/
  43. /**
  44. * @brief __RAM_FUNC definition
  45. */
  46. #if defined ( __CC_ARM )
  47. /* ARM Compiler
  48. ------------
  49. RAM functions are defined using the toolchain options.
  50. Functions that are executed in RAM should reside in a separate source module.
  51. Using the 'Options for File' dialog you can simply change the 'Code / Const'
  52. area of a module to a memory space in physical RAM.
  53. Available memory areas are declared in the 'Target' tab of the 'Options for Target'
  54. dialog.
  55. */
  56. #define __RAM_FUNC void
  57. #elif defined ( __ICCARM__ )
  58. /* ICCARM Compiler
  59. ---------------
  60. RAM functions are defined using a specific toolchain keyword "__ramfunc".
  61. */
  62. #define __RAM_FUNC __ramfunc void
  63. #elif defined ( __GNUC__ )
  64. /* GNU Compiler
  65. ------------
  66. RAM functions are defined using a specific toolchain attribute
  67. "__attribute__((section(".RamFunc")))".
  68. */
  69. #define __RAM_FUNC void __attribute__((section(".RamFunc")))
  70. #endif
  71. /* Exported constants --------------------------------------------------------*/
  72. /* Exported macro ------------------------------------------------------------*/
  73. /* Exported functions --------------------------------------------------------*/
  74. __RAM_FUNC FLASH_FlashInterfaceCmd(FunctionalState NewState);
  75. __RAM_FUNC FLASH_FlashSleepModeCmd(FunctionalState NewState);
  76. #ifdef __cplusplus
  77. }
  78. #endif
  79. #endif /* __STM32F4xx_FLASH_RAMFUNC_H */
  80. /**
  81. * @}
  82. */
  83. /**
  84. * @}
  85. */
  86. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/