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) 2023 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 
22 /* Define to prevent recursive inclusion -------------------------------------*/
23 #ifndef __MAIN_H
24 #define __MAIN_H
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 /* Includes ------------------------------------------------------------------*/
31 #include "stm32u5xx_hal.h"
32 #include "stm32u5xx_ll_ucpd.h"
33 #include "stm32u5xx_ll_bus.h"
34 #include "stm32u5xx_ll_cortex.h"
35 #include "stm32u5xx_ll_rcc.h"
36 #include "stm32u5xx_ll_system.h"
37 #include "stm32u5xx_ll_utils.h"
38 #include "stm32u5xx_ll_pwr.h"
39 #include "stm32u5xx_ll_gpio.h"
40 #include "stm32u5xx_ll_dma.h"
41 
42 #include "stm32u5xx_ll_exti.h"
43 
44 /* Private includes ----------------------------------------------------------*/
45 /* USER CODE BEGIN Includes */
46 
47 /* USER CODE END Includes */
48 
49 /* Exported types ------------------------------------------------------------*/
50 /* USER CODE BEGIN ET */
51 
52 /* USER CODE END ET */
53 
54 /* Exported constants --------------------------------------------------------*/
55 /* USER CODE BEGIN EC */
56 
57 /* USER CODE END EC */
58 
59 /* Exported macro ------------------------------------------------------------*/
60 /* USER CODE BEGIN EM */
61 
62 /* USER CODE END EM */
63 
64 void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
65 
66 /* Exported functions prototypes ---------------------------------------------*/
67 void Error_Handler(void);
68 
69 /* USER CODE BEGIN EFP */
70 
71 /* USER CODE END EFP */
72 
73 /* Private defines -----------------------------------------------------------*/
74 #define USER_BUTTON_Pin GPIO_PIN_13
75 #define USER_BUTTON_GPIO_Port GPIOC
76 #define VBUS_SENSE_Pin GPIO_PIN_2
77 #define VBUS_SENSE_GPIO_Port GPIOC
78 #define UCPD_FLT_Pin GPIO_PIN_14
79 #define UCPD_FLT_GPIO_Port GPIOB
80 #define UCPD1_CC2_Pin GPIO_PIN_15
81 #define UCPD1_CC2_GPIO_Port GPIOB
82 #define LED_GREEN_Pin GPIO_PIN_7
83 #define LED_GREEN_GPIO_Port GPIOC
84 #define USART1_TX_Pin GPIO_PIN_9
85 #define USART1_TX_GPIO_Port GPIOA
86 #define USART1_RX_Pin GPIO_PIN_10
87 #define USART1_RX_GPIO_Port GPIOA
88 #define USB_OTG_FS_DM_Pin GPIO_PIN_11
89 #define USB_OTG_FS_DM_GPIO_Port GPIOA
90 #define USB_OTG_FS_DP_Pin GPIO_PIN_12
91 #define USB_OTG_FS_DP_GPIO_Port GPIOA
92 #define UCPD1_CC1_Pin GPIO_PIN_15
93 #define UCPD1_CC1_GPIO_Port GPIOA
94 #define UCPD_DBn_Pin GPIO_PIN_5
95 #define UCPD_DBn_GPIO_Port GPIOB
96 #define LED_BLUE_Pin GPIO_PIN_7
97 #define LED_BLUE_GPIO_Port GPIOB
98 /* USER CODE BEGIN Private defines */
99 
100 /* USER CODE END Private defines */
101 
102 #ifdef __cplusplus
103 }
104 #endif
105 
106 #endif /* __MAIN_H */
107 
108 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
109