usb->endpointSetInterrupt(CDC_BulkOut.bEndpointAddress, true);\r
iprintf("rxbuf has room for another packet, interrupt enabled\n");\r
}\r
+ else if ((rxbuf.free() < MAX_PACKET_SIZE_EPBULK) && (nl_in_rx == 0))\r
+ {\r
+ // handle potential deadlock where a short line, and the beginning of a very long line are bundled in one usb packet\r
+ rxbuf.flush();\r
+ flush_to_nl = true;\r
+\r
+ usb->endpointSetInterrupt(CDC_BulkOut.bEndpointAddress, true);\r
+ iprintf("rxbuf has room for another packet, interrupt enabled\n");\r
+ }\r
if (nl_in_rx > 0)\r
if (c == '\n' || c == '\r')\r
nl_in_rx--;\r