Browse Source

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.
pull/2/head
Piotr Esden-Tempski 13 years ago
parent
commit
990109ef47
  1. 6
      examples/stm32/f1/lisa-m/usb_cdcacm/cdcacm.c

6
examples/stm32/f1/lisa-m/usb_cdcacm/cdcacm.c

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

Loading…
Cancel
Save