Skip to content

Commit a211fe1

Browse files
committed
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.
1 parent f6fdf03 commit a211fe1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

targets/TARGET_Freescale/usb/USBPhy_Kinetis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ bool USBPhyHw::endpoint_read_result_core(usb_ep_t endpoint, uint8_t *data, uint3
483483

484484
if (setup) {
485485
// Record the setup type
486-
if (data[6] == 0) {
486+
if ((data[6] == 0) && (data[7] == 0)) {
487487
ctrl_xfer = CTRL_XFER_NONE;
488488
} else {
489489
uint8_t in_xfer = (data[0] >> 7) & 1;

0 commit comments

Comments
 (0)