firmware-nucleo/Core/Inc/main.h (3076B)
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) 2025 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 21 /* Define to prevent recursive inclusion -------------------------------------*/ 22 #ifndef __MAIN_H 23 #define __MAIN_H 24 25 #ifdef __cplusplus 26 extern "C" { 27 #endif 28 29 /* Includes ------------------------------------------------------------------*/ 30 #include "stm32f1xx_hal.h" 31 32 /* Private includes ----------------------------------------------------------*/ 33 /* USER CODE BEGIN Includes */ 34 extern I2C_HandleTypeDef hi2c1; 35 extern RTC_HandleTypeDef hrtc; 36 extern TIM_HandleTypeDef htim1; 37 extern TIM_HandleTypeDef htim3; 38 extern UART_HandleTypeDef huart1; 39 extern UART_HandleTypeDef huart3; 40 41 extern RTC_TimeTypeDef s_time; 42 extern RTC_DateTypeDef s_date; 43 44 /* USER CODE END Includes */ 45 46 /* Exported types ------------------------------------------------------------*/ 47 /* USER CODE BEGIN ET */ 48 49 /* USER CODE END ET */ 50 51 /* Exported constants --------------------------------------------------------*/ 52 /* USER CODE BEGIN EC */ 53 #define RTC_BACKUP_MAGIC_NUMBER 0x32F2 54 55 /* USER CODE END EC */ 56 57 /* Exported macro ------------------------------------------------------------*/ 58 /* USER CODE BEGIN EM */ 59 60 /* USER CODE END EM */ 61 62 void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim); 63 64 /* Exported functions prototypes ---------------------------------------------*/ 65 void Error_Handler(void); 66 67 /* USER CODE BEGIN EFP */ 68 69 /* USER CODE END EFP */ 70 71 /* Private defines -----------------------------------------------------------*/ 72 #define BTN_A_Pin GPIO_PIN_13 73 #define BTN_A_GPIO_Port GPIOC 74 #define BTN_A_EXTI_IRQn EXTI15_10_IRQn 75 #define USART2_TX_Pin GPIO_PIN_2 76 #define USART2_TX_GPIO_Port GPIOA 77 #define USART2_RX_Pin GPIO_PIN_3 78 #define USART2_RX_GPIO_Port GPIOA 79 #define LD2_Pin GPIO_PIN_5 80 #define LD2_GPIO_Port GPIOA 81 #define LD3_Pin GPIO_PIN_10 82 #define LD3_GPIO_Port GPIOB 83 #define BTN_B_Pin GPIO_PIN_10 84 #define BTN_B_GPIO_Port GPIOA 85 #define TMS_Pin GPIO_PIN_13 86 #define TMS_GPIO_Port GPIOA 87 #define TCK_Pin GPIO_PIN_14 88 #define TCK_GPIO_Port GPIOA 89 #define SWO_Pin GPIO_PIN_3 90 #define SWO_GPIO_Port GPIOB 91 #define BTN_D_Pin GPIO_PIN_4 92 #define BTN_D_GPIO_Port GPIOB 93 #define BTN_C_Pin GPIO_PIN_5 94 #define BTN_C_GPIO_Port GPIOB 95 96 /* USER CODE BEGIN Private defines */ 97 98 /* USER CODE END Private defines */ 99 100 #ifdef __cplusplus 101 } 102 #endif 103 104 #endif /* __MAIN_H */
