- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello:
i use fx3 to get image data from fpga,but the fpga set the pktend pin frequently per frame,i can't get a complete frame by using cyapi.lib,can you tell me how can i use the api to get image frame completly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How are you reading the data from FX3 into PC. What functions of cyapi are you using. Paste that part of code here. I will look into it. Otherwise you can do onething, you can refer to the source code of the streamer application.
Regards,
sai krishna,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
code:
BOOL GetSensorData(BYTE *pOut, LONG bufsize)
{
OVERLAPPED inOvLap;
bool bRequest = FALSE;
inOvLap.hEvent = CreateEvent(NULL, false, false, NULL);
UCHAR *inContext = USBDevice->BulkInEndPt->BeginDataXfer(pOut,bufsize, &inOvLap);
if(!USBDevice->BulkInEndPt->WaitForXfer(&inOvLap,2000))
{
USBDevice->BulkInEndPt->Reset();
CloseHandle(inOvLap.hEvent);
return FALSE;
}
bRequest = USBDevice->BulkInEndPt->FinishDataXfer(pOut,bufsize, &inOvLap,inContext);
CloseHandle(inOvLap.hEvent);
if(!bRequest)
{
USBDevice->BulkInEndPt->Abort();
USBDevice->BulkInEndPt->Reset();
}
return bRequest ;
}
another question is that it looks like that the bufsize can't be too large,or this fuction will return FALSE, what should i do?
and i can't find cyusb.sys for 64 bit systerm.