main.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. * Copyright (c) 2022 STMicroelectronics.
  11. * All rights reserved.
  12. *
  13. * This software is licensed under terms that can be found in the LICENSE file
  14. * in the root directory of this software component.
  15. * If no LICENSE file comes with this software, it is provided AS-IS.
  16. *
  17. ******************************************************************************
  18. */
  19. /* USER CODE END Header */
  20. /* Define to prevent recursive inclusion -------------------------------------*/
  21. #ifndef __MAIN_H
  22. #define __MAIN_H
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. /* Includes ------------------------------------------------------------------*/
  27. #include "stm32h7xx_hal.h"
  28. #include "stm32h7xx_ll_rcc.h"
  29. #include "stm32h7xx_ll_spi.h"
  30. #include "stm32h7xx_ll_bus.h"
  31. #include "stm32h7xx_ll_cortex.h"
  32. #include "stm32h7xx_ll_system.h"
  33. #include "stm32h7xx_ll_utils.h"
  34. #include "stm32h7xx_ll_pwr.h"
  35. #include "stm32h7xx_ll_gpio.h"
  36. #include "stm32h7xx_ll_dma.h"
  37. #include "stm32h7xx_ll_exti.h"
  38. /* Private includes ----------------------------------------------------------*/
  39. /* USER CODE BEGIN Includes */
  40. /* USER CODE END Includes */
  41. /* Exported types ------------------------------------------------------------*/
  42. /* USER CODE BEGIN ET */
  43. /* USER CODE END ET */
  44. /* Exported constants --------------------------------------------------------*/
  45. /* USER CODE BEGIN EC */
  46. /* USER CODE END EC */
  47. /* Exported macro ------------------------------------------------------------*/
  48. /* USER CODE BEGIN EM */
  49. /* USER CODE END EM */
  50. /* Exported functions prototypes ---------------------------------------------*/
  51. void Error_Handler(void);
  52. /* USER CODE BEGIN EFP */
  53. /* USER CODE END EFP */
  54. /* Private defines -----------------------------------------------------------*/
  55. #define B1_Pin GPIO_PIN_13
  56. #define B1_GPIO_Port GPIOC
  57. #define LED_GREEN_Pin GPIO_PIN_0
  58. #define LED_GREEN_GPIO_Port GPIOB
  59. #define CC1200_RESET_Pin GPIO_PIN_12
  60. #define CC1200_RESET_GPIO_Port GPIOB
  61. #define LED_RED_Pin GPIO_PIN_14
  62. #define LED_RED_GPIO_Port GPIOB
  63. #define CC1200_TCXO_ENABLE_Pin GPIO_PIN_15
  64. #define CC1200_TCXO_ENABLE_GPIO_Port GPIOB
  65. #define STLK_VCP_RX_Pin GPIO_PIN_8
  66. #define STLK_VCP_RX_GPIO_Port GPIOD
  67. #define STLK_VCP_TX_Pin GPIO_PIN_9
  68. #define STLK_VCP_TX_GPIO_Port GPIOD
  69. #define USB_FS_PWR_EN_Pin GPIO_PIN_10
  70. #define USB_FS_PWR_EN_GPIO_Port GPIOD
  71. #define USB_FS_OVCR_Pin GPIO_PIN_7
  72. #define USB_FS_OVCR_GPIO_Port GPIOG
  73. #define CC1200_CS_Pin GPIO_PIN_6
  74. #define CC1200_CS_GPIO_Port GPIOC
  75. #define USB_FS_VBUS_Pin GPIO_PIN_9
  76. #define USB_FS_VBUS_GPIO_Port GPIOA
  77. #define USB_FS_ID_Pin GPIO_PIN_10
  78. #define USB_FS_ID_GPIO_Port GPIOA
  79. #define SWDIO_Pin GPIO_PIN_13
  80. #define SWDIO_GPIO_Port GPIOA
  81. #define SWCLK_Pin GPIO_PIN_14
  82. #define SWCLK_GPIO_Port GPIOA
  83. #define SWO_Pin GPIO_PIN_3
  84. #define SWO_GPIO_Port GPIOB
  85. #define LED_YELLOW_Pin GPIO_PIN_1
  86. #define LED_YELLOW_GPIO_Port GPIOE
  87. /* USER CODE BEGIN Private defines */
  88. /* USER CODE END Private defines */
  89. #ifdef __cplusplus
  90. }
  91. #endif
  92. #endif /* __MAIN_H */