From b9a7a1e15b896608f8ebb1ec65afae12c81276cf Mon Sep 17 00:00:00 2001 From: nzasch <> Date: Mon, 3 Jan 2022 17:52:27 +0100 Subject: [PATCH] refactor --- codice/Core/Inc/.bassofono.h.swp | Bin 1024 -> 0 bytes codice/Core/Inc/main.h | 12 +++- codice/Core/Inc/rx.h | 32 +++++----- codice/Core/Inc/stm32g4xx_hal_conf.h | 2 +- codice/Core/Inc/tx.h | 4 ++ codice/Core/Src/bassofono.c | 8 +-- codice/Core/Src/main.c | 90 +++++++++++++++++++++------ codice/Core/Src/rx.c | 16 ++--- codice/Core/Src/stm32g4xx_hal_msp.c | 54 ++++++++++++++++ 9 files changed, 168 insertions(+), 50 deletions(-) delete mode 100644 codice/Core/Inc/.bassofono.h.swp diff --git a/codice/Core/Inc/.bassofono.h.swp b/codice/Core/Inc/.bassofono.h.swp deleted file mode 100644 index fdac3a04e621db15466c9d2d58bdd2f73cde2b72..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1024 zcmYc?$V<%2S1{8vU_b%4*E2Ar6(ypG;o>A`CT6ALl0*{M(|67Instance==USB) + { + /* USER CODE BEGIN USB_MspInit 0 */ + + /* USER CODE END USB_MspInit 0 */ + /** Initializes the peripherals clocks + */ + PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB; + PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_HSI48; + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) + { + Error_Handler(); + } + + /* Peripheral clock enable */ + __HAL_RCC_USB_CLK_ENABLE(); + /* USER CODE BEGIN USB_MspInit 1 */ + + /* USER CODE END USB_MspInit 1 */ + } + +} + +/** +* @brief PCD MSP De-Initialization +* This function freeze the hardware resources used in this example +* @param hpcd: PCD handle pointer +* @retval None +*/ +void HAL_PCD_MspDeInit(PCD_HandleTypeDef* hpcd) +{ + if(hpcd->Instance==USB) + { + /* USER CODE BEGIN USB_MspDeInit 0 */ + + /* USER CODE END USB_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_USB_CLK_DISABLE(); + /* USER CODE BEGIN USB_MspDeInit 1 */ + + /* USER CODE END USB_MspDeInit 1 */ + } + +} + /* USER CODE BEGIN 1 */ /* USER CODE END 1 */