Merge pull request #483 from felis/maybe-uninitialized

Fixed Travis build for Arduino Due
This commit is contained in:
Kristian Sloth Lauszus 2019-08-31 18:12:42 +02:00 committed by GitHub
commit 156a1d83f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 6 deletions

View file

@ -86,7 +86,8 @@ install:
script: script:
- if [[ -z "$SKIP_UNO" ]]; then UNO="--board=uno"; fi - 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: before_deploy:
# Fix errors in the Doxygen Markdown parser and generate the docs # Fix errors in the Doxygen Markdown parser and generate the docs

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 // 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[0] = 0x40; // Report ID
buf[1] = leds & 0xFF; buf[1] = leds & 0xFF;
buf[2] = (leds >> 8) & 0x7F; 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);
} }

View file

@ -40,7 +40,7 @@ class HIDUniversal : public USBHID {
uint8_t bmAltSet : 3; uint8_t bmAltSet : 3;
uint8_t bmProtocol : 2; 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 uint8_t bConfNum; // configuration number

View file

@ -30,6 +30,11 @@ e-mail : support@circuitsathome.com
struct MultiValueBuffer { struct MultiValueBuffer {
uint8_t valueSize; uint8_t valueSize;
void *pValue; void *pValue;
public:
MultiValueBuffer() : valueSize(0), pValue(NULL) {
};
} __attribute__((packed)); } __attribute__((packed));
class MultiByteValueParser { class MultiByteValueParser {

View file

@ -151,7 +151,7 @@ protected:
static const uint8_t maxHidInterfaces = 3; static const uint8_t maxHidInterfaces = 3;
static const uint8_t maxEpPerInterface = 2; 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 PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR* ep_ptr);
void PrintHidDescriptor(const USB_HID_DESCRIPTOR *pDesc); void PrintHidDescriptor(const USB_HID_DESCRIPTOR *pDesc);