|  | 
 
| 大神们: 下面是USB_dev_msc主函数的主循环, 我真的没看出来他是怎么调用读写函数进行USB读写的,还是说他就是等着用户自己在“// If there is no activity then return to the idle state.”处填写读写动作呢??谢谢了!
 while(1)
 {
 switch(g_eMSCState)
 {
 case MSC_DEV_READ:
 {
 //
 // Update the screen if necessary.
 //
 if(g_ulFlags & FLAG_UPDATE_STATUS)
 {
 UpdateStatus("Reading", 0);
 g_ulFlags &= ~FLAG_UPDATE_STATUS;
 }
 
 //
 // If there is no activity then return to the idle state.
 //
 if(g_ulIdleTimeout == 0)
 {
 UpdateStatus("Idle     ", 0);
 g_eMSCState = MSC_DEV_IDLE;
 }
 
 break;
 }
 case MSC_DEV_WRITE:
 {
 //
 // Update the screen if necessary.
 //
 if(g_ulFlags & FLAG_UPDATE_STATUS)
 {
 UpdateStatus("Writing ", 0);
 g_ulFlags &= ~FLAG_UPDATE_STATUS;
 }
 
 //
 // If there is no activity then return to the idle state.
 //
 if(g_ulIdleTimeout == 0)
 {
 UpdateStatus("Idle     ", 0);
 g_eMSCState = MSC_DEV_IDLE;
 }
 break;
 }
 case MSC_DEV_IDLE:
 default:
 {
 break;
 }
 }
 
 
 | 
 |