main.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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) 2021 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 "stm32u5xx_hal.h"
  29. #include "stm32u5xx_ll_ucpd.h"
  30. #include "stm32u5xx_ll_bus.h"
  31. #include "stm32u5xx_ll_cortex.h"
  32. #include "stm32u5xx_ll_rcc.h"
  33. #include "stm32u5xx_ll_system.h"
  34. #include "stm32u5xx_ll_utils.h"
  35. #include "stm32u5xx_ll_pwr.h"
  36. #include "stm32u5xx_ll_gpio.h"
  37. #include "stm32u5xx_ll_dma.h"
  38. #include "stm32u5xx_ll_exti.h"
  39. /* Private includes ----------------------------------------------------------*/
  40. /* USER CODE BEGIN Includes */
  41. /* USER CODE END Includes */
  42. /* Exported types ------------------------------------------------------------*/
  43. /* USER CODE BEGIN ET */
  44. /* USER CODE END ET */
  45. /* Exported constants --------------------------------------------------------*/
  46. /* USER CODE BEGIN EC */
  47. /* USER CODE END EC */
  48. /* Exported macro ------------------------------------------------------------*/
  49. /* USER CODE BEGIN EM */
  50. /* USER CODE END EM */
  51. /* Exported functions prototypes ---------------------------------------------*/
  52. void Error_Handler(void);
  53. /* USER CODE BEGIN EFP */
  54. /* USER CODE END EFP */
  55. /* Private defines -----------------------------------------------------------*/
  56. #define USER_BUTTON_Pin GPIO_PIN_13
  57. #define USER_BUTTON_GPIO_Port GPIOC
  58. #define VBUS_SENSE_Pin GPIO_PIN_2
  59. #define VBUS_SENSE_GPIO_Port GPIOC
  60. #define UCPD_FLT_Pin GPIO_PIN_14
  61. #define UCPD_FLT_GPIO_Port GPIOB
  62. #define UCPD1_CC2_Pin GPIO_PIN_15
  63. #define UCPD1_CC2_GPIO_Port GPIOB
  64. #define LED_RED_Pin GPIO_PIN_2
  65. #define LED_RED_GPIO_Port GPIOG
  66. #define LED_GREEN_Pin GPIO_PIN_7
  67. #define LED_GREEN_GPIO_Port GPIOC
  68. #define USART1_TX_Pin GPIO_PIN_9
  69. #define USART1_TX_GPIO_Port GPIOA
  70. #define USART1_RX_Pin GPIO_PIN_10
  71. #define USART1_RX_GPIO_Port GPIOA
  72. #define USB_OTG_FS_DM_Pin GPIO_PIN_11
  73. #define USB_OTG_FS_DM_GPIO_Port GPIOA
  74. #define USB_OTG_FS_DP_Pin GPIO_PIN_12
  75. #define USB_OTG_FS_DP_GPIO_Port GPIOA
  76. #define UCPD1_CC1_Pin GPIO_PIN_15
  77. #define UCPD1_CC1_GPIO_Port GPIOA
  78. #define UCPD_DBn_Pin GPIO_PIN_5
  79. #define UCPD_DBn_GPIO_Port GPIOB
  80. #define LED_BLUE_Pin GPIO_PIN_7
  81. #define LED_BLUE_GPIO_Port GPIOB
  82. /* USER CODE BEGIN Private defines */
  83. /* USER CODE END Private defines */
  84. #ifdef __cplusplus
  85. }
  86. #endif
  87. #endif /* __MAIN_H */
  88. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/