/* Waits a DATA IN packets on control endpoint.  */
static void main_usb_send_in(uint8_t *payload, uint8_t size)
/* Waits a DATA IN packets on control endpoint.  */
static void main_usb_send_in(uint8_t *payload, uint8_t size)
{
	uint8_t *ptr_dest;
	do {
		while (!Is_udd_in_send(0));
		ptr_dest = (uint8_t *) & udd_get_endpoint_fifo_access(0, 8);
		for (uint8_t i = 0; (i<udd_get_endpoint_size(0)) && size; i++) {
			*ptr_dest++ = *payload++;
			size--;
		}
		udd_ack_in_send(0);
	} while (size);
	while (!Is_udd_in_send(0));
}