Skip to content

Commit de1673a

Browse files
yimjiajunhenrikbrixandersen
authored andcommitted
drivers: uhc: uhc_mcux_common: add direction handling for non-setup packets
added logic to determine the direction of USB transfers for non-setup packets using the endpoint direction. This ensures proper handling of USB_IN and USB_OUT directions. Signed-off-by: Richard Yim <[email protected]>
1 parent 6614a3a commit de1673a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/usb/uhc/uhc_mcux_common.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ int uhc_mcux_hal_init_transfer_common(const struct device *dev, usb_host_transfe
352352
mcux_xfer->direction = USB_REQTYPE_GET_DIR(mcux_xfer->setupPacket->bmRequestType)
353353
? USB_IN
354354
: USB_OUT;
355+
} else {
356+
mcux_xfer->direction = USB_EP_DIR_IS_IN(xfer->ep) ? USB_IN : USB_OUT;
355357
}
356358

357359
return 0;

0 commit comments

Comments
 (0)