|
|
@ -55,6 +55,13 @@ HAL_StatusTypeDef Upstream_HID_GetNextReport(UpstreamHidSendReportCallback callb
|
|
|
|
return HAL_ERROR;
|
|
|
|
return HAL_ERROR;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Just return if we already have an outstanding request
|
|
|
|
|
|
|
|
if (ReportCallback != NULL)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return HAL_OK;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
ReportCallback = callback;
|
|
|
|
|
|
|
|
|
|
|
|
//Release packet used for last transaction (if any)
|
|
|
|
//Release packet used for last transaction (if any)
|
|
|
|
if (UpstreamHidPacket != NULL)
|
|
|
|
if (UpstreamHidPacket != NULL)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -62,8 +69,6 @@ HAL_StatusTypeDef Upstream_HID_GetNextReport(UpstreamHidSendReportCallback callb
|
|
|
|
UpstreamHidPacket = NULL;
|
|
|
|
UpstreamHidPacket = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ReportCallback = callback;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
freePacket = Upstream_GetFreePacketImmediately();
|
|
|
|
freePacket = Upstream_GetFreePacketImmediately();
|
|
|
|
if (freePacket == NULL)
|
|
|
|
if (freePacket == NULL)
|
|
|
|
{
|
|
|
|
{
|
|
|
|