12.01.2015 Views

Dewesoft C++ DLL to Simplified Trenz Electronic C++ DLL Porting ...

Dewesoft C++ DLL to Simplified Trenz Electronic C++ DLL Porting ...

Dewesoft C++ DLL to Simplified Trenz Electronic C++ DLL Porting ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Dewesoft</strong> <strong>C++</strong> <strong>DLL</strong><br />

void WriteData(unsigned int handle)<br />

{<br />

int packetlen = TX_PACKET_LEN;<br />

unsigned int packets = 1200;<br />

byte * data;<br />

unsigned int <strong>to</strong>tal_cnt = 0;<br />

unsigned int errors = 0;<br />

data = new byte [TX_PACKET_LEN*packets];<br />

//allocate memory<br />

SetData (data);<br />

ResetFX2FifoStatus(handle);<br />

SendFPGAcommand(handle,FX22MB_REG0_START_RX);<br />

//starts test<br />

ElapsedTime.Start();<br />

//S<strong>to</strong>pWatch start<br />

for (unsigned int i = 0; i < packets; i++)<br />

{<br />

packetlen = TX_PACKET_LEN;<br />

if (TE0300_GetData(handle, data+<strong>to</strong>tal_cnt, &packetlen,<br />

PI_EP8,TIMEOUT_MS))<br />

{<br />

cout

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!