stm32wbxx_hal_msp.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * File Name : stm32wbxx_hal_msp.c
  5. * Description : This file provides code for the MSP Initialization
  6. * and de-Initialization codes.
  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. /* Includes ------------------------------------------------------------------*/
  22. #include "main.h"
  23. /* USER CODE BEGIN Includes */
  24. /* USER CODE END Includes */
  25. /* Private typedef -----------------------------------------------------------*/
  26. /* USER CODE BEGIN TD */
  27. /* USER CODE END TD */
  28. /* Private define ------------------------------------------------------------*/
  29. /* USER CODE BEGIN Define */
  30. /* USER CODE END Define */
  31. /* Private macro -------------------------------------------------------------*/
  32. /* USER CODE BEGIN Macro */
  33. /* USER CODE END Macro */
  34. /* Private variables ---------------------------------------------------------*/
  35. /* USER CODE BEGIN PV */
  36. /* USER CODE END PV */
  37. /* Private function prototypes -----------------------------------------------*/
  38. /* USER CODE BEGIN PFP */
  39. /* USER CODE END PFP */
  40. /* External functions --------------------------------------------------------*/
  41. /* USER CODE BEGIN ExternalFunctions */
  42. /* USER CODE END ExternalFunctions */
  43. /* USER CODE BEGIN 0 */
  44. /* USER CODE END 0 */
  45. /**
  46. * Initializes the Global MSP.
  47. */
  48. void HAL_MspInit(void)
  49. {
  50. /* USER CODE BEGIN MspInit 0 */
  51. /* USER CODE END MspInit 0 */
  52. /* System interrupt init*/
  53. /* USER CODE BEGIN MspInit 1 */
  54. /* USER CODE END MspInit 1 */
  55. }
  56. /**
  57. * @brief ADC MSP Initialization
  58. * This function configures the hardware resources used in this example
  59. * @param hadc: ADC handle pointer
  60. * @retval None
  61. */
  62. void HAL_ADC_MspInit(ADC_HandleTypeDef* hadc)
  63. {
  64. GPIO_InitTypeDef GPIO_InitStruct = {0};
  65. if(hadc->Instance==ADC1)
  66. {
  67. /* USER CODE BEGIN ADC1_MspInit 0 */
  68. /* USER CODE END ADC1_MspInit 0 */
  69. /* Peripheral clock enable */
  70. __HAL_RCC_ADC_CLK_ENABLE();
  71. __HAL_RCC_GPIOA_CLK_ENABLE();
  72. /**ADC1 GPIO Configuration
  73. PA0 ------> ADC1_IN5
  74. */
  75. GPIO_InitStruct.Pin = GPIO_PIN_0;
  76. GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
  77. GPIO_InitStruct.Pull = GPIO_NOPULL;
  78. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  79. /* USER CODE BEGIN ADC1_MspInit 1 */
  80. /* USER CODE END ADC1_MspInit 1 */
  81. }
  82. }
  83. /**
  84. * @brief ADC MSP De-Initialization
  85. * This function freeze the hardware resources used in this example
  86. * @param hadc: ADC handle pointer
  87. * @retval None
  88. */
  89. void HAL_ADC_MspDeInit(ADC_HandleTypeDef* hadc)
  90. {
  91. if(hadc->Instance==ADC1)
  92. {
  93. /* USER CODE BEGIN ADC1_MspDeInit 0 */
  94. /* USER CODE END ADC1_MspDeInit 0 */
  95. /* Peripheral clock disable */
  96. __HAL_RCC_ADC_CLK_DISABLE();
  97. /**ADC1 GPIO Configuration
  98. PA0 ------> ADC1_IN5
  99. */
  100. HAL_GPIO_DeInit(GPIOA, GPIO_PIN_0);
  101. /* USER CODE BEGIN ADC1_MspDeInit 1 */
  102. /* USER CODE END ADC1_MspDeInit 1 */
  103. }
  104. }
  105. /**
  106. * @brief I2C MSP Initialization
  107. * This function configures the hardware resources used in this example
  108. * @param hi2c: I2C handle pointer
  109. * @retval None
  110. */
  111. void HAL_I2C_MspInit(I2C_HandleTypeDef* hi2c)
  112. {
  113. GPIO_InitTypeDef GPIO_InitStruct = {0};
  114. if(hi2c->Instance==I2C1)
  115. {
  116. /* USER CODE BEGIN I2C1_MspInit 0 */
  117. /* USER CODE END I2C1_MspInit 0 */
  118. __HAL_RCC_GPIOB_CLK_ENABLE();
  119. /**I2C1 GPIO Configuration
  120. PB8 ------> I2C1_SCL
  121. PB9 ------> I2C1_SDA
  122. */
  123. GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9;
  124. GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
  125. GPIO_InitStruct.Pull = GPIO_PULLUP;
  126. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  127. GPIO_InitStruct.Alternate = GPIO_AF4_I2C1;
  128. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  129. /* Peripheral clock enable */
  130. __HAL_RCC_I2C1_CLK_ENABLE();
  131. /* USER CODE BEGIN I2C1_MspInit 1 */
  132. /* USER CODE END I2C1_MspInit 1 */
  133. }
  134. }
  135. /**
  136. * @brief I2C MSP De-Initialization
  137. * This function freeze the hardware resources used in this example
  138. * @param hi2c: I2C handle pointer
  139. * @retval None
  140. */
  141. void HAL_I2C_MspDeInit(I2C_HandleTypeDef* hi2c)
  142. {
  143. if(hi2c->Instance==I2C1)
  144. {
  145. /* USER CODE BEGIN I2C1_MspDeInit 0 */
  146. /* USER CODE END I2C1_MspDeInit 0 */
  147. /* Peripheral clock disable */
  148. __HAL_RCC_I2C1_CLK_DISABLE();
  149. /**I2C1 GPIO Configuration
  150. PB8 ------> I2C1_SCL
  151. PB9 ------> I2C1_SDA
  152. */
  153. HAL_GPIO_DeInit(GPIOB, GPIO_PIN_8);
  154. HAL_GPIO_DeInit(GPIOB, GPIO_PIN_9);
  155. /* USER CODE BEGIN I2C1_MspDeInit 1 */
  156. /* USER CODE END I2C1_MspDeInit 1 */
  157. }
  158. }
  159. /**
  160. * @brief UART MSP Initialization
  161. * This function configures the hardware resources used in this example
  162. * @param huart: UART handle pointer
  163. * @retval None
  164. */
  165. void HAL_UART_MspInit(UART_HandleTypeDef* huart)
  166. {
  167. GPIO_InitTypeDef GPIO_InitStruct = {0};
  168. if(huart->Instance==LPUART1)
  169. {
  170. /* USER CODE BEGIN LPUART1_MspInit 0 */
  171. /* USER CODE END LPUART1_MspInit 0 */
  172. /* Peripheral clock enable */
  173. __HAL_RCC_LPUART1_CLK_ENABLE();
  174. __HAL_RCC_GPIOB_CLK_ENABLE();
  175. /**LPUART1 GPIO Configuration
  176. PB10 ------> LPUART1_RX
  177. PB11 ------> LPUART1_TX
  178. */
  179. GPIO_InitStruct.Pin = GPIO_PIN_10|GPIO_PIN_11;
  180. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  181. GPIO_InitStruct.Pull = GPIO_PULLUP;
  182. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  183. GPIO_InitStruct.Alternate = GPIO_AF8_LPUART1;
  184. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  185. /* USER CODE BEGIN LPUART1_MspInit 1 */
  186. /* USER CODE END LPUART1_MspInit 1 */
  187. }
  188. else if(huart->Instance==USART1)
  189. {
  190. /* USER CODE BEGIN USART1_MspInit 0 */
  191. /* USER CODE END USART1_MspInit 0 */
  192. /* Peripheral clock enable */
  193. __HAL_RCC_USART1_CLK_ENABLE();
  194. __HAL_RCC_GPIOB_CLK_ENABLE();
  195. /**USART1 GPIO Configuration
  196. PB6 ------> USART1_TX
  197. PB7 ------> USART1_RX
  198. */
  199. GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7;
  200. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  201. GPIO_InitStruct.Pull = GPIO_PULLUP;
  202. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  203. GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
  204. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  205. /* USER CODE BEGIN USART1_MspInit 1 */
  206. /* USER CODE END USART1_MspInit 1 */
  207. }
  208. }
  209. /**
  210. * @brief UART MSP De-Initialization
  211. * This function freeze the hardware resources used in this example
  212. * @param huart: UART handle pointer
  213. * @retval None
  214. */
  215. void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
  216. {
  217. if(huart->Instance==LPUART1)
  218. {
  219. /* USER CODE BEGIN LPUART1_MspDeInit 0 */
  220. /* USER CODE END LPUART1_MspDeInit 0 */
  221. /* Peripheral clock disable */
  222. __HAL_RCC_LPUART1_CLK_DISABLE();
  223. /**LPUART1 GPIO Configuration
  224. PB10 ------> LPUART1_RX
  225. PB11 ------> LPUART1_TX
  226. */
  227. HAL_GPIO_DeInit(GPIOB, GPIO_PIN_10|GPIO_PIN_11);
  228. /* USER CODE BEGIN LPUART1_MspDeInit 1 */
  229. /* USER CODE END LPUART1_MspDeInit 1 */
  230. }
  231. else if(huart->Instance==USART1)
  232. {
  233. /* USER CODE BEGIN USART1_MspDeInit 0 */
  234. /* USER CODE END USART1_MspDeInit 0 */
  235. /* Peripheral clock disable */
  236. __HAL_RCC_USART1_CLK_DISABLE();
  237. /**USART1 GPIO Configuration
  238. PB6 ------> USART1_TX
  239. PB7 ------> USART1_RX
  240. */
  241. HAL_GPIO_DeInit(GPIOB, GPIO_PIN_6|GPIO_PIN_7);
  242. /* USER CODE BEGIN USART1_MspDeInit 1 */
  243. /* USER CODE END USART1_MspDeInit 1 */
  244. }
  245. }
  246. /**
  247. * @brief RTC MSP Initialization
  248. * This function configures the hardware resources used in this example
  249. * @param hrtc: RTC handle pointer
  250. * @retval None
  251. */
  252. void HAL_RTC_MspInit(RTC_HandleTypeDef* hrtc)
  253. {
  254. if(hrtc->Instance==RTC)
  255. {
  256. /* USER CODE BEGIN RTC_MspInit 0 */
  257. /* USER CODE END RTC_MspInit 0 */
  258. /* Peripheral clock enable */
  259. __HAL_RCC_RTC_ENABLE();
  260. __HAL_RCC_RTCAPB_CLK_ENABLE();
  261. /* USER CODE BEGIN RTC_MspInit 1 */
  262. /* USER CODE END RTC_MspInit 1 */
  263. }
  264. }
  265. /**
  266. * @brief RTC MSP De-Initialization
  267. * This function freeze the hardware resources used in this example
  268. * @param hrtc: RTC handle pointer
  269. * @retval None
  270. */
  271. void HAL_RTC_MspDeInit(RTC_HandleTypeDef* hrtc)
  272. {
  273. if(hrtc->Instance==RTC)
  274. {
  275. /* USER CODE BEGIN RTC_MspDeInit 0 */
  276. /* USER CODE END RTC_MspDeInit 0 */
  277. /* Peripheral clock disable */
  278. __HAL_RCC_RTC_DISABLE();
  279. __HAL_RCC_RTCAPB_CLK_DISABLE();
  280. /* USER CODE BEGIN RTC_MspDeInit 1 */
  281. /* USER CODE END RTC_MspDeInit 1 */
  282. }
  283. }
  284. /**
  285. * @brief SPI MSP Initialization
  286. * This function configures the hardware resources used in this example
  287. * @param hspi: SPI handle pointer
  288. * @retval None
  289. */
  290. void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi)
  291. {
  292. GPIO_InitTypeDef GPIO_InitStruct = {0};
  293. if(hspi->Instance==SPI1)
  294. {
  295. /* USER CODE BEGIN SPI1_MspInit 0 */
  296. /* USER CODE END SPI1_MspInit 0 */
  297. /* Peripheral clock enable */
  298. __HAL_RCC_SPI1_CLK_ENABLE();
  299. __HAL_RCC_GPIOA_CLK_ENABLE();
  300. /**SPI1 GPIO Configuration
  301. PA1 ------> SPI1_SCK
  302. PA6 ------> SPI1_MISO
  303. PA7 ------> SPI1_MOSI
  304. */
  305. GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_6|GPIO_PIN_7;
  306. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  307. GPIO_InitStruct.Pull = GPIO_NOPULL;
  308. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  309. GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
  310. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  311. /* USER CODE BEGIN SPI1_MspInit 1 */
  312. /* USER CODE END SPI1_MspInit 1 */
  313. }
  314. else if(hspi->Instance==SPI2)
  315. {
  316. /* USER CODE BEGIN SPI2_MspInit 0 */
  317. /* USER CODE END SPI2_MspInit 0 */
  318. /* Peripheral clock enable */
  319. __HAL_RCC_SPI2_CLK_ENABLE();
  320. __HAL_RCC_GPIOC_CLK_ENABLE();
  321. __HAL_RCC_GPIOA_CLK_ENABLE();
  322. /**SPI2 GPIO Configuration
  323. PC1 ------> SPI2_MOSI
  324. PC2 ------> SPI2_MISO
  325. PA9 ------> SPI2_SCK
  326. */
  327. GPIO_InitStruct.Pin = GPIO_PIN_1;
  328. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  329. GPIO_InitStruct.Pull = GPIO_NOPULL;
  330. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  331. GPIO_InitStruct.Alternate = GPIO_AF3_SPI2;
  332. HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  333. GPIO_InitStruct.Pin = GPIO_PIN_2;
  334. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  335. GPIO_InitStruct.Pull = GPIO_NOPULL;
  336. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  337. GPIO_InitStruct.Alternate = GPIO_AF5_SPI2;
  338. HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  339. GPIO_InitStruct.Pin = GPIO_PIN_9;
  340. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  341. GPIO_InitStruct.Pull = GPIO_NOPULL;
  342. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  343. GPIO_InitStruct.Alternate = GPIO_AF5_SPI2;
  344. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  345. /* USER CODE BEGIN SPI2_MspInit 1 */
  346. /* USER CODE END SPI2_MspInit 1 */
  347. }
  348. }
  349. /**
  350. * @brief SPI MSP De-Initialization
  351. * This function freeze the hardware resources used in this example
  352. * @param hspi: SPI handle pointer
  353. * @retval None
  354. */
  355. void HAL_SPI_MspDeInit(SPI_HandleTypeDef* hspi)
  356. {
  357. if(hspi->Instance==SPI1)
  358. {
  359. /* USER CODE BEGIN SPI1_MspDeInit 0 */
  360. /* USER CODE END SPI1_MspDeInit 0 */
  361. /* Peripheral clock disable */
  362. __HAL_RCC_SPI1_CLK_DISABLE();
  363. /**SPI1 GPIO Configuration
  364. PA1 ------> SPI1_SCK
  365. PA6 ------> SPI1_MISO
  366. PA7 ------> SPI1_MOSI
  367. */
  368. HAL_GPIO_DeInit(GPIOA, GPIO_PIN_1|GPIO_PIN_6|GPIO_PIN_7);
  369. /* USER CODE BEGIN SPI1_MspDeInit 1 */
  370. /* USER CODE END SPI1_MspDeInit 1 */
  371. }
  372. else if(hspi->Instance==SPI2)
  373. {
  374. /* USER CODE BEGIN SPI2_MspDeInit 0 */
  375. /* USER CODE END SPI2_MspDeInit 0 */
  376. /* Peripheral clock disable */
  377. __HAL_RCC_SPI2_CLK_DISABLE();
  378. /**SPI2 GPIO Configuration
  379. PC1 ------> SPI2_MOSI
  380. PC2 ------> SPI2_MISO
  381. PA9 ------> SPI2_SCK
  382. */
  383. HAL_GPIO_DeInit(GPIOC, GPIO_PIN_1|GPIO_PIN_2);
  384. HAL_GPIO_DeInit(GPIOA, GPIO_PIN_9);
  385. /* USER CODE BEGIN SPI2_MspDeInit 1 */
  386. /* USER CODE END SPI2_MspDeInit 1 */
  387. }
  388. }
  389. /**
  390. * @brief TIM_Base MSP Initialization
  391. * This function configures the hardware resources used in this example
  392. * @param htim_base: TIM_Base handle pointer
  393. * @retval None
  394. */
  395. void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base)
  396. {
  397. if(htim_base->Instance==TIM16)
  398. {
  399. /* USER CODE BEGIN TIM16_MspInit 0 */
  400. /* USER CODE END TIM16_MspInit 0 */
  401. /* Peripheral clock enable */
  402. __HAL_RCC_TIM16_CLK_ENABLE();
  403. /* USER CODE BEGIN TIM16_MspInit 1 */
  404. /* USER CODE END TIM16_MspInit 1 */
  405. }
  406. else if(htim_base->Instance==TIM17)
  407. {
  408. /* USER CODE BEGIN TIM17_MspInit 0 */
  409. /* USER CODE END TIM17_MspInit 0 */
  410. /* Peripheral clock enable */
  411. __HAL_RCC_TIM17_CLK_ENABLE();
  412. /* USER CODE BEGIN TIM17_MspInit 1 */
  413. /* USER CODE END TIM17_MspInit 1 */
  414. }
  415. }
  416. /**
  417. * @brief TIM_Base MSP De-Initialization
  418. * This function freeze the hardware resources used in this example
  419. * @param htim_base: TIM_Base handle pointer
  420. * @retval None
  421. */
  422. void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base)
  423. {
  424. if(htim_base->Instance==TIM16)
  425. {
  426. /* USER CODE BEGIN TIM16_MspDeInit 0 */
  427. /* USER CODE END TIM16_MspDeInit 0 */
  428. /* Peripheral clock disable */
  429. __HAL_RCC_TIM16_CLK_DISABLE();
  430. /* USER CODE BEGIN TIM16_MspDeInit 1 */
  431. /* USER CODE END TIM16_MspDeInit 1 */
  432. }
  433. else if(htim_base->Instance==TIM17)
  434. {
  435. /* USER CODE BEGIN TIM17_MspDeInit 0 */
  436. /* USER CODE END TIM17_MspDeInit 0 */
  437. /* Peripheral clock disable */
  438. __HAL_RCC_TIM17_CLK_DISABLE();
  439. /* USER CODE BEGIN TIM17_MspDeInit 1 */
  440. /* USER CODE END TIM17_MspDeInit 1 */
  441. }
  442. }
  443. /**
  444. * @brief PCD MSP Initialization
  445. * This function configures the hardware resources used in this example
  446. * @param hpcd: PCD handle pointer
  447. * @retval None
  448. */
  449. void HAL_PCD_MspInit(PCD_HandleTypeDef* hpcd)
  450. {
  451. GPIO_InitTypeDef GPIO_InitStruct = {0};
  452. if(hpcd->Instance==USB)
  453. {
  454. /* USER CODE BEGIN USB_MspInit 0 */
  455. /* USER CODE END USB_MspInit 0 */
  456. __HAL_RCC_GPIOA_CLK_ENABLE();
  457. /**USB GPIO Configuration
  458. PA11 ------> USB_DM
  459. PA12 ------> USB_DP
  460. */
  461. GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12;
  462. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  463. GPIO_InitStruct.Pull = GPIO_NOPULL;
  464. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  465. GPIO_InitStruct.Alternate = GPIO_AF10_USB;
  466. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  467. /* Peripheral clock enable */
  468. __HAL_RCC_USB_CLK_ENABLE();
  469. /* USER CODE BEGIN USB_MspInit 1 */
  470. /* USER CODE END USB_MspInit 1 */
  471. }
  472. }
  473. /**
  474. * @brief PCD MSP De-Initialization
  475. * This function freeze the hardware resources used in this example
  476. * @param hpcd: PCD handle pointer
  477. * @retval None
  478. */
  479. void HAL_PCD_MspDeInit(PCD_HandleTypeDef* hpcd)
  480. {
  481. if(hpcd->Instance==USB)
  482. {
  483. /* USER CODE BEGIN USB_MspDeInit 0 */
  484. /* USER CODE END USB_MspDeInit 0 */
  485. /* Peripheral clock disable */
  486. __HAL_RCC_USB_CLK_DISABLE();
  487. /**USB GPIO Configuration
  488. PA11 ------> USB_DM
  489. PA12 ------> USB_DP
  490. */
  491. HAL_GPIO_DeInit(GPIOA, GPIO_PIN_11|GPIO_PIN_12);
  492. /* USER CODE BEGIN USB_MspDeInit 1 */
  493. /* USER CODE END USB_MspDeInit 1 */
  494. }
  495. }
  496. /* USER CODE BEGIN 1 */
  497. /* USER CODE END 1 */
  498. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/