mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
We need to make room for the control endpoint in the HIDInterface struct as well
This is needed as the in and out endpoint are defined as follows: static const uint8_t epInterruptInIndex = 1; // InterruptIN endpoint index static const uint8_t epInterruptOutIndex = 2; // InterruptOUT endpoint index And maxEpPerInterface is set to 2. See: https://travis-ci.org/felis/USB_Host_Shield_2.0/jobs/569260660
This commit is contained in:
parent
d182729ed8
commit
912decede5
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
2
usbhid.h
2
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);
|
||||
|
|
Loading…
Reference in a new issue