Commit de1673a8 authored by Richard Yim's avatar Richard Yim Committed by Henrik Brix Andersen
Browse files

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: default avatarRichard Yim <richardyim@ami.com>
parent 6614a3a9
Loading
Loading
Loading
Loading
+2 −0
Changes for drivers/usb/uhc/uhc_mcux_common.c: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -352,6 +352,8 @@ int uhc_mcux_hal_init_transfer_common(const struct device *dev, usb_host_transfe
		mcux_xfer->direction = USB_REQTYPE_GET_DIR(mcux_xfer->setupPacket->bmRequestType)
					       ? USB_IN
					       : USB_OUT;
	} else {
		mcux_xfer->direction = USB_EP_DIR_IS_IN(xfer->ep) ? USB_IN : USB_OUT;
	}

	return 0;