Make sure that a invalid LED report is not sent

Does not seem to make any difference, but just in case
This commit is contained in:
Kristian Sloth Lauszus 2016-03-21 17:57:33 +01:00
parent fb541dc8b9
commit 4b14c6910c

View file

@ -113,7 +113,7 @@ void SRWS1::setLeds(uint16_t leds) {
uint8_t buf[3]; uint8_t buf[3];
buf[0] = 0x40; // Report ID buf[0] = 0x40; // Report ID
buf[1] = leds & 0xFF; buf[1] = leds & 0xFF;
buf[2] = leds >> 8; buf[2] = (leds >> 8) & 0x7F;
pUsb->outTransfer(bAddress, epInfo[ hidInterfaces[0].epIndex[epInterruptOutIndex] ].epAddr, sizeof(buf), buf); pUsb->outTransfer(bAddress, epInfo[ hidInterfaces[0].epIndex[epInterruptOutIndex] ].epAddr, sizeof(buf), buf);
} }