Fix openrgb RAW set led drop issue
should handle nak if the device can't keep up PC writing speed (3~5 64-byte packet sequentially)
This commit is contained in:
parent
181e4b3ed7
commit
d898dafe19
|
@ -557,9 +557,15 @@ void handleNAK(USBDriver *usbp, usbep_t ep) {
|
|||
|
||||
if(out)
|
||||
{
|
||||
// By acking next OUT token from host we are allowing reception
|
||||
// of the data from host
|
||||
USB_EPnAck(ep, 0);
|
||||
if (nakcnt[ep] < 1) {
|
||||
// NAK 1 time
|
||||
USB_EPnNak(ep);
|
||||
nakcnt[ep]++;
|
||||
} else {
|
||||
// By acking next OUT token from host we are allowing reception
|
||||
// of the data from host
|
||||
USB_EPnAck(ep, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue