Hello! I have a AT91SAM7S with a modified ATMEL Virtual Com Application (CDC Application from softpack-1.4-at91sam7s-ek-web) Everything works fine if I transfer an Array of bytes from the controller to the PC.
static unsigned char buffer[VALUES]; //USB Transmit Buffer [...] CDCDSerialDriver_Write(buffer, VALUES, 0, 0); //Send via USB to PC
CDCDSerialDriver_Write is a function from the Framework and is defined as:
unsigned char CDCDSerialDriver_Write(void *data, unsigned int size, TransferCallback callback, void *argument)
but then I tried to send 16bit Values: static short buffer[VALUES]; //USB Transmit Buffer [...] CDCDSerialDriver_Write(buffer, VALUES*2, 0, 0); //Send via USB to PC The data is completely transmitted, but the order of the bytes (not BITS!) is interchanged. First comes the LOWBYTE and then the HIGHBYTE, but I need the Highbyte first and then the Lowbyte and I haven't enough time to change the Order before sending. Changing the PC applichation to read the data in a different Order is also impossible. What can I do?