From b62528d8133c132cb30bb7da0c38f9b85f72c53d Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Sat, 31 Aug 2019 13:13:18 +0200 Subject: [PATCH] Just get the endpoint address directly from the epInfo struct --- PS4USB.h | 2 +- examples/HID/SRWS1/SRWS1.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/PS4USB.h b/PS4USB.h index 178ebece..9d9dbb40 100644 --- a/PS4USB.h +++ b/PS4USB.h @@ -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); }; /**@}*/ diff --git a/examples/HID/SRWS1/SRWS1.cpp b/examples/HID/SRWS1/SRWS1.cpp index 77396f84..43f9aa42 100644 --- a/examples/HID/SRWS1/SRWS1.cpp +++ b/examples/HID/SRWS1/SRWS1.cpp @@ -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); } -