main.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 "stm32wlxx_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. /**
  45. * @brief This function is executed in case of error occurrence.
  46. * @param None
  47. * @retval None
  48. */
  49. void Error_Handler(void);
  50. /* USER CODE END EFP */
  51. /* Private defines -----------------------------------------------------------*/
  52. #define LED1_Pin GPIO_PIN_15
  53. #define LED1_GPIO_Port GPIOB
  54. #define LED2_Pin GPIO_PIN_9
  55. #define LED2_GPIO_Port GPIOB
  56. #define BUT1_Pin GPIO_PIN_0
  57. #define BUT1_GPIO_Port GPIOA
  58. #define BUT3_Pin GPIO_PIN_6
  59. #define BUT3_GPIO_Port GPIOC
  60. #define BUT2_Pin GPIO_PIN_1
  61. #define BUT2_GPIO_Port GPIOA
  62. #define LED3_Pin GPIO_PIN_11
  63. #define LED3_GPIO_Port GPIOB
  64. /* USER CODE BEGIN Private defines */
  65. /* USER CODE END Private defines */
  66. #ifdef __cplusplus
  67. }
  68. #endif
  69. #endif /* __MAIN_H */
  70. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/