/* Sends a DATA OUT packets on control endpoint.  */
static void main_usb_wait_out(uint8_t *payload, uint8_t size)
/* Sends a DATA OUT packets on control endpoint.  */
static void main_usb_wait_out(uint8_t *payload, uint8_t size)
{
	uint8_t nb_data;
	do {
		while (!Is_udd_out_received(0));
		nb_data = udd_byte_count(0);
		uint8_t *ptr_src = (uint8_t *) & udd_get_endpoint_fifo_access(0, 8);
		for (uint8_t i = 0; (i < nb_data) && size; i++) {
			*payload++ = *ptr_src++;
			size--;
		}
		udd_ack_out_received(0);
	} while(size);
}