/* Retrieves the next byte from the host in the CDC data OUT endpoint, and clears the endpoint bank if needed to allow reception of the next data packet from the host. */
static uint8_t FetchNextCommandByte(void)
/* Retrieves the next byte from the host in the CDC data OUT endpoint, and clears the endpoint bank if needed to allow reception of the next data packet from the host. */
static uint8_t FetchNextCommandByte(void)
{
	Endpoint_SelectEndpoint(CDC_RX_EPADDR);
	while (!(Endpoint_IsReadWriteAllowed()))
	{
		Endpoint_ClearOUT();
		while (!(Endpoint_IsOUTReceived()))
		{
			if (USB_DeviceState == DEVICE_STATE_Unattached)
			  return 0;
		}
	}
	return Endpoint_Read_8();
}