We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04501e3 commit 9ef660cCopy full SHA for 9ef660c
sam/1.0.5/cores/arduino/USB/CDC.cpp
@@ -282,7 +282,7 @@ size_t Serial_::write(const uint8_t *buffer, size_t size)
282
// TODO - ZE - check behavior on different OSes and test what happens if an
283
// open connection isn't broken cleanly (cable is yanked out, host dies
284
// or locks up, or host virtual serial port hangs)
285
- if (_usbLineInfo.lineState > 0)
+ if (_usbLineInfo.lineState & 0x01)
286
{
287
int r = USBD_Send(CDC_TX, buffer, size);
288
@@ -318,7 +318,7 @@ Serial_::operator bool()
318
319
bool result = false;
320
321
322
323
result = true;
324
}
0 commit comments