fork
Fork of USBDevice_STM32F103 by
Diff: USBDevice/USBHAL_STM32F1.cpp
- Revision:
- 71:9950749ae475
- Parent:
- 65:48fe9050cb4a
--- a/USBDevice/USBHAL_STM32F1.cpp Fri Nov 25 18:31:08 2016 +0000 +++ b/USBDevice/USBHAL_STM32F1.cpp Wed Feb 28 22:05:36 2018 +0000 @@ -44,6 +44,9 @@ HAL_PCD_Init(&hpcd_USB_FS); HAL_PCD_Start(&hpcd_USB_FS); } +#define __USB_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_USBEN)) + +#define __USB_CLK_ENABLE() (RCC->APB1ENR |= (RCC_APB1ENR_USBEN)) void HAL_PCD_MspInit(PCD_HandleTypeDef* hpcd) { __USB_CLK_ENABLE(); @@ -52,7 +55,7 @@ } void HAL_PCD_MspDeInit(PCD_HandleTypeDef* hpcd) { - __USB_CLK_DISABLE(); // Peripheral clock disable + //__USB_CLK_DISABLE(); // Peripheral clock disable HAL_NVIC_DisableIRQ(USB_LP_IRQn); // Peripheral interrupt Deinit }