/* Waits a USB start of frame (or 1ms for USB low speed)  */
static void main_usb_wait_sof(void)
/* Waits a USB start of frame (or 1ms for USB low speed)  */
static void main_usb_wait_sof(void)
{
	if (Is_udd_low_speed_enable()) {
		delay_ms(1);
		return;
	}
	udd_ack_sof();
	while (!Is_udd_sof()) {
	}
	udd_ack_sof();
}