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)
|
if(out)
|
||||||
{
|
{
|
||||||
// By acking next OUT token from host we are allowing reception
|
if (nakcnt[ep] < 1) {
|
||||||
// of the data from host
|
// NAK 1 time
|
||||||
USB_EPnAck(ep, 0);
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue