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>© 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 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 "stm32g4xx_hal.h" 32 #include "stm32g4xx_ll_pwr.h" 33 34 /* Private includes ----------------------------------------------------------*/ 35 /* USER CODE BEGIN Includes */ 36 37 /* USER CODE END Includes */ 38 39 /* Exported types ------------------------------------------------------------*/ 40 /* USER CODE BEGIN ET */ 41 42 /* USER CODE END ET */ 43 44 /* Exported constants --------------------------------------------------------*/ 45 /* USER CODE BEGIN EC */ 46 47 /* USER CODE END EC */ 48 49 /* Exported macro ------------------------------------------------------------*/ 50 /* USER CODE BEGIN EM */ 51 52 /* USER CODE END EM */ 53 54 /* Exported functions prototypes ---------------------------------------------*/ 55 void Error_Handler(void); 56 57 /* USER CODE BEGIN EFP */ 58 59 /* USER CODE END EFP */ 60 61 /* Private defines -----------------------------------------------------------*/ 62 #define B1_Pin GPIO_PIN_13 63 #define B1_GPIO_Port GPIOC 64 #define LD2_Pin GPIO_PIN_5 65 #define LD2_GPIO_Port GPIOA 66 #define USART1_TX_Pin GPIO_PIN_4 67 #define USART1_TX_GPIO_Port GPIOC 68 #define USART1_RX_Pin GPIO_PIN_5 69 #define USART1_RX_GPIO_Port GPIOC 70 #define T_SWDIO_Pin GPIO_PIN_13 71 #define T_SWDIO_GPIO_Port GPIOA 72 #define T_SWCLK_Pin GPIO_PIN_14 73 #define T_SWCLK_GPIO_Port GPIOA 74 #define T_SWO_Pin GPIO_PIN_3 75 #define T_SWO_GPIO_Port GPIOB 76 /* USER CODE BEGIN Private defines */ 77 78 /* USER CODE END Private defines */ 79 80 #ifdef __cplusplus 81 } 82 #endif 83 84 #endif /* __MAIN_H */ 85 86 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 87