Skip to content

Commit 46ab52c

Browse files
authored
Merge pull request #6 from matthijskooijman/disable-usb-pullups
Disable USB pullup when stopping USB
2 parents 2f64e7d + 3d47e60 commit 46ab52c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

system/STM32L0xx/Source/USB/HAL/Src/stm32l0xx_hal_pcd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ HAL_StatusTypeDef HAL_PCD_DeInit(PCD_HandleTypeDef *hpcd)
240240
hpcd->State = HAL_PCD_STATE_BUSY;
241241

242242
/* Stop Device */
243-
(void)HAL_PCD_Stop(hpcd);
243+
(void)USB_StopDevice(hpcd->Instance);
244244

245245
#if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U)
246246
if (hpcd->MspDeInitCallback == NULL)
@@ -998,7 +998,7 @@ HAL_StatusTypeDef HAL_PCD_Stop(PCD_HandleTypeDef *hpcd)
998998
__HAL_LOCK(hpcd);
999999
__HAL_PCD_DISABLE(hpcd);
10001000

1001-
(void)USB_StopDevice(hpcd->Instance);
1001+
(void)USB_DevDisconnect(hpcd->Instance);
10021002

10031003
__HAL_UNLOCK(hpcd);
10041004

0 commit comments

Comments
 (0)