2 Replies Latest reply on Sep 24, 2012 7:04 AM by jet.zou

    problem with pktend

    jet.zou

      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.

        • 1. Re: problem with pktend
          rama.sai.krishna.vakkantula

          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,

          • 2. Re: problem with pktend
            jet.zou

            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.