Skip to content

Commit 155ef4b

Browse files
jfischer-nonashif
authored andcommitted
drivers: udc_stm32: disable control endpoints in udc_disable()
Disable control endpoints in udc_disable() implementation. Signed-off-by: Johann Fischer <[email protected]>
1 parent a01ab79 commit 155ef4b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/usb/udc/udc_stm32.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,16 @@ static int udc_stm32_disable(const struct device *dev)
542542

543543
irq_disable(DT_INST_IRQN(0));
544544

545+
if (udc_ep_disable_internal(dev, USB_CONTROL_EP_OUT)) {
546+
LOG_ERR("Failed to disable control endpoint");
547+
return -EIO;
548+
}
549+
550+
if (udc_ep_disable_internal(dev, USB_CONTROL_EP_IN)) {
551+
LOG_ERR("Failed to disable control endpoint");
552+
return -EIO;
553+
}
554+
545555
status = HAL_PCD_Stop(&priv->pcd);
546556
if (status != HAL_OK) {
547557
LOG_ERR("PCD_Stop failed, %d", (int)status);

0 commit comments

Comments
 (0)