main.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. * Copyright (c) 2022 STMicroelectronics.
  11. * All rights reserved.
  12. *
  13. * This software is licensed under terms that can be found in the LICENSE file
  14. * in the root directory of this software component.
  15. * If no LICENSE file comes with this software, it is provided AS-IS.
  16. *
  17. ******************************************************************************
  18. */
  19. /* USER CODE END Header */
  20. /* Define to prevent recursive inclusion -------------------------------------*/
  21. #ifndef __MAIN_H
  22. #define __MAIN_H
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. /* Includes ------------------------------------------------------------------*/
  27. #include "stm32h7xx_ll_rcc.h"
  28. #include "stm32h7xx_ll_crs.h"
  29. #include "stm32h7xx_ll_bus.h"
  30. #include "stm32h7xx_ll_system.h"
  31. #include "stm32h7xx_ll_exti.h"
  32. #include "stm32h7xx_ll_cortex.h"
  33. #include "stm32h7xx_ll_utils.h"
  34. #include "stm32h7xx_ll_pwr.h"
  35. #include "stm32h7xx_ll_dma.h"
  36. #include "stm32h7xx_ll_gpio.h"
  37. #if defined(USE_FULL_ASSERT)
  38. #include "stm32_assert.h"
  39. #endif /* USE_FULL_ASSERT */
  40. /* Private includes ----------------------------------------------------------*/
  41. /* USER CODE BEGIN Includes */
  42. /* USER CODE END Includes */
  43. /* Exported types ------------------------------------------------------------*/
  44. /* USER CODE BEGIN ET */
  45. /* USER CODE END ET */
  46. /* Exported constants --------------------------------------------------------*/
  47. /* USER CODE BEGIN EC */
  48. /* USER CODE END EC */
  49. /* Exported macro ------------------------------------------------------------*/
  50. /* USER CODE BEGIN EM */
  51. /* USER CODE END EM */
  52. /* Exported functions prototypes ---------------------------------------------*/
  53. void Error_Handler(void);
  54. /* USER CODE BEGIN EFP */
  55. /* USER CODE END EFP */
  56. /* Private defines -----------------------------------------------------------*/
  57. #define B1_Pin LL_GPIO_PIN_13
  58. #define B1_GPIO_Port GPIOC
  59. #define LD1_Pin LL_GPIO_PIN_0
  60. #define LD1_GPIO_Port GPIOB
  61. #define LD3_Pin LL_GPIO_PIN_14
  62. #define LD3_GPIO_Port GPIOB
  63. #define STLINK_RX_Pin LL_GPIO_PIN_8
  64. #define STLINK_RX_GPIO_Port GPIOD
  65. #define STLINK_TX_Pin LL_GPIO_PIN_9
  66. #define STLINK_TX_GPIO_Port GPIOD
  67. #define LD2_Pin LL_GPIO_PIN_1
  68. #define LD2_GPIO_Port GPIOE
  69. #ifndef NVIC_PRIORITYGROUP_0
  70. #define NVIC_PRIORITYGROUP_0 ((uint32_t)0x00000007) /*!< 0 bit for pre-emption priority,
  71. 4 bits for subpriority */
  72. #define NVIC_PRIORITYGROUP_1 ((uint32_t)0x00000006) /*!< 1 bit for pre-emption priority,
  73. 3 bits for subpriority */
  74. #define NVIC_PRIORITYGROUP_2 ((uint32_t)0x00000005) /*!< 2 bits for pre-emption priority,
  75. 2 bits for subpriority */
  76. #define NVIC_PRIORITYGROUP_3 ((uint32_t)0x00000004) /*!< 3 bits for pre-emption priority,
  77. 1 bit for subpriority */
  78. #define NVIC_PRIORITYGROUP_4 ((uint32_t)0x00000003) /*!< 4 bits for pre-emption priority,
  79. 0 bit for subpriority */
  80. #endif
  81. /* USER CODE BEGIN Private defines */
  82. //void SystemClock_Config(void);
  83. /* USER CODE END Private defines */
  84. #ifdef __cplusplus
  85. }
  86. #endif
  87. #endif /* __MAIN_H */