main.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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) 2024 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 "stm32f4xx_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. extern TIM_HandleTypeDef htim2;
  37. extern TIM_HandleTypeDef htim3;
  38. extern TIM_HandleTypeDef htim4;
  39. /* USER CODE END EC */
  40. /* Exported macro ------------------------------------------------------------*/
  41. /* USER CODE BEGIN EM */
  42. /* USER CODE END EM */
  43. void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
  44. /* Exported functions prototypes ---------------------------------------------*/
  45. void Error_Handler(void);
  46. /* USER CODE BEGIN EFP */
  47. /* USER CODE END EFP */
  48. /* Private defines -----------------------------------------------------------*/
  49. #define C0_CAN1_ENABLE_Pin GPIO_PIN_0
  50. #define C0_CAN1_ENABLE_GPIO_Port GPIOC
  51. #define A0_NOZZLE_Pin GPIO_PIN_0
  52. #define A0_NOZZLE_GPIO_Port GPIOA
  53. #define A1_NOZZLE_Pin GPIO_PIN_1
  54. #define A1_NOZZLE_GPIO_Port GPIOA
  55. #define A4_ADC_12V_Pin GPIO_PIN_4
  56. #define A4_ADC_12V_GPIO_Port GPIOA
  57. #define A7_NOZZLE_Pin GPIO_PIN_7
  58. #define A7_NOZZLE_GPIO_Port GPIOA
  59. #define B0_ADC_FMU_5V_Pin GPIO_PIN_0
  60. #define B0_ADC_FMU_5V_GPIO_Port GPIOB
  61. #define B1_ADC_BATTER_Pin GPIO_PIN_1
  62. #define B1_ADC_BATTER_GPIO_Port GPIOB
  63. #define A6_NOZZLE_Pin GPIO_PIN_6
  64. #define A6_NOZZLE_GPIO_Port GPIOC
  65. #define C9_CAN2_ENABLE_Pin GPIO_PIN_9
  66. #define C9_CAN2_ENABLE_GPIO_Port GPIOC
  67. #define A8_LIQUID_Pin GPIO_PIN_8
  68. #define A8_LIQUID_GPIO_Port GPIOA
  69. #define A9_FMU_USART_Pin GPIO_PIN_9
  70. #define A9_FMU_USART_GPIO_Port GPIOA
  71. #define A10_FMU_USART_Pin GPIO_PIN_10
  72. #define A10_FMU_USART_GPIO_Port GPIOA
  73. #define C10_LED_B_Pin GPIO_PIN_10
  74. #define C10_LED_B_GPIO_Port GPIOC
  75. #define C11_LED_R_Pin GPIO_PIN_11
  76. #define C11_LED_R_GPIO_Port GPIOC
  77. #define C10_LED_G_Pin GPIO_PIN_12
  78. #define C10_LED_G_GPIO_Port GPIOC
  79. #define B6_NOZZLE_Pin GPIO_PIN_6
  80. #define B6_NOZZLE_GPIO_Port GPIOB
  81. #define B7_NOZZLE_Pin GPIO_PIN_7
  82. #define B7_NOZZLE_GPIO_Port GPIOB
  83. #define B8_CAN1_Pin GPIO_PIN_8
  84. #define B8_CAN1_GPIO_Port GPIOB
  85. #define B9_CAN1_Pin GPIO_PIN_9
  86. #define B9_CAN1_GPIO_Port GPIOB
  87. /* USER CODE BEGIN Private defines */
  88. /* USER CODE END Private defines */
  89. #ifdef __cplusplus
  90. }
  91. #endif
  92. #endif /* __MAIN_H */