From 7a1fe0fb6535b53e45e2faccc30f17d0ee503f66 Mon Sep 17 00:00:00 2001 From: Robert Fisk Date: Mon, 10 Oct 2016 01:53:50 +1300 Subject: [PATCH] Fix for mouse movement before waking from suspend --- Upstream/Src/upstream_hid.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Upstream/Src/upstream_hid.c b/Upstream/Src/upstream_hid.c index 942c695..e8b1283 100644 --- a/Upstream/Src/upstream_hid.c +++ b/Upstream/Src/upstream_hid.c @@ -153,9 +153,7 @@ static void Upstream_HID_ReceiveInterruptReportCallback(UpstreamPacketTypeDef* r { if (Upstream_StateMachine_GetSuspendState()) { - //Send wakeup signal to host instead of returning data packet - GetReportCallback = NULL; - Upstream_StateMachine_Wakeup(); + Upstream_StateMachine_Wakeup(); //Send wakeup signal to host } } @@ -187,9 +185,7 @@ static void Upstream_HID_ReceiveInterruptReportCallback(UpstreamPacketTypeDef* r if (Upstream_StateMachine_GetSuspendState()) { - //Send wakeup signal to host instead of returning data packet - GetReportCallback = NULL; - Upstream_StateMachine_Wakeup(); + Upstream_StateMachine_Wakeup(); //Send wakeup signal to host } //Other keyboard sanity checks here... @@ -203,7 +199,8 @@ static void Upstream_HID_ReceiveInterruptReportCallback(UpstreamPacketTypeDef* r } if ((GetReportCallback == NULL) || - (UpstreamHidPacket != NULL)) + (UpstreamHidPacket != NULL) || + (Upstream_StateMachine_GetSuspendState())) { Upstream_ReleasePacket(receivedPacket); }