stm32f4xx_syscfg.h 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. /**
  2. ******************************************************************************
  3. * @file stm32f4xx_syscfg.h
  4. * @author MCD Application Team
  5. * @version V1.0.0
  6. * @date 30-September-2011
  7. * @brief This file contains all the functions prototypes for the SYSCFG firmware
  8. * library.
  9. ******************************************************************************
  10. * @attention
  11. *
  12. * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  13. * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  14. * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
  15. * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  16. * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  17. * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  18. *
  19. * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
  20. ******************************************************************************
  21. */
  22. /* Define to prevent recursive inclusion -------------------------------------*/
  23. #ifndef __STM32F4xx_SYSCFG_H
  24. #define __STM32F4xx_SYSCFG_H
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. /* Includes ------------------------------------------------------------------*/
  29. #include "stm32f4xx.h"
  30. /** @addtogroup STM32F4xx_StdPeriph_Driver
  31. * @{
  32. */
  33. /** @addtogroup SYSCFG
  34. * @{
  35. */
  36. /* Exported types ------------------------------------------------------------*/
  37. /* Exported constants --------------------------------------------------------*/
  38. /** @defgroup SYSCFG_Exported_Constants
  39. * @{
  40. */
  41. /** @defgroup SYSCFG_EXTI_Port_Sources
  42. * @{
  43. */
  44. #define EXTI_PortSourceGPIOA ((uint8_t)0x00)
  45. #define EXTI_PortSourceGPIOB ((uint8_t)0x01)
  46. #define EXTI_PortSourceGPIOC ((uint8_t)0x02)
  47. #define EXTI_PortSourceGPIOD ((uint8_t)0x03)
  48. #define EXTI_PortSourceGPIOE ((uint8_t)0x04)
  49. #define EXTI_PortSourceGPIOF ((uint8_t)0x05)
  50. #define EXTI_PortSourceGPIOG ((uint8_t)0x06)
  51. #define EXTI_PortSourceGPIOH ((uint8_t)0x07)
  52. #define EXTI_PortSourceGPIOI ((uint8_t)0x08)
  53. #define IS_EXTI_PORT_SOURCE(PORTSOURCE) (((PORTSOURCE) == EXTI_PortSourceGPIOA) || \
  54. ((PORTSOURCE) == EXTI_PortSourceGPIOB) || \
  55. ((PORTSOURCE) == EXTI_PortSourceGPIOC) || \
  56. ((PORTSOURCE) == EXTI_PortSourceGPIOD) || \
  57. ((PORTSOURCE) == EXTI_PortSourceGPIOE) || \
  58. ((PORTSOURCE) == EXTI_PortSourceGPIOF) || \
  59. ((PORTSOURCE) == EXTI_PortSourceGPIOG) || \
  60. ((PORTSOURCE) == EXTI_PortSourceGPIOH) || \
  61. ((PORTSOURCE) == EXTI_PortSourceGPIOI))
  62. /**
  63. * @}
  64. */
  65. /** @defgroup SYSCFG_EXTI_Pin_Sources
  66. * @{
  67. */
  68. #define EXTI_PinSource0 ((uint8_t)0x00)
  69. #define EXTI_PinSource1 ((uint8_t)0x01)
  70. #define EXTI_PinSource2 ((uint8_t)0x02)
  71. #define EXTI_PinSource3 ((uint8_t)0x03)
  72. #define EXTI_PinSource4 ((uint8_t)0x04)
  73. #define EXTI_PinSource5 ((uint8_t)0x05)
  74. #define EXTI_PinSource6 ((uint8_t)0x06)
  75. #define EXTI_PinSource7 ((uint8_t)0x07)
  76. #define EXTI_PinSource8 ((uint8_t)0x08)
  77. #define EXTI_PinSource9 ((uint8_t)0x09)
  78. #define EXTI_PinSource10 ((uint8_t)0x0A)
  79. #define EXTI_PinSource11 ((uint8_t)0x0B)
  80. #define EXTI_PinSource12 ((uint8_t)0x0C)
  81. #define EXTI_PinSource13 ((uint8_t)0x0D)
  82. #define EXTI_PinSource14 ((uint8_t)0x0E)
  83. #define EXTI_PinSource15 ((uint8_t)0x0F)
  84. #define IS_EXTI_PIN_SOURCE(PINSOURCE) (((PINSOURCE) == EXTI_PinSource0) || \
  85. ((PINSOURCE) == EXTI_PinSource1) || \
  86. ((PINSOURCE) == EXTI_PinSource2) || \
  87. ((PINSOURCE) == EXTI_PinSource3) || \
  88. ((PINSOURCE) == EXTI_PinSource4) || \
  89. ((PINSOURCE) == EXTI_PinSource5) || \
  90. ((PINSOURCE) == EXTI_PinSource6) || \
  91. ((PINSOURCE) == EXTI_PinSource7) || \
  92. ((PINSOURCE) == EXTI_PinSource8) || \
  93. ((PINSOURCE) == EXTI_PinSource9) || \
  94. ((PINSOURCE) == EXTI_PinSource10) || \
  95. ((PINSOURCE) == EXTI_PinSource11) || \
  96. ((PINSOURCE) == EXTI_PinSource12) || \
  97. ((PINSOURCE) == EXTI_PinSource13) || \
  98. ((PINSOURCE) == EXTI_PinSource14) || \
  99. ((PINSOURCE) == EXTI_PinSource15))
  100. /**
  101. * @}
  102. */
  103. /** @defgroup SYSCFG_Memory_Remap_Config
  104. * @{
  105. */
  106. #define SYSCFG_MemoryRemap_Flash ((uint8_t)0x00)
  107. #define SYSCFG_MemoryRemap_SystemFlash ((uint8_t)0x01)
  108. #define SYSCFG_MemoryRemap_FSMC ((uint8_t)0x02)
  109. #define SYSCFG_MemoryRemap_SRAM ((uint8_t)0x03)
  110. #define IS_SYSCFG_MEMORY_REMAP_CONFING(REMAP) (((REMAP) == SYSCFG_MemoryRemap_Flash) || \
  111. ((REMAP) == SYSCFG_MemoryRemap_SystemFlash) || \
  112. ((REMAP) == SYSCFG_MemoryRemap_SRAM) || \
  113. ((REMAP) == SYSCFG_MemoryRemap_FSMC))
  114. /**
  115. * @}
  116. */
  117. /** @defgroup SYSCFG_ETHERNET_Media_Interface
  118. * @{
  119. */
  120. #define SYSCFG_ETH_MediaInterface_MII ((uint32_t)0x00000000)
  121. #define SYSCFG_ETH_MediaInterface_RMII ((uint32_t)0x00000001)
  122. #define IS_SYSCFG_ETH_MEDIA_INTERFACE(INTERFACE) (((INTERFACE) == SYSCFG_ETH_MediaInterface_MII) || \
  123. ((INTERFACE) == SYSCFG_ETH_MediaInterface_RMII))
  124. /**
  125. * @}
  126. */
  127. /**
  128. * @}
  129. */
  130. /* Exported macro ------------------------------------------------------------*/
  131. /* Exported functions --------------------------------------------------------*/
  132. void SYSCFG_DeInit(void);
  133. void SYSCFG_MemoryRemapConfig(uint8_t SYSCFG_MemoryRemap);
  134. void SYSCFG_EXTILineConfig(uint8_t EXTI_PortSourceGPIOx, uint8_t EXTI_PinSourcex);
  135. void SYSCFG_ETH_MediaInterfaceConfig(uint32_t SYSCFG_ETH_MediaInterface);
  136. void SYSCFG_CompensationCellCmd(FunctionalState NewState);
  137. FlagStatus SYSCFG_GetCompensationCellStatus(void);
  138. #ifdef __cplusplus
  139. }
  140. #endif
  141. #endif /*__STM32F4xx_SYSCFG_H */
  142. /**
  143. * @}
  144. */
  145. /**
  146. * @}
  147. */
  148. /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/