main.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. /* 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 "stm32g0xx_hal.h"
  28. /* Private includes ----------------------------------------------------------*/
  29. /* USER CODE BEGIN Includes */
  30. /* USER CODE END Includes */
  31. /* Exported types ------------------------------------------------------------*/
  32. /* USER CODE BEGIN ET */
  33. /* USER CODE END ET */
  34. /* Exported constants --------------------------------------------------------*/
  35. /* USER CODE BEGIN EC */
  36. /* USER CODE END EC */
  37. /* Exported macro ------------------------------------------------------------*/
  38. /* USER CODE BEGIN EM */
  39. /* USER CODE END EM */
  40. void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
  41. /* Exported functions prototypes ---------------------------------------------*/
  42. void Error_Handler(void);
  43. /* USER CODE BEGIN EFP */
  44. /* USER CODE END EFP */
  45. /* Private defines -----------------------------------------------------------*/
  46. #define SET_DEFAULT_Pin GPIO_PIN_8
  47. #define SET_DEFAULT_GPIO_Port GPIOB
  48. #define SET_FAILSAFE_Pin GPIO_PIN_9
  49. #define SET_FAILSAFE_GPIO_Port GPIOB
  50. #define TX_Pin GPIO_PIN_2
  51. #define TX_GPIO_Port GPIOA
  52. #define RX_Pin GPIO_PIN_3
  53. #define RX_GPIO_Port GPIOA
  54. #define ADC1_Pin GPIO_PIN_4
  55. #define ADC1_GPIO_Port GPIOA
  56. #define PWM1_Pin GPIO_PIN_6
  57. #define PWM1_GPIO_Port GPIOA
  58. #define PWM2_Pin GPIO_PIN_7
  59. #define PWM2_GPIO_Port GPIOA
  60. #define PWM3_Pin GPIO_PIN_8
  61. #define PWM3_GPIO_Port GPIOA
  62. #define PWM4_Pin GPIO_PIN_11
  63. #define PWM4_GPIO_Port GPIOA
  64. #define PWM5_Pin GPIO_PIN_3
  65. #define PWM5_GPIO_Port GPIOB
  66. /* USER CODE BEGIN Private defines */
  67. /* USER CODE END Private defines */
  68. #ifdef __cplusplus
  69. }
  70. #endif
  71. #endif /* __MAIN_H */