projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added support for the officially recommended layout of the external peripherals conne...
[pub/USBasp.git]
/
LUFA
/
Drivers
/
USB
/
Class
/
Host
/
HID.c
diff --git
a/LUFA/Drivers/USB/Class/Host/HID.c
b/LUFA/Drivers/USB/Class/Host/HID.c
index
5a5ec48
..
9b1ec16
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Host/HID.c
+++ b/
LUFA/Drivers/USB/Class/Host/HID.c
@@
-185,10
+185,15
@@
uint8_t USB_HID_Host_SetBootProtocol(USB_ClassInfo_HID_Host_t* HIDInterfaceInfo)
\r
Pipe_SelectPipe(PIPE_CONTROLPIPE);
\r
\r
\r
Pipe_SelectPipe(PIPE_CONTROLPIPE);
\r
\r
- if (!(HIDInterfaceInfo->State.SupportsBoot
SubClass
))
\r
+ if (!(HIDInterfaceInfo->State.SupportsBoot
Protocol
))
\r
return HID_ERROR_LOGICAL;
\r
return HID_ERROR_LOGICAL;
\r
+
\r
+ if ((ErrorCode = USB_Host_SendControlRequest(HIDReportData)) != HOST_SENDCONTROL_Successful)
\r
+ return ErrorCode;
\r
+
\r
+ HIDInterfaceInfo->State.UsingBootProtocol = true;
\r
\r
\r
- return
USB_Host_SendControlRequest(NULL)
;
\r
+ return
HOST_SENDCONTROL_Successful
;
\r
}
\r
\r
uint8_t USB_HID_Host_SetReportProtocol(USB_ClassInfo_HID_Host_t* HIDInterfaceInfo)
\r
}
\r
\r
uint8_t USB_HID_Host_SetReportProtocol(USB_ClassInfo_HID_Host_t* HIDInterfaceInfo)
\r
@@
-226,6
+231,8
@@
uint8_t USB_HID_Host_SetReportProtocol(USB_ClassInfo_HID_Host_t* HIDInterfaceInf
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
\r
return ErrorCode;
\r
\r
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
\r
return ErrorCode;
\r
\r
+ HIDInterfaceInfo->State.UsingBootProtocol = false;
\r
+
\r
if (HIDInterfaceInfo->Config.HIDParserData == NULL)
\r
return HID_ERROR_LOGICAL;
\r
\r
if (HIDInterfaceInfo->Config.HIDParserData == NULL)
\r
return HID_ERROR_LOGICAL;
\r
\r
@@
-234,7
+241,7
@@
uint8_t USB_HID_Host_SetReportProtocol(USB_ClassInfo_HID_Host_t* HIDInterfaceInf
{
\r
return HID_ERROR_LOGICAL | ErrorCode;
\r
}
\r
{
\r
return HID_ERROR_LOGICAL | ErrorCode;
\r
}
\r
-
\r
+
\r
return 0;
\r
}
\r
\r
return 0;
\r
}
\r
\r