Hello!
I need to send arrays of data over the USB to PC with use of USB-CDC example offered by KEIL (LPC1768). The code goes something like that:
unsigned char dataToSend[] = {'L','E','O','S','S','\n','\r'}; while(Cnt < 5) { USB_WriteEP (CDC_DEP_IN, (unsigned char *)&dataToSend[0], 7); Cnt++; }
As I understand I do the overrun on CDC_DEP_IN. Is there a way to see if the EP is busy? Or even better is there a way to form a Interrupt when CDC_DEP_IN finishes transmitting?
Thanks for the help!
Make sure you don't exceed the size of the hardware buffer. Check you're user manual for additonal exceptions associated with USB.
Ok,
Upper code was just an example... This is not THE problem which I'm facing... :) :)
Just an aside:
unsigned char dataToSend[] = {'L','E','O','S','S','\n','\r'};
Why not:
unsigned char dataToSend[] = "LEOSS\n\r";
Also note that the "normal" sequence is \r before \n; ie, "CRLF"