main.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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. * <h2><center>&copy; Copyright (c) 2021 STMicroelectronics.
  11. * All rights reserved.</center></h2>
  12. *
  13. * This software component is licensed by ST under Ultimate Liberty license
  14. * SLA0044, the "License"; You may not use this file except in compliance with
  15. * the License. You may obtain a copy of the License at:
  16. * www.st.com/SLA0044
  17. *
  18. ******************************************************************************
  19. */
  20. /* USER CODE END Header */
  21. /* Define to prevent recursive inclusion -------------------------------------*/
  22. #ifndef __MAIN_H
  23. #define __MAIN_H
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. /* Includes ------------------------------------------------------------------*/
  28. #include "stm32wbxx_hal.h"
  29. #include "stm32wbxx_ll_i2c.h"
  30. #include "stm32wbxx_ll_crs.h"
  31. #include "stm32wbxx_ll_rcc.h"
  32. #include "stm32wbxx_ll_bus.h"
  33. #include "stm32wbxx_ll_system.h"
  34. #include "stm32wbxx_ll_exti.h"
  35. #include "stm32wbxx_ll_cortex.h"
  36. #include "stm32wbxx_ll_utils.h"
  37. #include "stm32wbxx_ll_pwr.h"
  38. #include "stm32wbxx_ll_dma.h"
  39. #include "stm32wbxx_ll_usart.h"
  40. #include "stm32wbxx_ll_gpio.h"
  41. /* Private includes ----------------------------------------------------------*/
  42. /* USER CODE BEGIN Includes */
  43. /* USER CODE END Includes */
  44. /* Exported types ------------------------------------------------------------*/
  45. /* USER CODE BEGIN ET */
  46. /* USER CODE END ET */
  47. /* Exported constants --------------------------------------------------------*/
  48. /* USER CODE BEGIN EC */
  49. /* USER CODE END EC */
  50. /* Exported macro ------------------------------------------------------------*/
  51. /* USER CODE BEGIN EM */
  52. /* USER CODE END EM */
  53. /* Exported functions prototypes ---------------------------------------------*/
  54. void Error_Handler(void);
  55. /* USER CODE BEGIN EFP */
  56. /* USER CODE END EFP */
  57. /* Private defines -----------------------------------------------------------*/
  58. #define BUTTON_BACK_Pin GPIO_PIN_13
  59. #define BUTTON_BACK_GPIO_Port GPIOC
  60. #define BUTTON_BACK_EXTI_IRQn EXTI15_10_IRQn
  61. #define QUARTZ_32MHZ_IN_Pin GPIO_PIN_14
  62. #define QUARTZ_32MHZ_IN_GPIO_Port GPIOC
  63. #define QUARTZ_32MHZ_OUT_Pin GPIO_PIN_15
  64. #define QUARTZ_32MHZ_OUT_GPIO_Port GPIOC
  65. #define BUTTON_OK_Pin GPIO_PIN_3
  66. #define BUTTON_OK_GPIO_Port GPIOH
  67. #define BUTTON_OK_EXTI_IRQn EXTI3_IRQn
  68. #define SPEAKER_Pin GPIO_PIN_8
  69. #define SPEAKER_GPIO_Port GPIOB
  70. #define IR_TX_Pin GPIO_PIN_9
  71. #define IR_TX_GPIO_Port GPIOB
  72. #define PC0_Pin GPIO_PIN_0
  73. #define PC0_GPIO_Port GPIOC
  74. #define PC1_Pin GPIO_PIN_1
  75. #define PC1_GPIO_Port GPIOC
  76. #define SPI_D_MISO_Pin GPIO_PIN_2
  77. #define SPI_D_MISO_GPIO_Port GPIOC
  78. #define PC3_Pin GPIO_PIN_3
  79. #define PC3_GPIO_Port GPIOC
  80. #define IR_RX_Pin GPIO_PIN_0
  81. #define IR_RX_GPIO_Port GPIOA
  82. #define CC1101_G0_Pin GPIO_PIN_1
  83. #define CC1101_G0_GPIO_Port GPIOA
  84. #define RFID_PULL_Pin GPIO_PIN_2
  85. #define RFID_PULL_GPIO_Port GPIOA
  86. #define PERIPH_POWER_Pin GPIO_PIN_3
  87. #define PERIPH_POWER_GPIO_Port GPIOA
  88. #define PA4_Pin GPIO_PIN_4
  89. #define PA4_GPIO_Port GPIOA
  90. #define SPI_R_SCK_Pin GPIO_PIN_5
  91. #define SPI_R_SCK_GPIO_Port GPIOA
  92. #define PA6_Pin GPIO_PIN_6
  93. #define PA6_GPIO_Port GPIOA
  94. #define PA7_Pin GPIO_PIN_7
  95. #define PA7_GPIO_Port GPIOA
  96. #define VIBRO_Pin GPIO_PIN_8
  97. #define VIBRO_GPIO_Port GPIOA
  98. #define I2C_SCL_Pin GPIO_PIN_9
  99. #define I2C_SCL_GPIO_Port GPIOA
  100. #define RF_SW_0_Pin GPIO_PIN_4
  101. #define RF_SW_0_GPIO_Port GPIOC
  102. #define RFID_RF_IN_Pin GPIO_PIN_5
  103. #define RFID_RF_IN_GPIO_Port GPIOC
  104. #define PB2_Pin GPIO_PIN_2
  105. #define PB2_GPIO_Port GPIOB
  106. #define BUTTON_UP_Pin GPIO_PIN_10
  107. #define BUTTON_UP_GPIO_Port GPIOB
  108. #define BUTTON_UP_EXTI_IRQn EXTI15_10_IRQn
  109. #define BUTTON_LEFT_Pin GPIO_PIN_11
  110. #define BUTTON_LEFT_GPIO_Port GPIOB
  111. #define BUTTON_LEFT_EXTI_IRQn EXTI15_10_IRQn
  112. #define DISPLAY_RST_Pin GPIO_PIN_0
  113. #define DISPLAY_RST_GPIO_Port GPIOB
  114. #define DISPLAY_DI_Pin GPIO_PIN_1
  115. #define DISPLAY_DI_GPIO_Port GPIOB
  116. #define NFC_CS_Pin GPIO_PIN_4
  117. #define NFC_CS_GPIO_Port GPIOE
  118. #define BUTTON_RIGHT_Pin GPIO_PIN_12
  119. #define BUTTON_RIGHT_GPIO_Port GPIOB
  120. #define BUTTON_RIGHT_EXTI_IRQn EXTI15_10_IRQn
  121. #define RFID_OUT_Pin GPIO_PIN_13
  122. #define RFID_OUT_GPIO_Port GPIOB
  123. #define iBTN_Pin GPIO_PIN_14
  124. #define iBTN_GPIO_Port GPIOB
  125. #define SPI_D_MOSI_Pin GPIO_PIN_15
  126. #define SPI_D_MOSI_GPIO_Port GPIOB
  127. #define BUTTON_DOWN_Pin GPIO_PIN_6
  128. #define BUTTON_DOWN_GPIO_Port GPIOC
  129. #define I2C_SDA_Pin GPIO_PIN_10
  130. #define I2C_SDA_GPIO_Port GPIOA
  131. #define RFID_CARRIER_Pin GPIO_PIN_15
  132. #define RFID_CARRIER_GPIO_Port GPIOA
  133. #define SD_CD_Pin GPIO_PIN_10
  134. #define SD_CD_GPIO_Port GPIOC
  135. #define DISPLAY_CS_Pin GPIO_PIN_11
  136. #define DISPLAY_CS_GPIO_Port GPIOC
  137. #define SD_CS_Pin GPIO_PIN_12
  138. #define SD_CS_GPIO_Port GPIOC
  139. #define CC1101_CS_Pin GPIO_PIN_0
  140. #define CC1101_CS_GPIO_Port GPIOD
  141. #define SPI_D_SCK_Pin GPIO_PIN_1
  142. #define SPI_D_SCK_GPIO_Port GPIOD
  143. #define PB3_Pin GPIO_PIN_3
  144. #define PB3_GPIO_Port GPIOB
  145. #define SPI_R_MISO_Pin GPIO_PIN_4
  146. #define SPI_R_MISO_GPIO_Port GPIOB
  147. #define SPI_R_MOSI_Pin GPIO_PIN_5
  148. #define SPI_R_MOSI_GPIO_Port GPIOB
  149. /* USER CODE BEGIN Private defines */
  150. /* USER CODE END Private defines */
  151. #ifdef __cplusplus
  152. }
  153. #endif
  154. #endif /* __MAIN_H */
  155. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/