diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-12-02 04:28:53 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-12-02 04:28:53 +0000 |
commit | b20d25854d7134ed5c73bfcd852a6e3e4febdc0b (patch) | |
tree | 8a5baab95c537d328dc4a0c695148393077e6c98 /LUFA/Drivers | |
parent | ed9d77aeee3a192852ca2419b7cfa58d39073036 (diff) | |
download | lufa-b20d25854d7134ed5c73bfcd852a6e3e4febdc0b.tar.gz lufa-b20d25854d7134ed5c73bfcd852a6e3e4febdc0b.tar.bz2 lufa-b20d25854d7134ed5c73bfcd852a6e3e4febdc0b.zip |
Fixed HID hpst class driver incorrectly binding to HID devices that do not have an OUT endpoint.
Diffstat (limited to 'LUFA/Drivers')
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/HID.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/LUFA/Drivers/USB/Class/Host/HID.c b/LUFA/Drivers/USB/Class/Host/HID.c index e6c575e21..427dbd56d 100644 --- a/LUFA/Drivers/USB/Class/Host/HID.c +++ b/LUFA/Drivers/USB/Class/Host/HID.c @@ -88,7 +88,7 @@ uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo USB_Descriptor_Endpoint_t* EndpointData = DESCRIPTOR_PCAST(ConfigDescriptorData, USB_Descriptor_Endpoint_t); if (EndpointData->EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN) - DataINEndpoint = EndpointData; + DataINEndpoint = EndpointData; else DataOUTEndpoint = EndpointData; } @@ -115,6 +115,9 @@ uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo } else if (PipeNum == HIDInterfaceInfo->Config.DataOUTPipeNumber) { + if (DataOUTEndpoint == NULL) + continue; + Size = DataOUTEndpoint->EndpointSize; EndpointAddress = DataOUTEndpoint->EndpointAddress; Token = PIPE_TOKEN_OUT; |