projects
/
pub
/
lufa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add explicit guards to all device mode tasks to ensure the device is connected and...
[pub/lufa.git]
/
LUFA
/
Drivers
/
USB
/
Class
/
Device
/
HID.c
diff --git
a/LUFA/Drivers/USB/Class/Device/HID.c
b/LUFA/Drivers/USB/Class/Device/HID.c
index
2ac0dd3
..
4a6295a
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Device/HID.c
+++ b/
LUFA/Drivers/USB/Class/Device/HID.c
@@
-152,7
+152,7
@@
bool HID_Device_ConfigureEndpoints(USB_ClassInfo_HID_Device_t* const HIDInterfac
\r
void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo)
\r
{
\r
\r
void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo)
\r
{
\r
- if (!(USB_IsConnected))
\r
+ if (!(USB_IsConnected)
|| !(USB_ConfigurationNumber)
)
\r
return;
\r
\r
Endpoint_SelectEndpoint(HIDInterfaceInfo->Config.ReportINEndpointNumber);
\r
return;
\r
\r
Endpoint_SelectEndpoint(HIDInterfaceInfo->Config.ReportINEndpointNumber);
\r