/* Waits a SETUP packet and load data in main_setup_packet.  */
static void main_usb_wait_setup_packet(void)
/* Waits a SETUP packet and load data in main_setup_packet.  */
static void main_usb_wait_setup_packet(void)
{
	while (!Is_udd_setup_received(0));
	Assert(8 == udd_byte_count(0));
	uint8_t *ptr = (uint8_t *) & udd_get_endpoint_fifo_access(0,8);
	for (uint8_t i = 0; i < 8; i++) {
		((uint8_t*) &main_setup_packet)[i] = *ptr++;
	}
	udd_ack_setup_received(0);
}