stm32h7xx_hal_msp.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * @file stm32h7xx_hal_msp.c
  5. * @brief This file provides code for the MSP Initialization
  6. * and de-Initialization codes.
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * Copyright (c) 2024 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. /* Includes ------------------------------------------------------------------*/
  21. #include "main.h"
  22. /* USER CODE BEGIN Includes */
  23. /* USER CODE END Includes */
  24. extern DMA_HandleTypeDef hdma_uart8_rx;
  25. extern DMA_HandleTypeDef hdma_uart8_tx;
  26. /* Private typedef -----------------------------------------------------------*/
  27. /* USER CODE BEGIN TD */
  28. /* USER CODE END TD */
  29. /* Private define ------------------------------------------------------------*/
  30. /* USER CODE BEGIN Define */
  31. /* USER CODE END Define */
  32. /* Private macro -------------------------------------------------------------*/
  33. /* USER CODE BEGIN Macro */
  34. /* USER CODE END Macro */
  35. /* Private variables ---------------------------------------------------------*/
  36. /* USER CODE BEGIN PV */
  37. /* USER CODE END PV */
  38. /* Private function prototypes -----------------------------------------------*/
  39. /* USER CODE BEGIN PFP */
  40. /* USER CODE END PFP */
  41. /* External functions --------------------------------------------------------*/
  42. /* USER CODE BEGIN ExternalFunctions */
  43. /* USER CODE END ExternalFunctions */
  44. /* USER CODE BEGIN 0 */
  45. /* USER CODE END 0 */
  46. /**
  47. * Initializes the Global MSP.
  48. */
  49. void HAL_MspInit(void)
  50. {
  51. /* USER CODE BEGIN MspInit 0 */
  52. /* USER CODE END MspInit 0 */
  53. PWREx_AVDTypeDef sConfigAVD = {0};
  54. PWR_PVDTypeDef sConfigPVD = {0};
  55. __HAL_RCC_SYSCFG_CLK_ENABLE();
  56. /* System interrupt init*/
  57. /* PendSV_IRQn interrupt configuration */
  58. HAL_NVIC_SetPriority(PendSV_IRQn, 15, 0);
  59. /* Peripheral interrupt init */
  60. /* RCC_IRQn interrupt configuration */
  61. HAL_NVIC_SetPriority(RCC_IRQn, 5, 0);
  62. HAL_NVIC_EnableIRQ(RCC_IRQn);
  63. /** AVD Configuration
  64. */
  65. sConfigAVD.AVDLevel = PWR_AVDLEVEL_3;
  66. sConfigAVD.Mode = PWR_AVD_MODE_NORMAL;
  67. HAL_PWREx_ConfigAVD(&sConfigAVD);
  68. /** Enable the AVD Output
  69. */
  70. HAL_PWREx_EnableAVD();
  71. /** PVD Configuration
  72. */
  73. sConfigPVD.PVDLevel = PWR_PVDLEVEL_6;
  74. sConfigPVD.Mode = PWR_PVD_MODE_NORMAL;
  75. HAL_PWR_ConfigPVD(&sConfigPVD);
  76. /** Enable the PVD Output
  77. */
  78. HAL_PWR_EnablePVD();
  79. /* USER CODE BEGIN MspInit 1 */
  80. /* USER CODE END MspInit 1 */
  81. }
  82. /**
  83. * @brief CRC MSP Initialization
  84. * This function configures the hardware resources used in this example
  85. * @param hcrc: CRC handle pointer
  86. * @retval None
  87. */
  88. void HAL_CRC_MspInit(CRC_HandleTypeDef* hcrc)
  89. {
  90. if(hcrc->Instance==CRC)
  91. {
  92. /* USER CODE BEGIN CRC_MspInit 0 */
  93. /* USER CODE END CRC_MspInit 0 */
  94. /* Peripheral clock enable */
  95. __HAL_RCC_CRC_CLK_ENABLE();
  96. /* USER CODE BEGIN CRC_MspInit 1 */
  97. /* USER CODE END CRC_MspInit 1 */
  98. }
  99. }
  100. /**
  101. * @brief CRC MSP De-Initialization
  102. * This function freeze the hardware resources used in this example
  103. * @param hcrc: CRC handle pointer
  104. * @retval None
  105. */
  106. void HAL_CRC_MspDeInit(CRC_HandleTypeDef* hcrc)
  107. {
  108. if(hcrc->Instance==CRC)
  109. {
  110. /* USER CODE BEGIN CRC_MspDeInit 0 */
  111. /* USER CODE END CRC_MspDeInit 0 */
  112. /* Peripheral clock disable */
  113. __HAL_RCC_CRC_CLK_DISABLE();
  114. /* USER CODE BEGIN CRC_MspDeInit 1 */
  115. /* USER CODE END CRC_MspDeInit 1 */
  116. }
  117. }
  118. /**
  119. * @brief RNG MSP Initialization
  120. * This function configures the hardware resources used in this example
  121. * @param hrng: RNG handle pointer
  122. * @retval None
  123. */
  124. void HAL_RNG_MspInit(RNG_HandleTypeDef* hrng)
  125. {
  126. RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
  127. if(hrng->Instance==RNG)
  128. {
  129. /* USER CODE BEGIN RNG_MspInit 0 */
  130. /* USER CODE END RNG_MspInit 0 */
  131. /** Initializes the peripherals clock
  132. */
  133. PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RNG;
  134. PeriphClkInitStruct.RngClockSelection = RCC_RNGCLKSOURCE_HSI48;
  135. if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
  136. {
  137. Error_Handler();
  138. }
  139. /* Peripheral clock enable */
  140. __HAL_RCC_RNG_CLK_ENABLE();
  141. /* USER CODE BEGIN RNG_MspInit 1 */
  142. /* USER CODE END RNG_MspInit 1 */
  143. }
  144. }
  145. /**
  146. * @brief RNG MSP De-Initialization
  147. * This function freeze the hardware resources used in this example
  148. * @param hrng: RNG handle pointer
  149. * @retval None
  150. */
  151. void HAL_RNG_MspDeInit(RNG_HandleTypeDef* hrng)
  152. {
  153. if(hrng->Instance==RNG)
  154. {
  155. /* USER CODE BEGIN RNG_MspDeInit 0 */
  156. /* USER CODE END RNG_MspDeInit 0 */
  157. /* Peripheral clock disable */
  158. __HAL_RCC_RNG_CLK_DISABLE();
  159. /* USER CODE BEGIN RNG_MspDeInit 1 */
  160. /* USER CODE END RNG_MspDeInit 1 */
  161. }
  162. }
  163. /**
  164. * @brief UART MSP Initialization
  165. * This function configures the hardware resources used in this example
  166. * @param huart: UART handle pointer
  167. * @retval None
  168. */
  169. void HAL_UART_MspInit(UART_HandleTypeDef* huart)
  170. {
  171. GPIO_InitTypeDef GPIO_InitStruct = {0};
  172. RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
  173. if(huart->Instance==UART8)
  174. {
  175. /* USER CODE BEGIN UART8_MspInit 0 */
  176. /* USER CODE END UART8_MspInit 0 */
  177. /** Initializes the peripherals clock
  178. */
  179. PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_UART8;
  180. PeriphClkInitStruct.Usart234578ClockSelection = RCC_USART234578CLKSOURCE_D2PCLK1;
  181. if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
  182. {
  183. Error_Handler();
  184. }
  185. /* Peripheral clock enable */
  186. __HAL_RCC_UART8_CLK_ENABLE();
  187. __HAL_RCC_GPIOE_CLK_ENABLE();
  188. /**UART8 GPIO Configuration
  189. PE0 ------> UART8_RX
  190. PE1 ------> UART8_TX
  191. */
  192. GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1;
  193. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  194. GPIO_InitStruct.Pull = GPIO_NOPULL;
  195. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  196. GPIO_InitStruct.Alternate = GPIO_AF8_UART8;
  197. HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
  198. /* UART8 DMA Init */
  199. /* UART8_RX Init */
  200. hdma_uart8_rx.Instance = DMA2_Stream7;
  201. hdma_uart8_rx.Init.Request = DMA_REQUEST_UART8_RX;
  202. hdma_uart8_rx.Init.Direction = DMA_PERIPH_TO_MEMORY;
  203. hdma_uart8_rx.Init.PeriphInc = DMA_PINC_DISABLE;
  204. hdma_uart8_rx.Init.MemInc = DMA_MINC_ENABLE;
  205. hdma_uart8_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
  206. hdma_uart8_rx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
  207. hdma_uart8_rx.Init.Mode = DMA_NORMAL;
  208. hdma_uart8_rx.Init.Priority = DMA_PRIORITY_VERY_HIGH;
  209. hdma_uart8_rx.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
  210. if (HAL_DMA_Init(&hdma_uart8_rx) != HAL_OK)
  211. {
  212. Error_Handler();
  213. }
  214. __HAL_LINKDMA(huart,hdmarx,hdma_uart8_rx);
  215. /* UART8_TX Init */
  216. hdma_uart8_tx.Instance = DMA2_Stream6;
  217. hdma_uart8_tx.Init.Request = DMA_REQUEST_UART8_TX;
  218. hdma_uart8_tx.Init.Direction = DMA_MEMORY_TO_PERIPH;
  219. hdma_uart8_tx.Init.PeriphInc = DMA_PINC_DISABLE;
  220. hdma_uart8_tx.Init.MemInc = DMA_MINC_ENABLE;
  221. hdma_uart8_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
  222. hdma_uart8_tx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
  223. hdma_uart8_tx.Init.Mode = DMA_NORMAL;
  224. hdma_uart8_tx.Init.Priority = DMA_PRIORITY_VERY_HIGH;
  225. hdma_uart8_tx.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
  226. if (HAL_DMA_Init(&hdma_uart8_tx) != HAL_OK)
  227. {
  228. Error_Handler();
  229. }
  230. __HAL_LINKDMA(huart,hdmatx,hdma_uart8_tx);
  231. /* UART8 interrupt Init */
  232. HAL_NVIC_SetPriority(UART8_IRQn, 5, 0);
  233. HAL_NVIC_EnableIRQ(UART8_IRQn);
  234. /* USER CODE BEGIN UART8_MspInit 1 */
  235. /* USER CODE END UART8_MspInit 1 */
  236. }
  237. else if(huart->Instance==USART1)
  238. {
  239. /* USER CODE BEGIN USART1_MspInit 0 */
  240. /* USER CODE END USART1_MspInit 0 */
  241. /** Initializes the peripherals clock
  242. */
  243. PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART1;
  244. PeriphClkInitStruct.Usart16ClockSelection = RCC_USART16CLKSOURCE_D2PCLK2;
  245. if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
  246. {
  247. Error_Handler();
  248. }
  249. /* Peripheral clock enable */
  250. __HAL_RCC_USART1_CLK_ENABLE();
  251. __HAL_RCC_GPIOB_CLK_ENABLE();
  252. /**USART1 GPIO Configuration
  253. PB14 ------> USART1_TX
  254. PB15 ------> USART1_RX
  255. */
  256. GPIO_InitStruct.Pin = GPIO_PIN_14|GPIO_PIN_15;
  257. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  258. GPIO_InitStruct.Pull = GPIO_NOPULL;
  259. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
  260. GPIO_InitStruct.Alternate = GPIO_AF4_USART1;
  261. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  262. /* USART1 interrupt Init */
  263. HAL_NVIC_SetPriority(USART1_IRQn, 5, 0);
  264. HAL_NVIC_EnableIRQ(USART1_IRQn);
  265. /* USER CODE BEGIN USART1_MspInit 1 */
  266. /* USER CODE END USART1_MspInit 1 */
  267. }
  268. else if(huart->Instance==USART2)
  269. {
  270. /* USER CODE BEGIN USART2_MspInit 0 */
  271. /* USER CODE END USART2_MspInit 0 */
  272. /** Initializes the peripherals clock
  273. */
  274. PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART2;
  275. PeriphClkInitStruct.Usart234578ClockSelection = RCC_USART234578CLKSOURCE_D2PCLK1;
  276. if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
  277. {
  278. Error_Handler();
  279. }
  280. /* Peripheral clock enable */
  281. __HAL_RCC_USART2_CLK_ENABLE();
  282. __HAL_RCC_GPIOD_CLK_ENABLE();
  283. /**USART2 GPIO Configuration
  284. PD5 ------> USART2_TX
  285. PD6 ------> USART2_RX
  286. */
  287. GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6;
  288. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  289. GPIO_InitStruct.Pull = GPIO_NOPULL;
  290. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
  291. GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
  292. HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
  293. /* USART2 interrupt Init */
  294. HAL_NVIC_SetPriority(USART2_IRQn, 5, 0);
  295. HAL_NVIC_EnableIRQ(USART2_IRQn);
  296. /* USER CODE BEGIN USART2_MspInit 1 */
  297. /* USER CODE END USART2_MspInit 1 */
  298. }
  299. else if(huart->Instance==USART3)
  300. {
  301. /* USER CODE BEGIN USART3_MspInit 0 */
  302. /* USER CODE END USART3_MspInit 0 */
  303. /** Initializes the peripherals clock
  304. */
  305. PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART3;
  306. PeriphClkInitStruct.Usart234578ClockSelection = RCC_USART234578CLKSOURCE_D2PCLK1;
  307. if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
  308. {
  309. Error_Handler();
  310. }
  311. /* Peripheral clock enable */
  312. __HAL_RCC_USART3_CLK_ENABLE();
  313. __HAL_RCC_GPIOD_CLK_ENABLE();
  314. /**USART3 GPIO Configuration
  315. PD8 ------> USART3_TX
  316. PD9 ------> USART3_RX
  317. */
  318. GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9;
  319. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  320. GPIO_InitStruct.Pull = GPIO_NOPULL;
  321. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
  322. GPIO_InitStruct.Alternate = GPIO_AF7_USART3;
  323. HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
  324. /* USART3 interrupt Init */
  325. HAL_NVIC_SetPriority(USART3_IRQn, 5, 0);
  326. HAL_NVIC_EnableIRQ(USART3_IRQn);
  327. /* USER CODE BEGIN USART3_MspInit 1 */
  328. /* USER CODE END USART3_MspInit 1 */
  329. }
  330. else if(huart->Instance==USART6)
  331. {
  332. /* USER CODE BEGIN USART6_MspInit 0 */
  333. /* USER CODE END USART6_MspInit 0 */
  334. /** Initializes the peripherals clock
  335. */
  336. PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART6;
  337. PeriphClkInitStruct.Usart16ClockSelection = RCC_USART16CLKSOURCE_D2PCLK2;
  338. if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
  339. {
  340. Error_Handler();
  341. }
  342. /* Peripheral clock enable */
  343. __HAL_RCC_USART6_CLK_ENABLE();
  344. __HAL_RCC_GPIOC_CLK_ENABLE();
  345. /**USART6 GPIO Configuration
  346. PC6 ------> USART6_TX
  347. PC7 ------> USART6_RX
  348. */
  349. GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7;
  350. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  351. GPIO_InitStruct.Pull = GPIO_NOPULL;
  352. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
  353. GPIO_InitStruct.Alternate = GPIO_AF7_USART6;
  354. HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  355. /* USART6 interrupt Init */
  356. HAL_NVIC_SetPriority(USART6_IRQn, 5, 0);
  357. HAL_NVIC_EnableIRQ(USART6_IRQn);
  358. /* USER CODE BEGIN USART6_MspInit 1 */
  359. /* USER CODE END USART6_MspInit 1 */
  360. }
  361. }
  362. /**
  363. * @brief UART MSP De-Initialization
  364. * This function freeze the hardware resources used in this example
  365. * @param huart: UART handle pointer
  366. * @retval None
  367. */
  368. void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
  369. {
  370. if(huart->Instance==UART8)
  371. {
  372. /* USER CODE BEGIN UART8_MspDeInit 0 */
  373. /* USER CODE END UART8_MspDeInit 0 */
  374. /* Peripheral clock disable */
  375. __HAL_RCC_UART8_CLK_DISABLE();
  376. /**UART8 GPIO Configuration
  377. PE0 ------> UART8_RX
  378. PE1 ------> UART8_TX
  379. */
  380. HAL_GPIO_DeInit(GPIOE, GPIO_PIN_0|GPIO_PIN_1);
  381. /* UART8 DMA DeInit */
  382. HAL_DMA_DeInit(huart->hdmarx);
  383. HAL_DMA_DeInit(huart->hdmatx);
  384. /* UART8 interrupt DeInit */
  385. HAL_NVIC_DisableIRQ(UART8_IRQn);
  386. /* USER CODE BEGIN UART8_MspDeInit 1 */
  387. /* USER CODE END UART8_MspDeInit 1 */
  388. }
  389. else if(huart->Instance==USART1)
  390. {
  391. /* USER CODE BEGIN USART1_MspDeInit 0 */
  392. /* USER CODE END USART1_MspDeInit 0 */
  393. /* Peripheral clock disable */
  394. __HAL_RCC_USART1_CLK_DISABLE();
  395. /**USART1 GPIO Configuration
  396. PB14 ------> USART1_TX
  397. PB15 ------> USART1_RX
  398. */
  399. HAL_GPIO_DeInit(GPIOB, GPIO_PIN_14|GPIO_PIN_15);
  400. /* USART1 interrupt DeInit */
  401. HAL_NVIC_DisableIRQ(USART1_IRQn);
  402. /* USER CODE BEGIN USART1_MspDeInit 1 */
  403. /* USER CODE END USART1_MspDeInit 1 */
  404. }
  405. else if(huart->Instance==USART2)
  406. {
  407. /* USER CODE BEGIN USART2_MspDeInit 0 */
  408. /* USER CODE END USART2_MspDeInit 0 */
  409. /* Peripheral clock disable */
  410. __HAL_RCC_USART2_CLK_DISABLE();
  411. /**USART2 GPIO Configuration
  412. PD5 ------> USART2_TX
  413. PD6 ------> USART2_RX
  414. */
  415. HAL_GPIO_DeInit(GPIOD, GPIO_PIN_5|GPIO_PIN_6);
  416. /* USART2 interrupt DeInit */
  417. HAL_NVIC_DisableIRQ(USART2_IRQn);
  418. /* USER CODE BEGIN USART2_MspDeInit 1 */
  419. /* USER CODE END USART2_MspDeInit 1 */
  420. }
  421. else if(huart->Instance==USART3)
  422. {
  423. /* USER CODE BEGIN USART3_MspDeInit 0 */
  424. /* USER CODE END USART3_MspDeInit 0 */
  425. /* Peripheral clock disable */
  426. __HAL_RCC_USART3_CLK_DISABLE();
  427. /**USART3 GPIO Configuration
  428. PD8 ------> USART3_TX
  429. PD9 ------> USART3_RX
  430. */
  431. HAL_GPIO_DeInit(GPIOD, GPIO_PIN_8|GPIO_PIN_9);
  432. /* USART3 interrupt DeInit */
  433. HAL_NVIC_DisableIRQ(USART3_IRQn);
  434. /* USER CODE BEGIN USART3_MspDeInit 1 */
  435. /* USER CODE END USART3_MspDeInit 1 */
  436. }
  437. else if(huart->Instance==USART6)
  438. {
  439. /* USER CODE BEGIN USART6_MspDeInit 0 */
  440. /* USER CODE END USART6_MspDeInit 0 */
  441. /* Peripheral clock disable */
  442. __HAL_RCC_USART6_CLK_DISABLE();
  443. /**USART6 GPIO Configuration
  444. PC6 ------> USART6_TX
  445. PC7 ------> USART6_RX
  446. */
  447. HAL_GPIO_DeInit(GPIOC, GPIO_PIN_6|GPIO_PIN_7);
  448. /* USART6 interrupt DeInit */
  449. HAL_NVIC_DisableIRQ(USART6_IRQn);
  450. /* USER CODE BEGIN USART6_MspDeInit 1 */
  451. /* USER CODE END USART6_MspDeInit 1 */
  452. }
  453. }
  454. /* USER CODE BEGIN 1 */
  455. /* USER CODE END 1 */