ArduinoCore-sam icon indicating copy to clipboard operation
ArduinoCore-sam copied to clipboard

fast serialUSB read function readBlock

Open facchinm opened this issue 8 years ago • 3 comments

Moved from https://github.com/arduino/Arduino/pull/4871

sined23 commented on 15 Apr 2016 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);

facchinm avatar Jan 24 '17 15:01 facchinm

Hi, I have merged this code into my own code from Arduino IDE 1.8.9 and I can confirm the code merges properly. I am testing this code using and Arduino DUE and I can confirm that it works correctly. Is it possible to merge this tot he latest base?

coolio986 avatar Jun 20 '19 17:06 coolio986

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 09 '21 15:04 CLAassistant

Hi. Is it merged?

sined23 avatar May 29 '24 14:05 sined23