Skip to content

Conversation

@sandeepmistry
Copy link
Contributor

This avoids dealing with ZLP’s in USB_Send, because the max packet size will be EP size - 1.

Alternative to #4138 to resolve #3946.

cc/ @NicoHood @embmicro @BlackBrix.

This avoids dealing with ZLP’s in USB_Send, because the max packet size
will be EP size - 1.
@sandeepmistry sandeepmistry added feature request A request to make an enhancement (not a bug fix) USB: CDC serial Serial interface used by MCUs with native USB (e.g. Leonardo) to communicate with the computer Architecture: AVR Applies only to the AVR microcontrollers (Uno, etc.) labels Apr 14, 2016
@NicoHood
Copy link
Contributor

Was this internally discussed and tested?

@agdl
Copy link
Member

agdl commented Jul 12, 2016

@NicoHood Yes, tested by me on Ubuntu and Windows. If you can also try it out is good :)

@NicoHood
Copy link
Contributor

NicoHood commented Nov 6, 2016

A user reported that this PR breaks the raw hid code:
NicoHood/HID#91

The ZLP needs to be handled inside the Serial, not the USB-Core. Please revert this commit and think of another solution. This possibly also breaks other USB libs.

@sandeepmistry
Copy link
Contributor Author

@NicoHood thanks for letting us know.

Do you have any suggestions on how to move forward? Please note, the SAMD core has the same behaviour as this PR: arduino/ArduinoCore-samd@40d9554.

@NicoHood
Copy link
Contributor

NicoHood commented Nov 8, 2016

No I dont know how to solve this problem, but I remember that there were multiple solutions provided. I'd revert the PR for now, as this is defenitely implemented wrong and needs to move to the serial library, not the usb core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Architecture: AVR Applies only to the AVR microcontrollers (Uno, etc.) feature request A request to make an enhancement (not a bug fix) USB: CDC serial Serial interface used by MCUs with native USB (e.g. Leonardo) to communicate with the computer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Leonardo fails to send exactly 64 bytes.

4 participants