main(3251).h 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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) 2019 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 <stdio.h>
  32. #include "PE43711.h"
  33. #include "BDA4601.h"
  34. #include "zig_operate.h"
  35. #include "adf4153.h"
  36. /* USER CODE END Includes */
  37. /* Exported types ------------------------------------------------------------*/
  38. /* USER CODE BEGIN ET */
  39. /* USER CODE END ET */
  40. /* Exported constants --------------------------------------------------------*/
  41. /* USER CODE BEGIN EC */
  42. typedef struct _ATTEN_Setting_st{
  43. GPIO_TypeDef * CLK_PORT;
  44. uint16_t CLK_PIN;
  45. GPIO_TypeDef * DATA_PORT;
  46. uint16_t DATA_PIN;
  47. GPIO_TypeDef * ENABLE_PORT;
  48. uint16_t ENABLE_PIN;
  49. GPIO_TypeDef * PATH_EN_PORT;
  50. uint16_t PATH_EN_PIN;
  51. } ATTEN_Setting_st;
  52. /* USER CODE END EC */
  53. /* Exported macro ------------------------------------------------------------*/
  54. /* USER CODE BEGIN EM */
  55. /* USER CODE END EM */
  56. /* Exported functions prototypes ---------------------------------------------*/
  57. void Error_Handler(void);
  58. /* USER CODE BEGIN EFP */
  59. /* USER CODE END EFP */
  60. /* Private defines -----------------------------------------------------------*/
  61. #define ATT_EN_1_8G_DL1_Pin GPIO_PIN_2
  62. #define ATT_EN_1_8G_DL1_GPIO_Port GPIOE
  63. #define ATT_EN_1_8G_DL2_Pin GPIO_PIN_3
  64. #define ATT_EN_1_8G_DL2_GPIO_Port GPIOE
  65. #define ATT_EN_1_8G_UL1_Pin GPIO_PIN_4
  66. #define ATT_EN_1_8G_UL1_GPIO_Port GPIOE
  67. #define ATT_EN_1_8G_UL2_Pin GPIO_PIN_5
  68. #define ATT_EN_1_8G_UL2_GPIO_Port GPIOE
  69. #define ATT_EN_1_8G_UL3_Pin GPIO_PIN_6
  70. #define ATT_EN_1_8G_UL3_GPIO_Port GPIOE
  71. #define ATT_EN_1_8G_UL4_Pin GPIO_PIN_13
  72. #define ATT_EN_1_8G_UL4_GPIO_Port GPIOC
  73. #define PATH_EN_1_8G_DL_Pin GPIO_PIN_14
  74. #define PATH_EN_1_8G_DL_GPIO_Port GPIOC
  75. #define PATH_EN_1_8G_UL_Pin GPIO_PIN_15
  76. #define PATH_EN_1_8G_UL_GPIO_Port GPIOC
  77. #define PLL_EN_1_8G_DL_Pin GPIO_PIN_0
  78. #define PLL_EN_1_8G_DL_GPIO_Port GPIOF
  79. #define PLL_EN_1_8G_UL_Pin GPIO_PIN_1
  80. #define PLL_EN_1_8G_UL_GPIO_Port GPIOF
  81. #define PLL_LD_1_8G_DL_Pin GPIO_PIN_2
  82. #define PLL_LD_1_8G_DL_GPIO_Port GPIOF
  83. #define PLL_LD_1_8G_UL_Pin GPIO_PIN_3
  84. #define PLL_LD_1_8G_UL_GPIO_Port GPIOF
  85. #define ATT_EN_2_1G_DL1_Pin GPIO_PIN_4
  86. #define ATT_EN_2_1G_DL1_GPIO_Port GPIOF
  87. #define ATT_EN_2_1G_DL2_Pin GPIO_PIN_5
  88. #define ATT_EN_2_1G_DL2_GPIO_Port GPIOF
  89. #define ATT_EN_2_1G_UL1_Pin GPIO_PIN_6
  90. #define ATT_EN_2_1G_UL1_GPIO_Port GPIOF
  91. #define ATT_EN_2_1G_UL2_Pin GPIO_PIN_7
  92. #define ATT_EN_2_1G_UL2_GPIO_Port GPIOF
  93. #define ATT_EN_2_1G_UL3_Pin GPIO_PIN_8
  94. #define ATT_EN_2_1G_UL3_GPIO_Port GPIOF
  95. #define ATT_EN_2_1G_UL4_Pin GPIO_PIN_9
  96. #define ATT_EN_2_1G_UL4_GPIO_Port GPIOF
  97. #define DET_3_5G_UL_IN_Pin GPIO_PIN_0
  98. #define DET_3_5G_UL_IN_GPIO_Port GPIOC
  99. #define DET_3_5G_UL_OUT_Pin GPIO_PIN_1
  100. #define DET_3_5G_UL_OUT_GPIO_Port GPIOC
  101. #define RFU_TEMP_Pin GPIO_PIN_2
  102. #define RFU_TEMP_GPIO_Port GPIOC
  103. #define _28V_DET_Pin GPIO_PIN_3
  104. #define _28V_DET_GPIO_Port GPIOC
  105. #define DET_1_8G_DL_IN_Pin GPIO_PIN_0
  106. #define DET_1_8G_DL_IN_GPIO_Port GPIOA
  107. #define DET_1_8G_DL_OUT_Pin GPIO_PIN_1
  108. #define DET_1_8G_DL_OUT_GPIO_Port GPIOA
  109. #define DET_1_8G_UL_IN_Pin GPIO_PIN_2
  110. #define DET_1_8G_UL_IN_GPIO_Port GPIOA
  111. #define DET_1_8G_UL_OUT_Pin GPIO_PIN_3
  112. #define DET_1_8G_UL_OUT_GPIO_Port GPIOA
  113. #define DET_2_1G_DL_IN_Pin GPIO_PIN_4
  114. #define DET_2_1G_DL_IN_GPIO_Port GPIOA
  115. #define DET_2_1G_DL_OUT_Pin GPIO_PIN_5
  116. #define DET_2_1G_DL_OUT_GPIO_Port GPIOA
  117. #define DET_2_1G_UL_IN_Pin GPIO_PIN_6
  118. #define DET_2_1G_UL_IN_GPIO_Port GPIOA
  119. #define DET_2_1G_UL_OUT_Pin GPIO_PIN_7
  120. #define DET_2_1G_UL_OUT_GPIO_Port GPIOA
  121. #define DET_3_5G_DL_IN_Pin GPIO_PIN_0
  122. #define DET_3_5G_DL_IN_GPIO_Port GPIOB
  123. #define DET_3_5G_DL_OUT_Pin GPIO_PIN_1
  124. #define DET_3_5G_DL_OUT_GPIO_Port GPIOB
  125. #define PLL_DATA_Pin GPIO_PIN_8
  126. #define PLL_DATA_GPIO_Port GPIOD
  127. #define PLL_CLK_Pin GPIO_PIN_9
  128. #define PLL_CLK_GPIO_Port GPIOD
  129. #define ATT_DATA_Pin GPIO_PIN_10
  130. #define ATT_DATA_GPIO_Port GPIOD
  131. #define ATT_CLK_Pin GPIO_PIN_11
  132. #define ATT_CLK_GPIO_Port GPIOD
  133. #define ALARM_DC_Pin GPIO_PIN_12
  134. #define ALARM_DC_GPIO_Port GPIOD
  135. #define ALARM_AC_Pin GPIO_PIN_13
  136. #define ALARM_AC_GPIO_Port GPIOD
  137. #define DA_LDAC_Pin GPIO_PIN_15
  138. #define DA_LDAC_GPIO_Port GPIOD
  139. #define DA_SYNC_Pin GPIO_PIN_2
  140. #define DA_SYNC_GPIO_Port GPIOG
  141. #define DA_SCLK_Pin GPIO_PIN_3
  142. #define DA_SCLK_GPIO_Port GPIOG
  143. #define DA_DIN_Pin GPIO_PIN_4
  144. #define DA_DIN_GPIO_Port GPIOG
  145. #define _T_SYNC_UL_Pin GPIO_PIN_5
  146. #define _T_SYNC_UL_GPIO_Port GPIOG
  147. #define T_SYNC_UL_Pin GPIO_PIN_6
  148. #define T_SYNC_UL_GPIO_Port GPIOG
  149. #define _T_SYNC_DL_Pin GPIO_PIN_7
  150. #define _T_SYNC_DL_GPIO_Port GPIOG
  151. #define T_SYNC_DL_Pin GPIO_PIN_8
  152. #define T_SYNC_DL_GPIO_Port GPIOG
  153. #define PLL_EN_3_5G_L_Pin GPIO_PIN_6
  154. #define PLL_EN_3_5G_L_GPIO_Port GPIOC
  155. #define PLL_EN_3_5G_H_Pin GPIO_PIN_7
  156. #define PLL_EN_3_5G_H_GPIO_Port GPIOC
  157. #define PLL_LD_3_5G_L_Pin GPIO_PIN_8
  158. #define PLL_LD_3_5G_L_GPIO_Port GPIOC
  159. #define PLL_LD_3_5G_H_Pin GPIO_PIN_9
  160. #define PLL_LD_3_5G_H_GPIO_Port GPIOC
  161. #define ATT_CLK_3_5G_Pin GPIO_PIN_0
  162. #define ATT_CLK_3_5G_GPIO_Port GPIOD
  163. #define ATT_EN_3_5G_Pin GPIO_PIN_1
  164. #define ATT_EN_3_5G_GPIO_Port GPIOD
  165. #define ATT_DATA_3_5G_DL_Pin GPIO_PIN_2
  166. #define ATT_DATA_3_5G_DL_GPIO_Port GPIOD
  167. #define ATT_DATA_3_5G_UL_Pin GPIO_PIN_3
  168. #define ATT_DATA_3_5G_UL_GPIO_Port GPIOD
  169. #define ATT_DATA_3_5G_COM1_Pin GPIO_PIN_4
  170. #define ATT_DATA_3_5G_COM1_GPIO_Port GPIOD
  171. #define ATT_DATA_3_5G_COM2_Pin GPIO_PIN_5
  172. #define ATT_DATA_3_5G_COM2_GPIO_Port GPIOD
  173. #define ATT_DATA_3_5G_COM3_Pin GPIO_PIN_6
  174. #define ATT_DATA_3_5G_COM3_GPIO_Port GPIOD
  175. #define PATH_EN_3_5G_L_Pin GPIO_PIN_7
  176. #define PATH_EN_3_5G_L_GPIO_Port GPIOD
  177. #define PATH_EN_3_5G_H_Pin GPIO_PIN_9
  178. #define PATH_EN_3_5G_H_GPIO_Port GPIOG
  179. #define PATH_EN_3_5G_DL_Pin GPIO_PIN_10
  180. #define PATH_EN_3_5G_DL_GPIO_Port GPIOG
  181. #define PATH_EN_3_5G_UL_Pin GPIO_PIN_11
  182. #define PATH_EN_3_5G_UL_GPIO_Port GPIOG
  183. #define PLL_ON_OFF_3_5G_L_Pin GPIO_PIN_12
  184. #define PLL_ON_OFF_3_5G_L_GPIO_Port GPIOG
  185. #define PLL_ON_OFF_3_5G_H_Pin GPIO_PIN_13
  186. #define PLL_ON_OFF_3_5G_H_GPIO_Port GPIOG
  187. #define BOOT_LED_Pin GPIO_PIN_14
  188. #define BOOT_LED_GPIO_Port GPIOG
  189. #define PLL_EN_2_1G_DL_Pin GPIO_PIN_3
  190. #define PLL_EN_2_1G_DL_GPIO_Port GPIOB
  191. #define PLL_EN_2_1G_UL_Pin GPIO_PIN_4
  192. #define PLL_EN_2_1G_UL_GPIO_Port GPIOB
  193. #define PLL_LD_2_1G_DL_Pin GPIO_PIN_5
  194. #define PLL_LD_2_1G_DL_GPIO_Port GPIOB
  195. #define PLL_LD_2_1G_UL_Pin GPIO_PIN_6
  196. #define PLL_LD_2_1G_UL_GPIO_Port GPIOB
  197. #define PATH_EN_2_1G_DL_Pin GPIO_PIN_0
  198. #define PATH_EN_2_1G_DL_GPIO_Port GPIOE
  199. #define PATH_EN_2_1G_UL_Pin GPIO_PIN_1
  200. #define PATH_EN_2_1G_UL_GPIO_Port GPIOE
  201. /* USER CODE BEGIN Private defines */
  202. /* USER CODE END Private defines */
  203. #ifdef __cplusplus
  204. }
  205. #endif
  206. #endif /* __MAIN_H */
  207. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/