我想問(wèn)一下,我在參考貴公司編寫(xiě)的與PC通信的程序,發(fā)現(xiàn)每次發(fā)送32個(gè)字節(jié)的數(shù)據(jù)后,要等待上位機(jī)PC發(fā)送中斷,才能進(jìn)行下次傳送,如何實(shí)現(xiàn)更快連續(xù)的傳輸呢 CH375_CMD_PORT_d_out( CMD_WR_USB_DATA7 ); cnt=32; CH375_DAT_PORT_d_out( cnt ); if ( cnt ) { buf = UsbBuffer; do { CH375_DAT_PORT_d_out( *buf ); buf ++; } while ( -- cnt ); }
mIntStatus = mWaitInterrupt( ); /* 這里每次都要等待PC產(chǎn)生中斷 */ if ( mIntStatus == USB_INT_EP2_IN ) { CH375_CMD_PORT_d_out( CMD_UNLOCK_USB ); } else if ( mIntStatus == USB_INT_EP1_IN ) { CH375_CMD_PORT_d_out( CMD_UNLOCK_USB ); }