From c443a259dce351d85f663893e5021d113e9869b4 Mon Sep 17 00:00:00 2001 From: Russ Butler Date: Tue, 20 Mar 2018 14:46:55 -0500 Subject: [PATCH] Correct Kinetis 256 byte ctrl transfers Correctly handle control transfers which are a multiple of 256 bytes by checking for a non-zero value in the upper byte of size. --- targets/TARGET_Freescale/usb/USBPhy_Kinetis.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/TARGET_Freescale/usb/USBPhy_Kinetis.cpp b/targets/TARGET_Freescale/usb/USBPhy_Kinetis.cpp index 55599a922e..60ad7d7f1f 100644 --- a/targets/TARGET_Freescale/usb/USBPhy_Kinetis.cpp +++ b/targets/TARGET_Freescale/usb/USBPhy_Kinetis.cpp @@ -483,7 +483,7 @@ bool USBPhyHw::endpoint_read_result_core(usb_ep_t endpoint, uint8_t *data, uint3 if (setup) { // Record the setup type - if (data[6] == 0) { + if ((data[6] == 0) && (data[7] == 0)) { ctrl_xfer = CTRL_XFER_NONE; } else { uint8_t in_xfer = (data[0] >> 7) & 1;