Fixed an application side buffer issue where resending the data failed. Now the example will retry to send the mirror data untill it succeeds.

Also decreased the buffer back to 64 as it needs to be changed in more
then one place.
This commit is contained in:
Piotr Esden-Tempski 2011-10-30 22:54:49 -07:00
parent 4c26739ea2
commit 990109ef47

View File

@ -200,10 +200,10 @@ static void cdcacm_data_rx_cb(u8 ep)
{ {
(void)ep; (void)ep;
char buf[128]; char buf[64];
int len = usbd_ep_read_packet(0x01, buf, 128); int len = usbd_ep_read_packet(0x01, buf, 64);
if(len) { if(len) {
usbd_ep_write_packet(0x82, buf, len); while(usbd_ep_write_packet(0x82, buf, len) == 0);
buf[len] = 0; buf[len] = 0;
} }