Skip to content

Commit

Permalink
mcux-sdk-middleware-usb: fix ip control return value for ip3511
Browse files Browse the repository at this point in the history
re-apply patch after sdk refresh.

without this kStatus_USB_Error was always returned for
kUSB_DeviceControlRun and kUSB_DeviceControlStop control types. let's
do it as for ehci/khci.

this change fixes the tests/subsys/usb/device/usb.device test for
lpcxpresso55s69_cpu0.

this is from nxp-mcuxpresso/mcuxsdk-middleware-usb#6

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
  • Loading branch information
jsiverskog authored and mmahadevan108 committed Feb 2, 2024
1 parent 6d0587a commit 5548c37
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2299,11 +2299,13 @@ usb_status_t USB_DeviceLpc3511IpControl(usb_device_controller_handle controllerH
case kUSB_DeviceControlRun:
lpc3511IpState->registerBase->DEVCMDSTAT |= (USB_LPC3511IP_DEVCMDSTAT_DCON_MASK);
lpc3511IpState->registerBase->DEVCMDSTAT &= ~(USB_LPC3511IP_DEVCMDSTAT_FORCE_NEEDCLK_MASK);
error = kStatus_USB_Success;
break;

case kUSB_DeviceControlStop:
lpc3511IpState->registerBase->DEVCMDSTAT |= USB_LPC3511IP_DEVCMDSTAT_FORCE_NEEDCLK_MASK;
lpc3511IpState->registerBase->DEVCMDSTAT &= (~USB_LPC3511IP_DEVCMDSTAT_DCON_MASK);
error = kStatus_USB_Success;
break;

case kUSB_DeviceControlEndpointInit:
Expand Down

0 comments on commit 5548c37

Please sign in to comment.