main.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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) 2022 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 "stm32l4xx_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 J2_Pin GPIO_PIN_13
  46. #define J2_GPIO_Port GPIOC
  47. #define J1_Pin GPIO_PIN_14
  48. #define J1_GPIO_Port GPIOC
  49. #define Point_Pin GPIO_PIN_2
  50. #define Point_GPIO_Port GPIOC
  51. #define Di3_Pin GPIO_PIN_0
  52. #define Di3_GPIO_Port GPIOA
  53. #define Di2_Pin GPIO_PIN_1
  54. #define Di2_GPIO_Port GPIOA
  55. #define Di1_Pin GPIO_PIN_2
  56. #define Di1_GPIO_Port GPIOA
  57. #define J8_Pin GPIO_PIN_3
  58. #define J8_GPIO_Port GPIOA
  59. #define D0_Pin GPIO_PIN_4
  60. #define D0_GPIO_Port GPIOA
  61. #define D3_Pin GPIO_PIN_5
  62. #define D3_GPIO_Port GPIOA
  63. #define Latch_Pin GPIO_PIN_6
  64. #define Latch_GPIO_Port GPIOA
  65. #define EN_Pin GPIO_PIN_7
  66. #define EN_GPIO_Port GPIOA
  67. #define D2_Pin GPIO_PIN_4
  68. #define D2_GPIO_Port GPIOC
  69. #define D1_Pin GPIO_PIN_5
  70. #define D1_GPIO_Port GPIOC
  71. #define Bout2_Pin GPIO_PIN_0
  72. #define Bout2_GPIO_Port GPIOB
  73. #define J7_Pin GPIO_PIN_1
  74. #define J7_GPIO_Port GPIOB
  75. #define J6_Pin GPIO_PIN_2
  76. #define J6_GPIO_Port GPIOB
  77. #define J5_Pin GPIO_PIN_12
  78. #define J5_GPIO_Port GPIOB
  79. #define J4_Pin GPIO_PIN_12
  80. #define J4_GPIO_Port GPIOC
  81. #define J3_Pin GPIO_PIN_2
  82. #define J3_GPIO_Port GPIOD
  83. #define Bout1_Pin GPIO_PIN_3
  84. #define Bout1_GPIO_Port GPIOB
  85. #define WC_Pin GPIO_PIN_4
  86. #define WC_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 */