State information for class drivers is now zeroed out during enumeration (both in device and host mode) to ensure sane values after each enumeration. User code should no longer explicitly set state information as this is no longer preserved.
This commit is contained in:
@@ -135,6 +135,8 @@ void HID_Device_ProcessControlPacket(USB_ClassInfo_HID_Device_t* const HIDInterf
|
||||
|
||||
bool HID_Device_ConfigureEndpoints(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo)
|
||||
{
|
||||
memset(&HIDInterfaceInfo->State, 0x00, sizeof(HIDInterfaceInfo->State));
|
||||
HIDInterfaceInfo->State.IdleCount = 500;
|
||||
HIDInterfaceInfo->State.UsingReportProtocol = true;
|
||||
|
||||
if (!(Endpoint_ConfigureEndpoint(HIDInterfaceInfo->Config.ReportINEndpointNumber, EP_TYPE_INTERRUPT,
|
||||
|
||||
Reference in New Issue
Block a user