hi everyone, I need to transfer 16 bytes data block (a packet of 16 bytes data) from PC to DE2 board and then the DE2 board will send the data back to PC. I’m use the firmware of device controller of isp1362 chip on de2 board to transfer the data. below is one part of my codings: (this is the coding from interrupt service routine,ISR.c) void Isr_Ep02Done(void) { unsigned char bbuf[16]; int i = 0; Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP02); Hal4D13_ReadEndpoint(EPINDEX4EP02,&bbuf, 16); //error was found here if( sendCount < length) { Hal4D13_WriteEndpoint(EPINDEX4EP02, data + sendCount, 16); Hal4D13_GetEndpointStatusWInteruptClear(EPINDEX4EP02); sendCount += 16; if(sendCount > length) { sendCount = 0; //memset(data, 0, sizeof(char)); length = 0; for( i = 0; i < 65; i++) data[i] = 0; } } } the error I get from NIOS II IDE : passing arg 2 of 'Hal4D13_ReadEndpoint' from imcompatible pointer type. can someone give me idea how to debug this? ps:#define EPINDEX4EP02 0x3 USHORT Hal4D13_ReadEndpoint(UCHAR bEPIndex, UCHAR * buf, USHORT len); USHORT Hal4D13_ReadEndpointWOClearBuffer(UCHAR bEPIndex, UCHAR * buf, USHORT len); USHORT Hal4D13_WriteEndpoint(UCHAR bEPIndex, UCHAR * buf, USHORT len); Thanks, summer --------------------------------------- Posted through http://www.FPGARelated.com
usb transfer between PC and de2 board
Started by ●January 29, 2010