X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/05ac59d0eeb956adc316d89ee06ca13bd3c11aac..e61345f872fc7f1a8b95e53ee68b4dbdea0650db:/LUFA/Drivers/USB/Class/Host/HID.c?ds=sidebyside diff --git a/LUFA/Drivers/USB/Class/Host/HID.c b/LUFA/Drivers/USB/Class/Host/HID.c index 9415c8603..0642ecd40 100644 --- a/LUFA/Drivers/USB/Class/Host/HID.c +++ b/LUFA/Drivers/USB/Class/Host/HID.c @@ -36,7 +36,8 @@ #define __INCLUDE_FROM_HID_DRIVER #include "HID.h" -uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, uint16_t ConfigDescriptorSize, +uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, + uint16_t ConfigDescriptorSize, void* ConfigDescriptorData) { uint8_t FoundEndpoints = 0; @@ -68,7 +69,7 @@ uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo return HID_ENUMERROR_NoHIDDescriptorFound; } - HIDInterfaceInfo->State.HIDReportSize = DESCRIPTOR_CAST(ConfigDescriptorData, USB_HID_Descriptor_t).HIDReportLength; + HIDInterfaceInfo->State.HIDReportSize = DESCRIPTOR_CAST(ConfigDescriptorData, USB_HID_Descriptor_HID_t).HIDReportLength; while (FoundEndpoints != (HID_FOUND_DATAPIPE_IN | HID_FOUND_DATAPIPE_OUT)) { @@ -153,7 +154,9 @@ static uint8_t DCOMP_HID_Host_NextHIDInterfaceEndpoint(void* const CurrentDescri } #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY) -uint8_t HID_Host_ReceiveReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, const uint8_t ReportID, void* Buffer) +uint8_t HID_Host_ReceiveReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, + const uint8_t ReportID, + void* Buffer) { USB_ControlRequest = (USB_Request_Header_t) { @@ -170,7 +173,8 @@ uint8_t HID_Host_ReceiveReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceI } #endif -uint8_t HID_Host_ReceiveReport(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, void* Buffer) +uint8_t HID_Host_ReceiveReport(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo, + void* Buffer) { if ((USB_HostState != HOST_STATE_Configured) || !(HIDInterfaceInfo->State.IsActive)) return PIPE_READYWAIT_DeviceDisconnected; @@ -215,7 +219,9 @@ uint8_t HID_Host_SendReportByID(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY) const uint8_t ReportID, #endif - const uint8_t ReportType, void* Buffer, const uint16_t ReportSize) + const uint8_t ReportType, + void* Buffer, + const uint16_t ReportSize) { #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY) if ((USB_HostState != HOST_STATE_Configured) || !(HIDInterfaceInfo->State.IsActive))