mirror of
https://github.com/zsa/qmk_firmware.git
synced 2026-05-03 14:07:46 +00:00
Fix possible infinite loop in the control stream write template functions.
This commit is contained in:
@@ -79,6 +79,8 @@ uint8_t TEMPLATE_FUNC_NAME (const void* const Buffer,
|
|||||||
return ENDPOINT_RWCSTREAM_DeviceDisconnected;
|
return ENDPOINT_RWCSTREAM_DeviceDisconnected;
|
||||||
else if (USB_DeviceState_LCL == DEVICE_STATE_Suspended)
|
else if (USB_DeviceState_LCL == DEVICE_STATE_Suspended)
|
||||||
return ENDPOINT_RWCSTREAM_BusSuspended;
|
return ENDPOINT_RWCSTREAM_BusSuspended;
|
||||||
|
else if (Endpoint_IsSETUPReceived())
|
||||||
|
return ENDPOINT_RWCSTREAM_HostAborted;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ENDPOINT_RWCSTREAM_NoError;
|
return ENDPOINT_RWCSTREAM_NoError;
|
||||||
|
|||||||
@@ -79,6 +79,8 @@ uint8_t TEMPLATE_FUNC_NAME (const void* const Buffer,
|
|||||||
return ENDPOINT_RWCSTREAM_DeviceDisconnected;
|
return ENDPOINT_RWCSTREAM_DeviceDisconnected;
|
||||||
else if (USB_DeviceState_LCL == DEVICE_STATE_Suspended)
|
else if (USB_DeviceState_LCL == DEVICE_STATE_Suspended)
|
||||||
return ENDPOINT_RWCSTREAM_BusSuspended;
|
return ENDPOINT_RWCSTREAM_BusSuspended;
|
||||||
|
else if (Endpoint_IsSETUPReceived())
|
||||||
|
return ENDPOINT_RWCSTREAM_HostAborted;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ENDPOINT_RWCSTREAM_NoError;
|
return ENDPOINT_RWCSTREAM_NoError;
|
||||||
|
|||||||
@@ -81,6 +81,8 @@ uint8_t TEMPLATE_FUNC_NAME (const void* const Buffer,
|
|||||||
return ENDPOINT_RWCSTREAM_DeviceDisconnected;
|
return ENDPOINT_RWCSTREAM_DeviceDisconnected;
|
||||||
else if (USB_DeviceState_LCL == DEVICE_STATE_Suspended)
|
else if (USB_DeviceState_LCL == DEVICE_STATE_Suspended)
|
||||||
return ENDPOINT_RWCSTREAM_BusSuspended;
|
return ENDPOINT_RWCSTREAM_BusSuspended;
|
||||||
|
else if (Endpoint_IsSETUPReceived())
|
||||||
|
return ENDPOINT_RWCSTREAM_HostAborted;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ENDPOINT_RWCSTREAM_NoError;
|
return ENDPOINT_RWCSTREAM_NoError;
|
||||||
|
|||||||
Reference in New Issue
Block a user