main.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * @file : main.h
  5. * @brief : Header for main.c file.
  6. * This file contains the common defines of the application.
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
  11. * All rights reserved.</center></h2>
  12. *
  13. * This software component is licensed by ST under BSD 3-Clause license,
  14. * the "License"; You may not use this file except in compliance with the
  15. * License. You may obtain a copy of the License at:
  16. * opensource.org/licenses/BSD-3-Clause
  17. *
  18. ******************************************************************************
  19. */
  20. /* USER CODE END Header */
  21. /* Define to prevent recursive inclusion -------------------------------------*/
  22. #ifndef __MAIN_H
  23. #define __MAIN_H
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. /* Includes ------------------------------------------------------------------*/
  28. #include "stm32f1xx_hal.h"
  29. /* Private includes ----------------------------------------------------------*/
  30. /* USER CODE BEGIN Includes */
  31. /* USER CODE END Includes */
  32. /* Exported types ------------------------------------------------------------*/
  33. /* USER CODE BEGIN ET */
  34. /* USER CODE END ET */
  35. /* Exported constants --------------------------------------------------------*/
  36. /* USER CODE BEGIN EC */
  37. /* USER CODE END EC */
  38. /* Exported macro ------------------------------------------------------------*/
  39. /* USER CODE BEGIN EM */
  40. /* USER CODE END EM */
  41. /* Exported functions prototypes ---------------------------------------------*/
  42. void Error_Handler(void);
  43. /* USER CODE BEGIN EFP */
  44. /* USER CODE END EFP */
  45. /* Private defines -----------------------------------------------------------*/
  46. #define FAIL_MBIC_Pin GPIO_PIN_4
  47. #define FAIL_MBIC_GPIO_Port GPIOE
  48. #define BOOT_LED_Pin GPIO_PIN_15
  49. #define BOOT_LED_GPIO_Port GPIOC
  50. #define DET_UL4_OUT_Pin GPIO_PIN_6
  51. #define DET_UL4_OUT_GPIO_Port GPIOF
  52. #define DET_DL1_IN_Pin GPIO_PIN_7
  53. #define DET_DL1_IN_GPIO_Port GPIOF
  54. #define DET_DL2_IN_Pin GPIO_PIN_8
  55. #define DET_DL2_IN_GPIO_Port GPIOF
  56. #define DET_DL3_IN_Pin GPIO_PIN_9
  57. #define DET_DL3_IN_GPIO_Port GPIOF
  58. #define DET_DL4_IN_Pin GPIO_PIN_10
  59. #define DET_DL4_IN_GPIO_Port GPIOF
  60. #define RFU_TX_Pin GPIO_PIN_2
  61. #define RFU_TX_GPIO_Port GPIOA
  62. #define RFU_RX_Pin GPIO_PIN_3
  63. #define RFU_RX_GPIO_Port GPIOA
  64. #define DET_UL1_OUT_Pin GPIO_PIN_4
  65. #define DET_UL1_OUT_GPIO_Port GPIOA
  66. #define DET_UL2_OUT_Pin GPIO_PIN_5
  67. #define DET_UL2_OUT_GPIO_Port GPIOA
  68. #define DET_UL3_OUT_Pin GPIO_PIN_6
  69. #define DET_UL3_OUT_GPIO_Port GPIOA
  70. #define ATT_CLOCK3_Pin GPIO_PIN_0
  71. #define ATT_CLOCK3_GPIO_Port GPIOG
  72. #define ATT_DATA3_Pin GPIO_PIN_1
  73. #define ATT_DATA3_GPIO_Port GPIOG
  74. #define ATT_CLOCK4_Pin GPIO_PIN_10
  75. #define ATT_CLOCK4_GPIO_Port GPIOE
  76. #define ATT_DATA4_Pin GPIO_PIN_11
  77. #define ATT_DATA4_GPIO_Port GPIOE
  78. #define ATT_EN_DL4_Pin GPIO_PIN_12
  79. #define ATT_EN_DL4_GPIO_Port GPIOE
  80. #define ATT_EN_UL4_Pin GPIO_PIN_13
  81. #define ATT_EN_UL4_GPIO_Port GPIOE
  82. #define PATH_EN_DL4_Pin GPIO_PIN_14
  83. #define PATH_EN_DL4_GPIO_Port GPIOE
  84. #define PATH_EN_UL4_Pin GPIO_PIN_15
  85. #define PATH_EN_UL4_GPIO_Port GPIOE
  86. #define EEPROM_SCL_Pin GPIO_PIN_10
  87. #define EEPROM_SCL_GPIO_Port GPIOB
  88. #define EEPROM_SDA_Pin GPIO_PIN_11
  89. #define EEPROM_SDA_GPIO_Port GPIOB
  90. #define ATT_EN_UL1_Pin GPIO_PIN_14
  91. #define ATT_EN_UL1_GPIO_Port GPIOB
  92. #define PATH_EN_DL1_Pin GPIO_PIN_15
  93. #define PATH_EN_DL1_GPIO_Port GPIOB
  94. #define PATH_EN_DL2_Pin GPIO_PIN_10
  95. #define PATH_EN_DL2_GPIO_Port GPIOD
  96. #define PATH_EN_UL2_Pin GPIO_PIN_11
  97. #define PATH_EN_UL2_GPIO_Port GPIOD
  98. #define LED_ACT_Pin GPIO_PIN_14
  99. #define LED_ACT_GPIO_Port GPIOD
  100. #define ATT_EN_DL3_Pin GPIO_PIN_2
  101. #define ATT_EN_DL3_GPIO_Port GPIOG
  102. #define ATT_EN_UL3_Pin GPIO_PIN_3
  103. #define ATT_EN_UL3_GPIO_Port GPIOG
  104. #define PATH_EN_DL3_Pin GPIO_PIN_4
  105. #define PATH_EN_DL3_GPIO_Port GPIOG
  106. #define PATH_EN_UL3_Pin GPIO_PIN_5
  107. #define PATH_EN_UL3_GPIO_Port GPIOG
  108. #define _PATH_SW1_Pin GPIO_PIN_8
  109. #define _PATH_SW1_GPIO_Port GPIOG
  110. #define PATH_EN_UL1_Pin GPIO_PIN_6
  111. #define PATH_EN_UL1_GPIO_Port GPIOC
  112. #define MBIC_UP_Pin GPIO_PIN_9
  113. #define MBIC_UP_GPIO_Port GPIOA
  114. #define MBIC_DOWN_Pin GPIO_PIN_10
  115. #define MBIC_DOWN_GPIO_Port GPIOA
  116. #define ATT_CLOCK2_Pin GPIO_PIN_2
  117. #define ATT_CLOCK2_GPIO_Port GPIOD
  118. #define ATT_DATA2_Pin GPIO_PIN_3
  119. #define ATT_DATA2_GPIO_Port GPIOD
  120. #define ATT_EN_DL2_Pin GPIO_PIN_4
  121. #define ATT_EN_DL2_GPIO_Port GPIOD
  122. #define ATT_EN_UL2_Pin GPIO_PIN_7
  123. #define ATT_EN_UL2_GPIO_Port GPIOD
  124. #define PATH_SW1_Pin GPIO_PIN_9
  125. #define PATH_SW1_GPIO_Port GPIOG
  126. #define _PATH_SW2_Pin GPIO_PIN_10
  127. #define _PATH_SW2_GPIO_Port GPIOG
  128. #define PATH_SW2_Pin GPIO_PIN_11
  129. #define PATH_SW2_GPIO_Port GPIOG
  130. #define _PATH_SW3_Pin GPIO_PIN_12
  131. #define _PATH_SW3_GPIO_Port GPIOG
  132. #define PATH_SW3_Pin GPIO_PIN_13
  133. #define PATH_SW3_GPIO_Port GPIOG
  134. #define _PATH_SW4_Pin GPIO_PIN_14
  135. #define _PATH_SW4_GPIO_Port GPIOG
  136. #define PATH_SW4_Pin GPIO_PIN_15
  137. #define PATH_SW4_GPIO_Port GPIOG
  138. #define ATT_CLOCK1_Pin GPIO_PIN_6
  139. #define ATT_CLOCK1_GPIO_Port GPIOB
  140. #define ATT_DATA1_Pin GPIO_PIN_7
  141. #define ATT_DATA1_GPIO_Port GPIOB
  142. #define ATT_EN_DL1_Pin GPIO_PIN_9
  143. #define ATT_EN_DL1_GPIO_Port GPIOB
  144. /* USER CODE BEGIN Private defines */
  145. #define ADC_EA 8
  146. /* USER CODE END Private defines */
  147. #ifdef __cplusplus
  148. }
  149. #endif
  150. #endif /* __MAIN_H */
  151. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/