Added new NO_DEVICE_SELF_POWER and NO_DEVICE_REMOTE_WAKEUP compile time options.

This commit is contained in:
Dean Camera 2009-12-20 13:00:49 +00:00
parent 77cd3a42a7
commit 8b75659563
14 changed files with 146 additions and 86 deletions

View file

@ -21,13 +21,16 @@ uint8_t TEMPLATE_FUNC_NAME (const void* Buffer, uint16_t Length)
if (Endpoint_IsINReady())
{
while (Length && (Endpoint_BytesInEndpoint() < USB_ControlEndpointSize))
uint16_t BytesInEndpoint = Endpoint_BytesInEndpoint();
while (Length && (BytesInEndpoint < USB_ControlEndpointSize))
{
TEMPLATE_TRANSFER_BYTE(DataStream);
Length--;
BytesInEndpoint++;
}
LastPacketFull = (Endpoint_BytesInEndpoint() == USB_ControlEndpointSize);
LastPacketFull = (BytesInEndpoint == USB_ControlEndpointSize);
Endpoint_ClearIN();
}
}