main.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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 "stm32f1xx_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. /* Exported functions prototypes ---------------------------------------------*/
  41. void Error_Handler(void);
  42. /* USER CODE BEGIN EFP */
  43. /* USER CODE END EFP */
  44. /* Private defines -----------------------------------------------------------*/
  45. #define SYSLED_Pin GPIO_PIN_0
  46. #define SYSLED_GPIO_Port GPIOA
  47. #define RS485_EN_Pin GPIO_PIN_1
  48. #define RS485_EN_GPIO_Port GPIOA
  49. #define FAN_Pin GPIO_PIN_6
  50. #define FAN_GPIO_Port GPIOA
  51. #define MS_DIR_Pin GPIO_PIN_0
  52. #define MS_DIR_GPIO_Port GPIOB
  53. #define NTC_Pin GPIO_PIN_1
  54. #define NTC_GPIO_Port GPIOB
  55. #define SEL_D_Pin GPIO_PIN_12
  56. #define SEL_D_GPIO_Port GPIOB
  57. #define SEL_C_Pin GPIO_PIN_13
  58. #define SEL_C_GPIO_Port GPIOB
  59. #define SEL_B_Pin GPIO_PIN_14
  60. #define SEL_B_GPIO_Port GPIOB
  61. #define SEL_A_Pin GPIO_PIN_15
  62. #define SEL_A_GPIO_Port GPIOB
  63. #define MS_STEP_Pin GPIO_PIN_8
  64. #define MS_STEP_GPIO_Port GPIOA
  65. #define MS_INDEX_Pin GPIO_PIN_9
  66. #define MS_INDEX_GPIO_Port GPIOA
  67. #define MS_INDEX_EXTI_IRQn EXTI9_5_IRQn
  68. #define MS_DIAG_Pin GPIO_PIN_10
  69. #define MS_DIAG_GPIO_Port GPIOA
  70. #define MS_DIAG_EXTI_IRQn EXTI15_10_IRQn
  71. #define MS_MS2_Pin GPIO_PIN_11
  72. #define MS_MS2_GPIO_Port GPIOA
  73. #define MS_MS1_Pin GPIO_PIN_12
  74. #define MS_MS1_GPIO_Port GPIOA
  75. #define SPI1_NSS_Pin GPIO_PIN_15
  76. #define SPI1_NSS_GPIO_Port GPIOA
  77. #define MS_SP_Pin GPIO_PIN_6
  78. #define MS_SP_GPIO_Port GPIOB
  79. #define MS_EN_Pin GPIO_PIN_7
  80. #define MS_EN_GPIO_Port GPIOB
  81. /* USER CODE BEGIN Private defines */
  82. /* USER CODE END Private defines */
  83. #ifdef __cplusplus
  84. }
  85. #endif
  86. #endif /* __MAIN_H */