stm32f4xx_syscfg.h 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. /**
  2. ******************************************************************************
  3. * @file stm32f4xx_syscfg.h
  4. * @author MCD Application Team
  5. * @version V1.0.2
  6. * @date 05-March-2012
  7. * @brief This file contains all the functions prototypes for the SYSCFG firmware
  8. * library.
  9. ******************************************************************************
  10. * @attention
  11. *
  12. * <h2><center>&copy; COPYRIGHT 2012 STMicroelectronics</center></h2>
  13. *
  14. * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
  15. * You may not use this file except in compliance with the License.
  16. * You may obtain a copy of the License at:
  17. *
  18. * http://www.st.com/software_license_agreement_liberty_v2
  19. *
  20. * Unless required by applicable law or agreed to in writing, software
  21. * distributed under the License is distributed on an "AS IS" BASIS,
  22. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  23. * See the License for the specific language governing permissions and
  24. * limitations under the License.
  25. *
  26. ******************************************************************************
  27. */
  28. /* Define to prevent recursive inclusion -------------------------------------*/
  29. #ifndef __STM32F4xx_SYSCFG_H
  30. #define __STM32F4xx_SYSCFG_H
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. /* Includes ------------------------------------------------------------------*/
  35. #include "stm32f4xx.h"
  36. /** @addtogroup STM32F4xx_StdPeriph_Driver
  37. * @{
  38. */
  39. /** @addtogroup SYSCFG
  40. * @{
  41. */
  42. /* Exported types ------------------------------------------------------------*/
  43. /* Exported constants --------------------------------------------------------*/
  44. /** @defgroup SYSCFG_Exported_Constants
  45. * @{
  46. */
  47. /** @defgroup SYSCFG_EXTI_Port_Sources
  48. * @{
  49. */
  50. #define EXTI_PortSourceGPIOA ((uint8_t)0x00)
  51. #define EXTI_PortSourceGPIOB ((uint8_t)0x01)
  52. #define EXTI_PortSourceGPIOC ((uint8_t)0x02)
  53. #define EXTI_PortSourceGPIOD ((uint8_t)0x03)
  54. #define EXTI_PortSourceGPIOE ((uint8_t)0x04)
  55. #define EXTI_PortSourceGPIOF ((uint8_t)0x05)
  56. #define EXTI_PortSourceGPIOG ((uint8_t)0x06)
  57. #define EXTI_PortSourceGPIOH ((uint8_t)0x07)
  58. #define EXTI_PortSourceGPIOI ((uint8_t)0x08)
  59. #define IS_EXTI_PORT_SOURCE(PORTSOURCE) (((PORTSOURCE) == EXTI_PortSourceGPIOA) || \
  60. ((PORTSOURCE) == EXTI_PortSourceGPIOB) || \
  61. ((PORTSOURCE) == EXTI_PortSourceGPIOC) || \
  62. ((PORTSOURCE) == EXTI_PortSourceGPIOD) || \
  63. ((PORTSOURCE) == EXTI_PortSourceGPIOE) || \
  64. ((PORTSOURCE) == EXTI_PortSourceGPIOF) || \
  65. ((PORTSOURCE) == EXTI_PortSourceGPIOG) || \
  66. ((PORTSOURCE) == EXTI_PortSourceGPIOH) || \
  67. ((PORTSOURCE) == EXTI_PortSourceGPIOI))
  68. /**
  69. * @}
  70. */
  71. /** @defgroup SYSCFG_EXTI_Pin_Sources
  72. * @{
  73. */
  74. #define EXTI_PinSource0 ((uint8_t)0x00)
  75. #define EXTI_PinSource1 ((uint8_t)0x01)
  76. #define EXTI_PinSource2 ((uint8_t)0x02)
  77. #define EXTI_PinSource3 ((uint8_t)0x03)
  78. #define EXTI_PinSource4 ((uint8_t)0x04)
  79. #define EXTI_PinSource5 ((uint8_t)0x05)
  80. #define EXTI_PinSource6 ((uint8_t)0x06)
  81. #define EXTI_PinSource7 ((uint8_t)0x07)
  82. #define EXTI_PinSource8 ((uint8_t)0x08)
  83. #define EXTI_PinSource9 ((uint8_t)0x09)
  84. #define EXTI_PinSource10 ((uint8_t)0x0A)
  85. #define EXTI_PinSource11 ((uint8_t)0x0B)
  86. #define EXTI_PinSource12 ((uint8_t)0x0C)
  87. #define EXTI_PinSource13 ((uint8_t)0x0D)
  88. #define EXTI_PinSource14 ((uint8_t)0x0E)
  89. #define EXTI_PinSource15 ((uint8_t)0x0F)
  90. #define IS_EXTI_PIN_SOURCE(PINSOURCE) (((PINSOURCE) == EXTI_PinSource0) || \
  91. ((PINSOURCE) == EXTI_PinSource1) || \
  92. ((PINSOURCE) == EXTI_PinSource2) || \
  93. ((PINSOURCE) == EXTI_PinSource3) || \
  94. ((PINSOURCE) == EXTI_PinSource4) || \
  95. ((PINSOURCE) == EXTI_PinSource5) || \
  96. ((PINSOURCE) == EXTI_PinSource6) || \
  97. ((PINSOURCE) == EXTI_PinSource7) || \
  98. ((PINSOURCE) == EXTI_PinSource8) || \
  99. ((PINSOURCE) == EXTI_PinSource9) || \
  100. ((PINSOURCE) == EXTI_PinSource10) || \
  101. ((PINSOURCE) == EXTI_PinSource11) || \
  102. ((PINSOURCE) == EXTI_PinSource12) || \
  103. ((PINSOURCE) == EXTI_PinSource13) || \
  104. ((PINSOURCE) == EXTI_PinSource14) || \
  105. ((PINSOURCE) == EXTI_PinSource15))
  106. /**
  107. * @}
  108. */
  109. /** @defgroup SYSCFG_Memory_Remap_Config
  110. * @{
  111. */
  112. #define SYSCFG_MemoryRemap_Flash ((uint8_t)0x00)
  113. #define SYSCFG_MemoryRemap_SystemFlash ((uint8_t)0x01)
  114. #define SYSCFG_MemoryRemap_FSMC ((uint8_t)0x02)
  115. #define SYSCFG_MemoryRemap_SRAM ((uint8_t)0x03)
  116. #define IS_SYSCFG_MEMORY_REMAP_CONFING(REMAP) (((REMAP) == SYSCFG_MemoryRemap_Flash) || \
  117. ((REMAP) == SYSCFG_MemoryRemap_SystemFlash) || \
  118. ((REMAP) == SYSCFG_MemoryRemap_SRAM) || \
  119. ((REMAP) == SYSCFG_MemoryRemap_FSMC))
  120. /**
  121. * @}
  122. */
  123. /** @defgroup SYSCFG_ETHERNET_Media_Interface
  124. * @{
  125. */
  126. #define SYSCFG_ETH_MediaInterface_MII ((uint32_t)0x00000000)
  127. #define SYSCFG_ETH_MediaInterface_RMII ((uint32_t)0x00000001)
  128. #define IS_SYSCFG_ETH_MEDIA_INTERFACE(INTERFACE) (((INTERFACE) == SYSCFG_ETH_MediaInterface_MII) || \
  129. ((INTERFACE) == SYSCFG_ETH_MediaInterface_RMII))
  130. /**
  131. * @}
  132. */
  133. /**
  134. * @}
  135. */
  136. /* Exported macro ------------------------------------------------------------*/
  137. /* Exported functions --------------------------------------------------------*/
  138. void SYSCFG_DeInit(void);
  139. void SYSCFG_MemoryRemapConfig(uint8_t SYSCFG_MemoryRemap);
  140. void SYSCFG_EXTILineConfig(uint8_t EXTI_PortSourceGPIOx, uint8_t EXTI_PinSourcex);
  141. void SYSCFG_ETH_MediaInterfaceConfig(uint32_t SYSCFG_ETH_MediaInterface);
  142. void SYSCFG_CompensationCellCmd(FunctionalState NewState);
  143. FlagStatus SYSCFG_GetCompensationCellStatus(void);
  144. #ifdef __cplusplus
  145. }
  146. #endif
  147. #endif /*__STM32F4xx_SYSCFG_H */
  148. /**
  149. * @}
  150. */
  151. /**
  152. * @}
  153. */
  154. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/