Just get the endpoint address directly from the epInfo struct

This commit is contained in:
Kristian Sloth Lauszus 2019-08-31 13:13:18 +02:00
parent 912decede5
commit b62528d813
2 changed files with 2 additions and 3 deletions

View file

@ -109,7 +109,7 @@ protected:
// The PS4 console actually set the four last bytes to a CRC32 checksum, but it seems like it is actually not needed
pUsb->outTransfer(bAddress, epInfo[ hidInterfaces[0].epIndex[epInterruptOutIndex] ].epAddr, sizeof(buf), buf);
pUsb->outTransfer(bAddress, epInfo[epInterruptOutIndex].epAddr, sizeof(buf), buf);
};
/**@}*/

View file

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