projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Build: Fix incorrect build target for Ubuntu CI builds.
[pub/USBasp.git]
/
LUFA
/
Drivers
/
USB
/
Class
/
Device
/
HIDClassDevice.c
diff --git
a/LUFA/Drivers/USB/Class/Device/HIDClassDevice.c
b/LUFA/Drivers/USB/Class/Device/HIDClassDevice.c
index
0ea915d
..
9c6a492
100644
(file)
--- a/
LUFA/Drivers/USB/Class/Device/HIDClassDevice.c
+++ b/
LUFA/Drivers/USB/Class/Device/HIDClassDevice.c
@@
-1,13
+1,13
@@
/*
LUFA Library
/*
LUFA Library
- Copyright (C) Dean Camera, 201
2
.
+ Copyright (C) Dean Camera, 201
9
.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
- Copyright 201
2
Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 201
9
Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
@@
-68,6
+68,10
@@
void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInter
Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
Endpoint_ClearSETUP();
Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
Endpoint_ClearSETUP();
+
+ if (ReportID)
+ Endpoint_Write_8(ReportID);
+
Endpoint_Write_Control_Stream_LE(ReportData, ReportSize);
Endpoint_ClearOUT();
}
Endpoint_Write_Control_Stream_LE(ReportData, ReportSize);
Endpoint_ClearOUT();
}
@@
-144,8
+148,8
@@
bool HID_Device_ConfigureEndpoints(USB_ClassInfo_HID_Device_t* const HIDInterfac
HIDInterfaceInfo->Config.ReportINEndpoint.Type = EP_TYPE_INTERRUPT;
if (!(Endpoint_ConfigureEndpointTable(&HIDInterfaceInfo->Config.ReportINEndpoint, 1)))
HIDInterfaceInfo->Config.ReportINEndpoint.Type = EP_TYPE_INTERRUPT;
if (!(Endpoint_ConfigureEndpointTable(&HIDInterfaceInfo->Config.ReportINEndpoint, 1)))
- return false;
-
+ return false;
+
return true;
}
return true;
}
@@
-155,8
+159,15
@@
void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo)
return;
if (HIDInterfaceInfo->State.PrevFrameNum == USB_Device_GetFrameNumber())
return;
if (HIDInterfaceInfo->State.PrevFrameNum == USB_Device_GetFrameNumber())
- return;
-
+ {
+ #if defined(USB_DEVICE_OPT_LOWSPEED)
+ if (!(USB_Options & USB_DEVICE_OPT_LOWSPEED))
+ return;
+ #else
+ return;
+ #endif
+ }
+
Endpoint_SelectEndpoint(HIDInterfaceInfo->Config.ReportINEndpoint.Address);
if (Endpoint_IsReadWriteAllowed())
Endpoint_SelectEndpoint(HIDInterfaceInfo->Config.ReportINEndpoint.Address);
if (Endpoint_IsReadWriteAllowed())
@@
-191,7
+202,7
@@
void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo)
Endpoint_ClearIN();
}
Endpoint_ClearIN();
}
-
+
HIDInterfaceInfo->State.PrevFrameNum = USB_Device_GetFrameNumber();
}
}
HIDInterfaceInfo->State.PrevFrameNum = USB_Device_GetFrameNumber();
}
}