Fix for mouse movement before waking from suspend

USG_1.0
Robert Fisk 8 years ago
parent 46ecbd410d
commit 7a1fe0fb65

@ -153,9 +153,7 @@ static void Upstream_HID_ReceiveInterruptReportCallback(UpstreamPacketTypeDef* r
{ {
if (Upstream_StateMachine_GetSuspendState()) if (Upstream_StateMachine_GetSuspendState())
{ {
//Send wakeup signal to host instead of returning data packet Upstream_StateMachine_Wakeup(); //Send wakeup signal to host
GetReportCallback = NULL;
Upstream_StateMachine_Wakeup();
} }
} }
@ -187,9 +185,7 @@ static void Upstream_HID_ReceiveInterruptReportCallback(UpstreamPacketTypeDef* r
if (Upstream_StateMachine_GetSuspendState()) if (Upstream_StateMachine_GetSuspendState())
{ {
//Send wakeup signal to host instead of returning data packet Upstream_StateMachine_Wakeup(); //Send wakeup signal to host
GetReportCallback = NULL;
Upstream_StateMachine_Wakeup();
} }
//Other keyboard sanity checks here... //Other keyboard sanity checks here...
@ -203,7 +199,8 @@ static void Upstream_HID_ReceiveInterruptReportCallback(UpstreamPacketTypeDef* r
} }
if ((GetReportCallback == NULL) || if ((GetReportCallback == NULL) ||
(UpstreamHidPacket != NULL)) (UpstreamHidPacket != NULL) ||
(Upstream_StateMachine_GetSuspendState()))
{ {
Upstream_ReleasePacket(receivedPacket); Upstream_ReleasePacket(receivedPacket);
} }

Loading…
Cancel
Save