fast serialUSB read
Hi guys! I increased serialUSB read speed from 1Mbit/s up to 12Mbit/s. Details are here http://forum.arduino.cc/index.php?topic=391757.0 I suggest you to take it for new arduino version.
Hi @sined23 , would you mind opening a proper PR ? So we can review easily :smile:
Sorry, I don't know how to do it. You can review these new libraries and compare with existing http://forum.arduino.cc/index.php?action=dlattach;topic=391757.0;attach=163027
if you have questions for changes pls ask
The main idea is that bytes are written and read into/from CDC buffer not one by one but block of bytes
Serial_::accept write into CDC buffer as maximum as possible (only to not overflow the buffer) Serial_::readb (you can change just read, not use readb) get from CDC buffer as maximum as possible or nessasary length
and one more important thing: in USBD_Recv "while (n--) *dst++ = UDD_Recv8(ep & 0xF);" should be replaced into UDD_Recv(ep & 0xF, dst, len);
after that read speed is incredible increases !!!
Fork the repo, do the changes, upload and open a pr. Its very simple, just learn some basic git commands (clone, add, commit, push).
created PR
Hi guys! Do you plan to merge this PR? https://github.com/arduino/Arduino/pull/4871
merged?