main.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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) 2024 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 "stm32h5xx_hal.h"
  28. #include "stm32h5xx_ll_ucpd.h"
  29. #include "stm32h5xx_ll_bus.h"
  30. #include "stm32h5xx_ll_cortex.h"
  31. #include "stm32h5xx_ll_rcc.h"
  32. #include "stm32h5xx_ll_system.h"
  33. #include "stm32h5xx_ll_utils.h"
  34. #include "stm32h5xx_ll_pwr.h"
  35. #include "stm32h5xx_ll_gpio.h"
  36. #include "stm32h5xx_ll_dma.h"
  37. #include "stm32h5xx_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. void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
  51. /* Exported functions prototypes ---------------------------------------------*/
  52. void Error_Handler(void);
  53. /* USER CODE BEGIN EFP */
  54. /* USER CODE END EFP */
  55. /* Private defines -----------------------------------------------------------*/
  56. #define TRACE_CK_Pin GPIO_PIN_2
  57. #define TRACE_CK_GPIO_Port GPIOE
  58. #define TRACE_D0_Pin GPIO_PIN_3
  59. #define TRACE_D0_GPIO_Port GPIOE
  60. #define TRACE_D1_Pin GPIO_PIN_4
  61. #define TRACE_D1_GPIO_Port GPIOE
  62. #define TRACE_D2_Pin GPIO_PIN_5
  63. #define TRACE_D2_GPIO_Port GPIOE
  64. #define TRACE_D3_Pin GPIO_PIN_6
  65. #define TRACE_D3_GPIO_Port GPIOE
  66. #define USER_BUTTON_Pin GPIO_PIN_13
  67. #define USER_BUTTON_GPIO_Port GPIOC
  68. #define LED2_YELLOW_Pin GPIO_PIN_4
  69. #define LED2_YELLOW_GPIO_Port GPIOF
  70. #define RMII_MDC_Pin GPIO_PIN_1
  71. #define RMII_MDC_GPIO_Port GPIOC
  72. #define RMII_REF_CLK_Pin GPIO_PIN_1
  73. #define RMII_REF_CLK_GPIO_Port GPIOA
  74. #define RMII_MDIO_Pin GPIO_PIN_2
  75. #define RMII_MDIO_GPIO_Port GPIOA
  76. #define VBUS_SENSE_Pin GPIO_PIN_4
  77. #define VBUS_SENSE_GPIO_Port GPIOA
  78. #define RMII_CRS_DV_Pin GPIO_PIN_7
  79. #define RMII_CRS_DV_GPIO_Port GPIOA
  80. #define RMII_RXD0_Pin GPIO_PIN_4
  81. #define RMII_RXD0_GPIO_Port GPIOC
  82. #define RMII_RXD1_Pin GPIO_PIN_5
  83. #define RMII_RXD1_GPIO_Port GPIOC
  84. #define LED1_GREEN_Pin GPIO_PIN_0
  85. #define LED1_GREEN_GPIO_Port GPIOB
  86. #define UCPD_CC1_Pin GPIO_PIN_13
  87. #define UCPD_CC1_GPIO_Port GPIOB
  88. #define UCPD_CC2_Pin GPIO_PIN_14
  89. #define UCPD_CC2_GPIO_Port GPIOB
  90. #define RMII_TXD1_Pin GPIO_PIN_15
  91. #define RMII_TXD1_GPIO_Port GPIOB
  92. #define T_VCP_TX_Pin GPIO_PIN_8
  93. #define T_VCP_TX_GPIO_Port GPIOD
  94. #define T_VCP_RX_Pin GPIO_PIN_9
  95. #define T_VCP_RX_GPIO_Port GPIOD
  96. #define LED3_RED_Pin GPIO_PIN_4
  97. #define LED3_RED_GPIO_Port GPIOG
  98. #define UCPD_FLT_Pin GPIO_PIN_7
  99. #define UCPD_FLT_GPIO_Port GPIOG
  100. #define UCPD_DBn_Pin GPIO_PIN_9
  101. #define UCPD_DBn_GPIO_Port GPIOA
  102. #define USB_FS_N_Pin GPIO_PIN_11
  103. #define USB_FS_N_GPIO_Port GPIOA
  104. #define USB_FS_P_Pin GPIO_PIN_12
  105. #define USB_FS_P_GPIO_Port GPIOA
  106. #define SWDIO_Pin GPIO_PIN_13
  107. #define SWDIO_GPIO_Port GPIOA
  108. #define SWCLK_Pin GPIO_PIN_14
  109. #define SWCLK_GPIO_Port GPIOA
  110. #define T_JTDI_Pin GPIO_PIN_15
  111. #define T_JTDI_GPIO_Port GPIOA
  112. #define RMII_TXT_EN_Pin GPIO_PIN_11
  113. #define RMII_TXT_EN_GPIO_Port GPIOG
  114. #define RMI_TXD0_Pin GPIO_PIN_13
  115. #define RMI_TXD0_GPIO_Port GPIOG
  116. #define SWO_Pin GPIO_PIN_3
  117. #define SWO_GPIO_Port GPIOB
  118. #define ARD_D1_TX_Pin GPIO_PIN_6
  119. #define ARD_D1_TX_GPIO_Port GPIOB
  120. #define ARD_D0_RX_Pin GPIO_PIN_7
  121. #define ARD_D0_RX_GPIO_Port GPIOB
  122. /* USER CODE BEGIN Private defines */
  123. /* USER CODE END Private defines */
  124. #ifdef __cplusplus
  125. }
  126. #endif
  127. #endif /* __MAIN_H */