main.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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) 2019 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 "stm32g4xx_hal.h"
  29. #include "stm32g4xx_ll_pwr.h"
  30. /* Private includes ----------------------------------------------------------*/
  31. /* USER CODE BEGIN Includes */
  32. /* USER CODE END Includes */
  33. /* Exported types ------------------------------------------------------------*/
  34. /* USER CODE BEGIN ET */
  35. /* USER CODE END ET */
  36. /* Exported constants --------------------------------------------------------*/
  37. /* USER CODE BEGIN EC */
  38. /* USER CODE END EC */
  39. /* Exported macro ------------------------------------------------------------*/
  40. /* USER CODE BEGIN EM */
  41. /* USER CODE END EM */
  42. /* Exported functions prototypes ---------------------------------------------*/
  43. void Error_Handler(void);
  44. /* USER CODE BEGIN EFP */
  45. /* USER CODE END EFP */
  46. /* Private defines -----------------------------------------------------------*/
  47. #define B1_Pin GPIO_PIN_13
  48. #define B1_GPIO_Port GPIOC
  49. #define LD2_Pin GPIO_PIN_5
  50. #define LD2_GPIO_Port GPIOA
  51. #define USART1_TX_Pin GPIO_PIN_4
  52. #define USART1_TX_GPIO_Port GPIOC
  53. #define USART1_RX_Pin GPIO_PIN_5
  54. #define USART1_RX_GPIO_Port GPIOC
  55. #define T_SWDIO_Pin GPIO_PIN_13
  56. #define T_SWDIO_GPIO_Port GPIOA
  57. #define T_SWCLK_Pin GPIO_PIN_14
  58. #define T_SWCLK_GPIO_Port GPIOA
  59. #define T_SWO_Pin GPIO_PIN_3
  60. #define T_SWO_GPIO_Port GPIOB
  61. /* USER CODE BEGIN Private defines */
  62. /* USER CODE END Private defines */
  63. #ifdef __cplusplus
  64. }
  65. #endif
  66. #endif /* __MAIN_H */
  67. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/