void TD_Poll(void) // Called repeatedly while the device is idle
{
WORD count;
//unsigned char temp;
WORD i;
if(!(EP2468STAT & bmEP2EMPTY))
{
count = EP2BCH;
count = (count << 8) + EP2BCL;
// 循环将端点2中的数据取出,因为单片机指令慢,会影响测试速度
for( i = 0x0000; i < count; i++ )
{
// setup to transfer EP2OUT buffer to EP6IN buffer using AUTOPOINTER(s)
if(EP2FIFOBUF==0x31)