Forum Discussion
Altera_Forum
Honored Contributor
18 years agoHi,
I'm using the code from DE2_NIOS_DEVICE_LED demonstration and I'm not able to send more than 8 bytes... Here is what I changed In void config_endpoint(void) of MAINLOOP.C: /*port2 is IN*/ Hal4D13_SetEndpointConfig( D13REG_EPCNFG_FIFO_EN| //D13REG_EPCNFG_DBLBUF_EN| D13REG_EPCNFG_IN_EN| D13REG_EPCNFG_NONISOSZ_16, <------- All I want is 16 bytes EPINDEX4EP02 ); Now in my main loop: static unsigned char bbuf[16]; ... Hal4D13_WriteEndpoint(EPINDEX4EP02,&bbuf, 16); And in my program in C#: [DllImport("EasyD12.dll")] private static extern byte ReadPort2(byte[] pData, int iLen); ReadPort2(buff, 16); My fisrt 8 bytes are correct but the 8 others are like copy of the 8 first.. Please help!