This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How can I know whether a disk is inserted to the usb host on 6748 evm

Dear senior engineer:

    My development hardware is the 6748 evm. I am using biosusb by rtfs to access the usb host. I need a function that can check whether a disk is inserted to the usb host as soon as possible. From the rtfs example I am using the function "getdriveid" to check the usb host state, the code is:

 

	int i = 0;
int ret;
do
{
ret = getdriveid( BFS_DEVICE_TYPE_USB, 0, 0, gUDiskDriverId );
if( ret != -1 )
{
printf( "USB: %s getdriveid success\n", gUDiskDriverId );
TSK_sleep( 10 );
return true;
}
else
{
TSK_sleep( 10 );
}
} while( ++i < 200 );
   This code can work correctly, but when there is no disk in usb host, the code will take a long time for time out. Is there a fast way to check the usb host state even there is no 
disk in usb host. 
  Thanks a lot.