We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1104dc0 commit a75834eCopy full SHA for a75834e
tmk_core/protocol/chibios/usb_main.c
@@ -1323,10 +1323,13 @@ int8_t sendchar(uint8_t c) {
1323
return 0;
1324
}
1325
osalSysUnlock();
1326
- /* should get suspended and wait if the queue is full
1327
- * but it's not blocking even if noone is listening,
1328
- * because the USB packets are sent anyway */
1329
- return(chOQPut(&console_queue, c));
+ /* Timeout after 5us if the queue is full.
+ * Increase this timeout if too much stuff is getting
+ * dropped (i.e. the buffer is getting full too fast
+ * for USB/HIDRAW to dequeue). Another possibility
1330
+ * for fixing this kind of thing is to increase
1331
+ * CONSOLE_QUEUE_CAPACITY. */
1332
+ return(chOQPutTimeout(&console_queue, c, US2ST(5)));
1333
1334
1335
#else /* CONSOLE_ENABLE */
0 commit comments