34 #define __INCLUDE_FROM_USB_DRIVER
35 #include "../../Core/USBMode.h"
37 #if defined(USB_CAN_BE_HOST)
39 #define __INCLUDE_FROM_HID_DRIVER
40 #define __INCLUDE_FROM_HID_HOST_C
44 uint16_t ConfigDescriptorSize,
45 void* ConfigDescriptorData)
53 memset(&HIDInterfaceInfo->
State, 0x00,
sizeof(HIDInterfaceInfo->
State));
58 while (!(DataINEndpoint) || !(DataOUTEndpoint))
60 if (!(HIDInterface) ||
64 if (DataINEndpoint || DataOUTEndpoint)
87 DataINEndpoint =
NULL;
88 DataOUTEndpoint =
NULL;
96 DataINEndpoint = EndpointData;
98 DataOUTEndpoint = EndpointData;
107 uint8_t InterruptPeriod;
113 EndpointAddress = DataINEndpoint->EndpointAddress;
117 InterruptPeriod = DataINEndpoint->PollingIntervalMS;
123 if (DataOUTEndpoint ==
NULL)
127 EndpointAddress = DataOUTEndpoint->EndpointAddress;
131 InterruptPeriod = DataOUTEndpoint->PollingIntervalMS;
206 #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
208 const uint8_t ReportID,
239 uint8_t* BufferPos = Buffer;
241 #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
244 uint8_t ReportID = 0;
249 *(BufferPos++) = ReportID;
270 #
if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
271 const uint8_t ReportID,
273 const uint8_t ReportType,
275 const uint16_t ReportSize)
278 #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
307 #
if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
308 .wValue = ((ReportType + 1) << 8) | ReportID,
310 .wValue = ((ReportType + 1) << 8),
313 .wLength = ReportSize,
337 return ReportReceived;
375 .
wValue = ((MS << 6) & 0xFF00),
386 #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
434 HIDInterfaceInfo->
State.
LargestReportSize = (LargestReportSizeBits >> 3) + ((LargestReportSizeBits & 0x07) != 0);