Skip to content

Commit

Permalink
Merge pull request #16 from Qyriad/fixes/usb0-ep0-zlp
Browse files Browse the repository at this point in the history
firmware: fix ZLPs for USB0 EP0
  • Loading branch information
ktemkin authored Sep 24, 2019
2 parents f21543a + 595e619 commit 001cdcd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions firmware/platform/lpc43xx/drivers/usb/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,11 @@ void usb_endpoint_init_without_descriptor(
{
bool zero_length_terminate = (transfer_type == USB_TRANSFER_TYPE_CONTROL) && !manual_zlps;

// IN EP0 needs non-automatic-ZLPs to work around a Linux spec violation.
if (endpoint->address == 0) {
zero_length_terminate = false;
}

usb_endpoint_flush(endpoint);

// TODO: There are more capabilities to adjust based on the endpoint
Expand Down

0 comments on commit 001cdcd

Please sign in to comment.