projects
/
pub
/
lufa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed swapped paremeters in the HID state memory copy call while processing a HID...
[pub/lufa.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
3a4faff
..
a42f8af
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Host/HID.c
+++ b/
LUFA/Drivers/USB/Class/Host/HID.c
@@
-127,11
+127,21
@@
void HID_Host_USBTask(USB_ClassInfo_HID_Host_t* HIDInterfaceInfo)
\r
}
\r
\r
\r
}
\r
\r
-
void
HID_Host_IsReportReceived(USB_ClassInfo_HID_Host_t* HIDInterfaceInfo)
\r
+
bool
HID_Host_IsReportReceived(USB_ClassInfo_HID_Host_t* HIDInterfaceInfo)
\r
{
\r
{
\r
+ bool ReportReceived;
\r
+
\r
+ if ((USB_HostState != HOST_STATE_Configured) || !(HIDInterfaceInfo->State.Active))
\r
+ return false;
\r
+
\r
Pipe_SelectPipe(HIDInterfaceInfo->Config.DataINPipeNumber);
\r
Pipe_SelectPipe(HIDInterfaceInfo->Config.DataINPipeNumber);
\r
+ Pipe_Unfreeze();
\r
+
\r
+ ReportReceived = Pipe_IsReadWriteAllowed();
\r
+
\r
+ Pipe_Freeze();
\r
\r
\r
- return
Pipe_IsReadWriteAllowed()
;
\r
+ return
ReportReceived
;
\r
}
\r
\r
#endif
\r
}
\r
\r
#endif
\r