main.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 "stm32l4xx_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 B1_Pin GPIO_PIN_13
  47. #define B1_GPIO_Port GPIOC
  48. #define LD3_Pin GPIO_PIN_14
  49. #define LD3_GPIO_Port GPIOB
  50. #define USB_OverCurrent_Pin GPIO_PIN_5
  51. #define USB_OverCurrent_GPIO_Port GPIOG
  52. #define USB_PowerSwitchOn_Pin GPIO_PIN_6
  53. #define USB_PowerSwitchOn_GPIO_Port GPIOG
  54. #define STLK_RX_Pin GPIO_PIN_7
  55. #define STLK_RX_GPIO_Port GPIOG
  56. #define STLK_TX_Pin GPIO_PIN_8
  57. #define STLK_TX_GPIO_Port GPIOG
  58. #define USB_SOF_Pin GPIO_PIN_8
  59. #define USB_SOF_GPIO_Port GPIOA
  60. #define USB_VBUS_Pin GPIO_PIN_9
  61. #define USB_VBUS_GPIO_Port GPIOA
  62. #define USB_ID_Pin GPIO_PIN_10
  63. #define USB_ID_GPIO_Port GPIOA
  64. #define USB_DM_Pin GPIO_PIN_11
  65. #define USB_DM_GPIO_Port GPIOA
  66. #define USB_DP_Pin GPIO_PIN_12
  67. #define USB_DP_GPIO_Port GPIOA
  68. #define TMS_Pin GPIO_PIN_13
  69. #define TMS_GPIO_Port GPIOA
  70. #define TCK_Pin GPIO_PIN_14
  71. #define TCK_GPIO_Port GPIOA
  72. #define SWO_Pin GPIO_PIN_3
  73. #define SWO_GPIO_Port GPIOB
  74. #define LD2_Pin GPIO_PIN_7
  75. #define LD2_GPIO_Port GPIOB
  76. /* USER CODE BEGIN Private defines */
  77. /* USER CODE END Private defines */
  78. #ifdef __cplusplus
  79. }
  80. #endif
  81. #endif /* __MAIN_H */
  82. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/