main.h 3.0 KB

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