main.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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. #include "Bluecell_operate.h"
  32. /* USER CODE END Includes */
  33. /* Exported types ------------------------------------------------------------*/
  34. /* USER CODE BEGIN ET */
  35. /* USER CODE END ET */
  36. /* Exported constants --------------------------------------------------------*/
  37. /* USER CODE BEGIN EC */
  38. /* USER CODE END EC */
  39. /* Exported macro ------------------------------------------------------------*/
  40. /* USER CODE BEGIN EM */
  41. /* USER CODE END EM */
  42. /* Exported functions prototypes ---------------------------------------------*/
  43. void Error_Handler(void);
  44. /* USER CODE BEGIN EFP */
  45. extern uint32_t ADC1value[Bluecell_ADC1_MaxLength / 2];
  46. extern uint32_t ADC3value[Bluecell_ADC3_MaxLength / 2];
  47. /* USER CODE END EFP */
  48. /* Private defines -----------------------------------------------------------*/
  49. #define FAIL_MBIC_Pin GPIO_PIN_4
  50. #define FAIL_MBIC_GPIO_Port GPIOE
  51. #define BOOT_LED_Pin GPIO_PIN_15
  52. #define BOOT_LED_GPIO_Port GPIOC
  53. #define DET_UL4_OUT_Pin GPIO_PIN_6
  54. #define DET_UL4_OUT_GPIO_Port GPIOF
  55. #define DET_DL1_IN_Pin GPIO_PIN_7
  56. #define DET_DL1_IN_GPIO_Port GPIOF
  57. #define DET_DL2_IN_Pin GPIO_PIN_8
  58. #define DET_DL2_IN_GPIO_Port GPIOF
  59. #define DET_DL3_IN_Pin GPIO_PIN_9
  60. #define DET_DL3_IN_GPIO_Port GPIOF
  61. #define DET_DL4_IN_Pin GPIO_PIN_10
  62. #define DET_DL4_IN_GPIO_Port GPIOF
  63. #define RFU_TEMP_Pin GPIO_PIN_2
  64. #define RFU_TEMP_GPIO_Port GPIOC
  65. #define RFU_TX_Pin GPIO_PIN_2
  66. #define RFU_TX_GPIO_Port GPIOA
  67. #define RFU_RX_Pin GPIO_PIN_3
  68. #define RFU_RX_GPIO_Port GPIOA
  69. #define DET_UL1_OUT_Pin GPIO_PIN_4
  70. #define DET_UL1_OUT_GPIO_Port GPIOA
  71. #define DET_UL2_OUT_Pin GPIO_PIN_5
  72. #define DET_UL2_OUT_GPIO_Port GPIOA
  73. #define DET_UL3_OUT_Pin GPIO_PIN_6
  74. #define DET_UL3_OUT_GPIO_Port GPIOA
  75. #define ATT_CLOCK3_Pin GPIO_PIN_0
  76. #define ATT_CLOCK3_GPIO_Port GPIOG
  77. #define ATT_DATA3_Pin GPIO_PIN_1
  78. #define ATT_DATA3_GPIO_Port GPIOG
  79. #define ATT_CLOCK4_Pin GPIO_PIN_10
  80. #define ATT_CLOCK4_GPIO_Port GPIOE
  81. #define ATT_DATA4_Pin GPIO_PIN_11
  82. #define ATT_DATA4_GPIO_Port GPIOE
  83. #define ATT_EN_DL4_Pin GPIO_PIN_12
  84. #define ATT_EN_DL4_GPIO_Port GPIOE
  85. #define ATT_EN_UL4_Pin GPIO_PIN_13
  86. #define ATT_EN_UL4_GPIO_Port GPIOE
  87. #define PATH_EN_DL4_Pin GPIO_PIN_14
  88. #define PATH_EN_DL4_GPIO_Port GPIOE
  89. #define PATH_EN_UL4_Pin GPIO_PIN_15
  90. #define PATH_EN_UL4_GPIO_Port GPIOE
  91. #define EEPROM_SCL_Pin GPIO_PIN_10
  92. #define EEPROM_SCL_GPIO_Port GPIOB
  93. #define EEPROM_SDA_Pin GPIO_PIN_11
  94. #define EEPROM_SDA_GPIO_Port GPIOB
  95. #define ATT_EN_UL1_Pin GPIO_PIN_14
  96. #define ATT_EN_UL1_GPIO_Port GPIOB
  97. #define PATH_EN_DL1_Pin GPIO_PIN_15
  98. #define PATH_EN_DL1_GPIO_Port GPIOB
  99. #define PATH_EN_DL2_Pin GPIO_PIN_10
  100. #define PATH_EN_DL2_GPIO_Port GPIOD
  101. #define PATH_EN_UL2_Pin GPIO_PIN_11
  102. #define PATH_EN_UL2_GPIO_Port GPIOD
  103. #define LED_ACT_Pin GPIO_PIN_14
  104. #define LED_ACT_GPIO_Port GPIOD
  105. #define ATT_EN_DL3_Pin GPIO_PIN_2
  106. #define ATT_EN_DL3_GPIO_Port GPIOG
  107. #define ATT_EN_UL3_Pin GPIO_PIN_3
  108. #define ATT_EN_UL3_GPIO_Port GPIOG
  109. #define PATH_EN_DL3_Pin GPIO_PIN_4
  110. #define PATH_EN_DL3_GPIO_Port GPIOG
  111. #define PATH_EN_UL3_Pin GPIO_PIN_5
  112. #define PATH_EN_UL3_GPIO_Port GPIOG
  113. #define _PATH_SW1_Pin GPIO_PIN_8
  114. #define _PATH_SW1_GPIO_Port GPIOG
  115. #define PATH_EN_UL1_Pin GPIO_PIN_6
  116. #define PATH_EN_UL1_GPIO_Port GPIOC
  117. #define MBIC_UP_Pin GPIO_PIN_9
  118. #define MBIC_UP_GPIO_Port GPIOA
  119. #define MBIC_DOWN_Pin GPIO_PIN_10
  120. #define MBIC_DOWN_GPIO_Port GPIOA
  121. #define ATT_CLOCK2_Pin GPIO_PIN_2
  122. #define ATT_CLOCK2_GPIO_Port GPIOD
  123. #define ATT_DATA2_Pin GPIO_PIN_3
  124. #define ATT_DATA2_GPIO_Port GPIOD
  125. #define ATT_EN_DL2_Pin GPIO_PIN_4
  126. #define ATT_EN_DL2_GPIO_Port GPIOD
  127. #define ATT_EN_UL2_Pin GPIO_PIN_7
  128. #define ATT_EN_UL2_GPIO_Port GPIOD
  129. #define PATH_SW1_Pin GPIO_PIN_9
  130. #define PATH_SW1_GPIO_Port GPIOG
  131. #define _PATH_SW2_Pin GPIO_PIN_10
  132. #define _PATH_SW2_GPIO_Port GPIOG
  133. #define PATH_SW2_Pin GPIO_PIN_11
  134. #define PATH_SW2_GPIO_Port GPIOG
  135. #define _PATH_SW3_Pin GPIO_PIN_12
  136. #define _PATH_SW3_GPIO_Port GPIOG
  137. #define PATH_SW3_Pin GPIO_PIN_13
  138. #define PATH_SW3_GPIO_Port GPIOG
  139. #define _PATH_SW4_Pin GPIO_PIN_14
  140. #define _PATH_SW4_GPIO_Port GPIOG
  141. #define PATH_SW4_Pin GPIO_PIN_15
  142. #define PATH_SW4_GPIO_Port GPIOG
  143. #define ATT_CLOCK1_Pin GPIO_PIN_6
  144. #define ATT_CLOCK1_GPIO_Port GPIOB
  145. #define ATT_DATA1_Pin GPIO_PIN_7
  146. #define ATT_DATA1_GPIO_Port GPIOB
  147. #define ATT_EN_DL1_Pin GPIO_PIN_9
  148. #define ATT_EN_DL1_GPIO_Port GPIOB
  149. /* USER CODE BEGIN Private defines */
  150. /* USER CODE END Private defines */
  151. #ifdef __cplusplus
  152. }
  153. #endif
  154. #endif /* __MAIN_H */
  155. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/