main.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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 BSD 3-Clause license,
  14. * the "License"; You may not use this file except in compliance with the
  15. * License. You may obtain a copy of the License at:
  16. * opensource.org/licenses/BSD-3-Clause
  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 "stm32f3xx_hal.h"
  29. /* Private includes ----------------------------------------------------------*/
  30. /* USER CODE BEGIN Includes */
  31. /* USER CODE END Includes */
  32. /* Exported types ------------------------------------------------------------*/
  33. /* USER CODE BEGIN ET */
  34. /* USER CODE END ET */
  35. /* Exported constants --------------------------------------------------------*/
  36. /* USER CODE BEGIN EC */
  37. /* USER CODE END EC */
  38. /* Exported macro ------------------------------------------------------------*/
  39. /* USER CODE BEGIN EM */
  40. /* USER CODE END EM */
  41. /* Exported functions prototypes ---------------------------------------------*/
  42. void Error_Handler(void);
  43. /* USER CODE BEGIN EFP */
  44. /* USER CODE END EFP */
  45. /* Private defines -----------------------------------------------------------*/
  46. #define DRDY_Pin GPIO_PIN_2
  47. #define DRDY_GPIO_Port GPIOE
  48. #define CS_I2C_SPI_Pin GPIO_PIN_3
  49. #define CS_I2C_SPI_GPIO_Port GPIOE
  50. #define MEMS_INT3_Pin GPIO_PIN_4
  51. #define MEMS_INT3_GPIO_Port GPIOE
  52. #define MEMS_INT4_Pin GPIO_PIN_5
  53. #define MEMS_INT4_GPIO_Port GPIOE
  54. #define OSC32_IN_Pin GPIO_PIN_14
  55. #define OSC32_IN_GPIO_Port GPIOC
  56. #define OSC32_OUT_Pin GPIO_PIN_15
  57. #define OSC32_OUT_GPIO_Port GPIOC
  58. #define OSC_IN_Pin GPIO_PIN_0
  59. #define OSC_IN_GPIO_Port GPIOF
  60. #define OSC_OUT_Pin GPIO_PIN_1
  61. #define OSC_OUT_GPIO_Port GPIOF
  62. #define B1_Pin GPIO_PIN_0
  63. #define B1_GPIO_Port GPIOA
  64. #define SPI1_SCK_Pin GPIO_PIN_5
  65. #define SPI1_SCK_GPIO_Port GPIOA
  66. #define SPI1_MISO_Pin GPIO_PIN_6
  67. #define SPI1_MISO_GPIO_Port GPIOA
  68. #define SPI1_MISOA7_Pin GPIO_PIN_7
  69. #define SPI1_MISOA7_GPIO_Port GPIOA
  70. #define LD4_Pin GPIO_PIN_8
  71. #define LD4_GPIO_Port GPIOE
  72. #define LD3_Pin GPIO_PIN_9
  73. #define LD3_GPIO_Port GPIOE
  74. #define LD5_Pin GPIO_PIN_10
  75. #define LD5_GPIO_Port GPIOE
  76. #define LD7_Pin GPIO_PIN_11
  77. #define LD7_GPIO_Port GPIOE
  78. #define LD9_Pin GPIO_PIN_12
  79. #define LD9_GPIO_Port GPIOE
  80. #define LD10_Pin GPIO_PIN_13
  81. #define LD10_GPIO_Port GPIOE
  82. #define LD8_Pin GPIO_PIN_14
  83. #define LD8_GPIO_Port GPIOE
  84. #define LD6_Pin GPIO_PIN_15
  85. #define LD6_GPIO_Port GPIOE
  86. #define SWDIO_Pin GPIO_PIN_13
  87. #define SWDIO_GPIO_Port GPIOA
  88. #define SWCLK_Pin GPIO_PIN_14
  89. #define SWCLK_GPIO_Port GPIOA
  90. #define SWO_Pin GPIO_PIN_3
  91. #define SWO_GPIO_Port GPIOB
  92. #define I2C1_SCL_Pin GPIO_PIN_6
  93. #define I2C1_SCL_GPIO_Port GPIOB
  94. #define I2C1_SDA_Pin GPIO_PIN_7
  95. #define I2C1_SDA_GPIO_Port GPIOB
  96. #define MEMS_INT1_Pin GPIO_PIN_0
  97. #define MEMS_INT1_GPIO_Port GPIOE
  98. #define MEMS_INT2_Pin GPIO_PIN_1
  99. #define MEMS_INT2_GPIO_Port GPIOE
  100. /* USER CODE BEGIN Private defines */
  101. /* USER CODE END Private defines */
  102. #ifdef __cplusplus
  103. }
  104. #endif
  105. #endif /* __MAIN_H */
  106. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/