Example #1
0
void usb_wait_for_configuration(void)   
{   
  volatile hal_usb_state_t usb_hal_state;   
  do   
  {   
    usb_hal_state = hal_usb_get_state();   
  }   
  while(usb_hal_state != CONFIGURED);   
}
Example #2
0
void usb_wait_for_configuration(void)
{
	int i=0;
        volatile hal_usb_state_t usb_hal_state;
        do
        {
            usb_hal_state = hal_usb_get_state();
			if(i>10)
				usb_hal_state=CONFIGURED;
			i++;
		}
        while(usb_hal_state != CONFIGURED);
}