main.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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 "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. /* 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 SPI1_LED_Pin GPIO_PIN_4
  46. #define SPI1_LED_GPIO_Port GPIOA
  47. #define SPI1_DC_Pin GPIO_PIN_0
  48. #define SPI1_DC_GPIO_Port GPIOB
  49. #define SPI1_CS_Pin GPIO_PIN_1
  50. #define SPI1_CS_GPIO_Port GPIOB
  51. #define SP1_RESET_Pin GPIO_PIN_2
  52. #define SP1_RESET_GPIO_Port GPIOB
  53. #define SPI2_CS_Pin GPIO_PIN_12
  54. #define SPI2_CS_GPIO_Port GPIOB
  55. #define SPEAK_Pin GPIO_PIN_13
  56. #define SPEAK_GPIO_Port GPIOB
  57. #define BTN_T_Pin GPIO_PIN_9
  58. #define BTN_T_GPIO_Port GPIOA
  59. #define BTN_T_EXTI_IRQn EXTI9_5_IRQn
  60. #define BTN__Pin GPIO_PIN_10
  61. #define BTN__GPIO_Port GPIOA
  62. #define BTN__EXTI_IRQn EXTI15_10_IRQn
  63. #define BTN_A11_Pin GPIO_PIN_11
  64. #define BTN_A11_GPIO_Port GPIOA
  65. #define BTN_A11_EXTI_IRQn EXTI15_10_IRQn
  66. #define BTN_S_S_Pin GPIO_PIN_12
  67. #define BTN_S_S_GPIO_Port GPIOA
  68. #define BTN_S_S_EXTI_IRQn EXTI15_10_IRQn
  69. /* USER CODE BEGIN Private defines */
  70. /* USER CODE END Private defines */
  71. #ifdef __cplusplus
  72. }
  73. #endif
  74. #endif /* __MAIN_H */