diff --git a/.travis.yml b/.travis.yml index 3dc25114..cc13e6c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -86,7 +86,8 @@ install: script: - if [[ -z "$SKIP_UNO" ]]; then UNO="--board=uno"; fi - - platformio ci --lib="." $UNO --board=due --board=genuino101 --board=teensy30 --board=teensy31 --board=teensy35 --board=teensy36 --board=teensylc --board=esp12e --board=nodemcu --board=esp32dev + - platformio ci --lib="." $UNO --board=genuino101 --board=teensy30 --board=teensy31 --board=teensy35 --board=teensy36 --board=teensylc --board=esp12e --board=nodemcu --board=esp32dev + - platformio ci --lib="." --board=due --project-option="build_flags=-Wno-misleading-indentation" # Workaround https://travis-ci.org/felis/USB_Host_Shield_2.0/jobs/569237654 and https://github.com/arduino/ArduinoCore-sam/issues/69 before_deploy: # Fix errors in the Doxygen Markdown parser and generate the docs 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); } - diff --git a/hiduniversal.h b/hiduniversal.h index 3aa4690a..757f6243 100644 --- a/hiduniversal.h +++ b/hiduniversal.h @@ -40,7 +40,7 @@ class HIDUniversal : public USBHID { uint8_t bmAltSet : 3; uint8_t bmProtocol : 2; }; - uint8_t epIndex[maxEpPerInterface]; + uint8_t epIndex[maxEpPerInterface + 1]; // We need to make room for the control endpoint as well }; uint8_t bConfNum; // configuration number diff --git a/parsetools.h b/parsetools.h index 62892061..f7525369 100644 --- a/parsetools.h +++ b/parsetools.h @@ -30,6 +30,11 @@ e-mail : support@circuitsathome.com struct MultiValueBuffer { uint8_t valueSize; void *pValue; + +public: + + MultiValueBuffer() : valueSize(0), pValue(NULL) { + }; } __attribute__((packed)); class MultiByteValueParser { diff --git a/usbhid.h b/usbhid.h index 791bed35..cf74f57d 100644 --- a/usbhid.h +++ b/usbhid.h @@ -151,7 +151,7 @@ protected: static const uint8_t maxHidInterfaces = 3; static const uint8_t maxEpPerInterface = 2; - static const uint8_t totalEndpoints = (maxHidInterfaces * maxEpPerInterface + 1); + static const uint8_t totalEndpoints = (maxHidInterfaces * maxEpPerInterface + 1); // We need to make room for the control endpoint void PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR* ep_ptr); void PrintHidDescriptor(const USB_HID_DESCRIPTOR *pDesc);