main.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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 <stdbool.h>
  33. #include <string.h>
  34. #include "uart.h"
  35. #include "CRC16.h"
  36. #include "flash.h"
  37. #include "esp8266.h"
  38. /* USER CODE END Includes */
  39. /* Exported types ------------------------------------------------------------*/
  40. /* USER CODE BEGIN ET */
  41. /* USER CODE END ET */
  42. /* Exported constants --------------------------------------------------------*/
  43. /* USER CODE BEGIN EC */
  44. /* USER CODE END EC */
  45. /* Exported macro ------------------------------------------------------------*/
  46. /* USER CODE BEGIN EM */
  47. /* USER CODE END EM */
  48. /* Exported functions prototypes ---------------------------------------------*/
  49. void Error_Handler(void);
  50. /* USER CODE BEGIN EFP */
  51. /* USER CODE END EFP */
  52. /* Private defines -----------------------------------------------------------*/
  53. #define BOOT_LED_Pin GPIO_PIN_15
  54. #define BOOT_LED_GPIO_Port GPIOC
  55. #define DET_OUT_B_Pin GPIO_PIN_0
  56. #define DET_OUT_B_GPIO_Port GPIOC
  57. #define EXT_DET_B_Pin GPIO_PIN_1
  58. #define EXT_DET_B_GPIO_Port GPIOC
  59. #define LED_UL_G_B_Pin GPIO_PIN_1
  60. #define LED_UL_G_B_GPIO_Port GPIOA
  61. #define LED_SD_R_B_Pin GPIO_PIN_4
  62. #define LED_SD_R_B_GPIO_Port GPIOA
  63. #define PWR_LED_B_Pin GPIO_PIN_5
  64. #define PWR_LED_B_GPIO_Port GPIOA
  65. #define LED_DL_G_B_Pin GPIO_PIN_6
  66. #define LED_DL_G_B_GPIO_Port GPIOA
  67. #define LED_DL_R_B_Pin GPIO_PIN_7
  68. #define LED_DL_R_B_GPIO_Port GPIOA
  69. #define RFU_TEMP_Pin GPIO_PIN_1
  70. #define RFU_TEMP_GPIO_Port GPIOB
  71. #define RST_WIFI_B_Pin GPIO_PIN_15
  72. #define RST_WIFI_B_GPIO_Port GPIOB
  73. #define PLL_LD_B_Pin GPIO_PIN_6
  74. #define PLL_LD_B_GPIO_Port GPIOC
  75. #define ATT_DATA_B_Pin GPIO_PIN_13
  76. #define ATT_DATA_B_GPIO_Port GPIOA
  77. #define ATT_EN1_B_Pin GPIO_PIN_14
  78. #define ATT_EN1_B_GPIO_Port GPIOA
  79. #define ATT_EN2_B_Pin GPIO_PIN_15
  80. #define ATT_EN2_B_GPIO_Port GPIOA
  81. #define PLL_EN_B_Pin GPIO_PIN_12
  82. #define PLL_EN_B_GPIO_Port GPIOC
  83. #define ATT_CLK_B_Pin GPIO_PIN_2
  84. #define ATT_CLK_B_GPIO_Port GPIOD
  85. #define PA_EN_B_Pin GPIO_PIN_3
  86. #define PA_EN_B_GPIO_Port GPIOB
  87. #define EXT_PA_EN_B_Pin GPIO_PIN_4
  88. #define EXT_PA_EN_B_GPIO_Port GPIOB
  89. #define PLL_CLK_B_Pin GPIO_PIN_6
  90. #define PLL_CLK_B_GPIO_Port GPIOB
  91. #define PLL_DATA_B_Pin GPIO_PIN_7
  92. #define PLL_DATA_B_GPIO_Port GPIOB
  93. /* USER CODE BEGIN Private defines */
  94. /* USER CODE END Private defines */
  95. #ifdef __cplusplus
  96. }
  97. #endif
  98. #endif /* __MAIN_H */
  99. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/