...
int : integer type
This typeThis function returns true (ST_OK=0) if if the selected BulkEndPoint exists in the firmware (it is able to find the module selected by CardNumberinstantiate the driver buffer). If unable to do so, it returns false (ST_ERROR=1).
...
Code Block | ||
---|---|---|
| ||
int RX_PACKET_LEN = 51200;//102400; int packetlen = RX_PACKET_LEN; unsigned int packets = 500;//1200;//1200; unsigned int DeviceDriverBufferSize = 131072102400;//409600;//131072; unsigned long TIMEOUT= 18200; byte * data; byte * data_temp = NULL; unsigned int total_cnt = 0; unsigned int errors = 0; data = new byte [RX_PACKET_LEN*packets]; //allocate memory PI_PipeNumber PipeNo = PI_EP6; //test starts test SendFPGAcommand(USBDeviceList,FX22MB_REG0_START_TX); CCyBulkEndPoint *BulkInEP = NULL; TE_USB_FX2_GetData_InstanceDriverBuffer (USBDeviceList, &BulkInEP, PipeNo, TIMEOUT, DeviceDriverBufferSize); ElapsedTime.Start(); //StopWatch start for (unsigned int i = 0; i < packets; i++) { packetlen = TX_PACKET_LEN; data_temp = &data[total_cnt]; if (TE_USB_FX2_GetData(&BulkInEP, data_temp, packetlen)) { cout << "ERROR read" << endl; errors++; break; } total_cnt += packetlen; } //StopWatch ends TheElapsedTime = ElapsedTime.Stop(false); //test stops SendFPGAcommand(USBDevicelist,FX22MB_REG0_STOP); |