apm32f4xx_syscfg.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /*!
  2. * @file apm32f4xx_syscfg.h
  3. *
  4. * @brief This file contains all the functions prototypes for the SYSCFG firmware library
  5. *
  6. * @version V1.0.2
  7. *
  8. * @date 2022-06-23
  9. *
  10. * @attention
  11. *
  12. * Copyright (C) 2021-2022 Geehy Semiconductor
  13. *
  14. * You may not use this file except in compliance with the
  15. * GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE).
  16. *
  17. * The program is only for reference, which is distributed in the hope
  18. * that it will be usefull and instructional for customers to develop
  19. * their software. Unless required by applicable law or agreed to in
  20. * writing, the program is distributed on an "AS IS" BASIS, WITHOUT
  21. * ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
  22. * See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions
  23. * and limitations under the License.
  24. */
  25. /* Define to prevent recursive inclusion */
  26. #ifndef __APM32F4XX_SYSCFG_H
  27. #define __APM32F4XX_SYSCFG_H
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. /* Includes */
  32. #include "apm32f4xx.h"
  33. /** @addtogroup APM32F4xx_StdPeriphDriver
  34. @{
  35. */
  36. /** @addtogroup SYSCFG_Driver
  37. @{
  38. */
  39. /** @defgroup SYSCFG_Enumerations
  40. @{
  41. */
  42. /**
  43. * @brief SYSCFG EINT Port Sources
  44. */
  45. typedef enum
  46. {
  47. SYSCFG_PORT_GPIOA, /*!< EXTI_Port Source GPIOA */
  48. SYSCFG_PORT_GPIOB, /*!< EXTI_Port Source GPIOB */
  49. SYSCFG_PORT_GPIOC, /*!< EXTI_Port Source GPIOC */
  50. SYSCFG_PORT_GPIOD, /*!< EXTI_Port Source GPIOD */
  51. SYSCFG_PORT_GPIOE, /*!< EXTI_Port Source GPIOE */
  52. SYSCFG_PORT_GPIOF, /*!< EXTI_Port Source GPIOF */
  53. SYSCFG_PORT_GPIOG, /*!< EXTI_Port Source GPIOG */
  54. SYSCFG_PORT_GPIOH, /*!< EXTI_Port Source GPIOH */
  55. SYSCFG_PORT_GPIOI /*!< EXTI_Port Source GPIOI */
  56. } SYSCFG_PORT_T;
  57. /**
  58. * @brief SYSCFG EINT Pin Sources
  59. */
  60. typedef enum
  61. {
  62. SYSCFG_PIN_0, /*!< Pin Source 0 */
  63. SYSCFG_PIN_1, /*!< Pin Source 1 */
  64. SYSCFG_PIN_2, /*!< Pin Source 2 */
  65. SYSCFG_PIN_3, /*!< Pin Source 3 */
  66. SYSCFG_PIN_4, /*!< Pin Source 4 */
  67. SYSCFG_PIN_5, /*!< Pin Source 5 */
  68. SYSCFG_PIN_6, /*!< Pin Source 6 */
  69. SYSCFG_PIN_7, /*!< Pin Source 7 */
  70. SYSCFG_PIN_8, /*!< Pin Source 8 */
  71. SYSCFG_PIN_9, /*!< Pin Source 9 */
  72. SYSCFG_PIN_10, /*!< Pin Source 10 */
  73. SYSCFG_PIN_11, /*!< Pin Source 11 */
  74. SYSCFG_PIN_12, /*!< Pin Source 12 */
  75. SYSCFG_PIN_13, /*!< Pin Source 13 */
  76. SYSCFG_PIN_14, /*!< Pin Source 14 */
  77. SYSCFG_PIN_15 /*!< Pin Source 15 */
  78. } SYSCFG_PIN_T;
  79. /**
  80. * @brief SYSCFG Memory Remap Config
  81. */
  82. typedef enum
  83. {
  84. SYSCFG_REMAP_FLASH, /*!< Memory mapping to Flash */
  85. SYSCFG_REMAP_SYSTEM_FLASH, /*!< Memory mapping to SystemFlash */
  86. SYSCFG_REMAP_SMC_BANK1, /*!< Memory mapping to bank1 of SMC (NOR-flash/PSRAM) */
  87. SYSCFG_REMAP_SRAM /*!< Memory mapping to SRAM */
  88. } SYSCFG_REMAP_T;
  89. /**
  90. * @brief SYSCFG Ethernet PHY interface selection
  91. */
  92. typedef enum
  93. {
  94. SYSCFG_INTERFACE_MII, /*!< SYSCFG Media Interface MII */
  95. SYSCFG_INTERFACE_RMII /*!< SYSCFG Media Interface RMII */
  96. } SYSCFG_INTERFACE_T;
  97. /**@} end of group SYSCFG_Enumerations*/
  98. /** @defgroup SYSCFG_Functions
  99. @{
  100. */
  101. void SYSCFG_Reset(void);
  102. void SYSCFG_ConfigMemoryRemap(SYSCFG_REMAP_T memory);
  103. void SYSCFG_ConfigEINTLine(SYSCFG_PORT_T port, SYSCFG_PIN_T pin);
  104. void SYSCFG_ConfigMediaInterface(SYSCFG_INTERFACE_T media);
  105. /* Compensation Cell */
  106. void SYSCFG_EnableCompensationCell(void);
  107. void SYSCFG_DisableCompensationCell(void);
  108. uint8_t SYSCFG_ReadCompensationCellStatus(void);
  109. #ifdef __cplusplus
  110. }
  111. #endif
  112. #endif /*__APM32F4XX_SYSCFG_H */
  113. /**@} end of group SYSCFG_Enumerations */
  114. /**@} end of group SYSCFG_Driver */
  115. /**@} end of group APM32F4xx_StdPeriphDriver */