I want to know how to modify the next function to send an structure and no the typedef BYTE;
USB_WriteEP(0x81,InReport, sizeof(InReport));
the structure is:
typedef struct{ unsigned char Header; RTC_TIME TStamp; // Timestamp Hs,Ms,Ss,mS. unsigned char IMU[18]; }S_IMUPACKET;
May be there is another way to send the data. I'm all ears :) Thanks..
The fourth alternative is to manually write code to repack the struct into a raw array of bytes, according to a - by you - predefined byte order.
Agree Per, it ensures the portability/ reusability of the code.
Anyway, the bottom line is holding a precise description of each byte of the packet, on a document. The choice is at your own policy.
Tsuneo
Thank You for the options
The last one works fine, but the others are very interesting too..
Thanks again ;)