send packet asap if there's enough data to fill one
authorMichael Moon <triffid.hunter@gmail.com>
Wed, 26 Dec 2012 06:58:42 +0000 (17:58 +1100)
committerMichael Moon <triffid.hunter@gmail.com>
Wed, 2 Jan 2013 00:45:29 +0000 (11:45 +1100)
src/libs/USBDevice/USBSerial/USBSerial.cpp

index a999696..7272ca8 100644 (file)
@@ -73,6 +73,8 @@ int USBSerial::puts(const char *str)
     {\r
         if ((*str != '\r') && txbuf.free())\r
             txbuf.queue(*str);\r
+        if ((txbuf.available() % 64) == 0)\r
+            usb->endpointSetInterrupt(CDC_BulkIn.bEndpointAddress, true);\r
         i++;\r
         str++;\r
     }\r