diff --git a/examples/stm32/f1/lisa-m/usb_cdcacm/cdcacm.c b/examples/stm32/f1/lisa-m/usb_cdcacm/cdcacm.c index 74823283..7108263d 100644 --- a/examples/stm32/f1/lisa-m/usb_cdcacm/cdcacm.c +++ b/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; }