![North Atlantic 8810A Скачать руководство пользователя страница 36](http://html.mh-extra.com/html/north-atlantic/8810a/8810a_programmers-reference-manual_1707615036.webp)
Soft Panel Program
{
ReinitUSB();
break;
}
}
// Get Reply if one is expected
if (bExpectReply)
{
if (glb_pUSBDevice->BulkInEndPt)
{
// Read data (note, max returned from Cypress USB is 64 bytes
BytesToRead = 64;
unsigned char aReceiveBuffer[64];
for (int i = 0; i < 64; i++)
aReceiveBuffer[i] = 0;
glb_pUSBDevice->BulkInEndPt->TimeOut = 10000; // 10 second timeout
bSuccess = glb_pUSBDevice->BulkInEndPt->XferData(aReceiveBuffer, BytesToRead);
num+;
if(!bSuccess)
{
Wait(500);
}
else
{
strcpy(pszReply, (char *)aReceiveBuffer);
}
}
else
bSuccess = true;
}
else
bSuccess = true;
}while((!bSuccess) && (numOfTries < 2));
}
else
{
ReinitUSB();
}
}
return bSuccess;
}
North Atlantic Industries, Inc.
631.567.1100/631.567.1823 (fax) Revision 2.0.0.2
Reference Guide
110 Wilbur Place, Bohemia, NY 11716
www.naii.com
/ e-mail:[email protected]
Page 36 of 50
8810A Programmer’s