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. * <h2><center>&copy; Copyright (c) 2020 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 "stm32f1xx_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 AD_DIN_Pin GPIO_PIN_0
  47. #define AD_DIN_GPIO_Port GPIOC
  48. #define AD_CS_Pin GPIO_PIN_1
  49. #define AD_CS_GPIO_Port GPIOC
  50. #define AD_CLK_Pin GPIO_PIN_2
  51. #define AD_CLK_GPIO_Port GPIOC
  52. #define pwr_Pin GPIO_PIN_5
  53. #define pwr_GPIO_Port GPIOC
  54. #define B4_Pin GPIO_PIN_12
  55. #define B4_GPIO_Port GPIOB
  56. #define B3_Pin GPIO_PIN_13
  57. #define B3_GPIO_Port GPIOB
  58. #define B2_Pin GPIO_PIN_14
  59. #define B2_GPIO_Port GPIOB
  60. #define B1_Pin GPIO_PIN_15
  61. #define B1_GPIO_Port GPIOB
  62. #define beep_Pin GPIO_PIN_6
  63. #define beep_GPIO_Port GPIOC
  64. #define led_Pin GPIO_PIN_7
  65. #define led_GPIO_Port GPIOC
  66. #define alarm_Pin GPIO_PIN_8
  67. #define alarm_GPIO_Port GPIOC
  68. #define pwr_lock_Pin GPIO_PIN_9
  69. #define pwr_lock_GPIO_Port GPIOC
  70. #define ble_c_Pin GPIO_PIN_8
  71. #define ble_c_GPIO_Port GPIOA
  72. #define output1_Pin GPIO_PIN_6
  73. #define output1_GPIO_Port GPIOB
  74. #define output2_Pin GPIO_PIN_7
  75. #define output2_GPIO_Port GPIOB
  76. #define AD_DOUT_Pin GPIO_PIN_8
  77. #define AD_DOUT_GPIO_Port GPIOB
  78. #define AD_SYNC_Pin GPIO_PIN_9
  79. #define AD_SYNC_GPIO_Port GPIOB
  80. /* USER CODE BEGIN Private defines */
  81. /* USER CODE END Private defines */
  82. #ifdef __cplusplus
  83. }
  84. #endif
  85. #endif /* __MAIN_H */
  86. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/