1
0

model01: Use a modified CDC.cpp

At least for OSX, we need to slow down Serial writes. The easiest way to do that
is to add a delay after each write, and to accomplish that, the easiest is to
modify `CDC.cpp`. Without this, on OSX, we end up writing  too fast (and
changing the baud rate does not help, no matter in which direction I change),
and end up losing data.

This is not a great solution. It's not even a solution, but a workaround. But it
works for now.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
This commit is contained in:
Gergely Nagy 2018-10-26 18:21:05 +02:00
parent 7afb15c641
commit 7f977da45e
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

View File

@ -232,6 +232,7 @@ size_t Serial_::write(const uint8_t *buffer, size_t size)
if (_usbLineInfo.lineState > 0) {
int r = USB_Send(CDC_TX,buffer,size);
if (r > 0) {
delay(5);
return r;
} else {
setWriteError();