Просмотр исходного кода

Enable iso buffers per rp2040 spec

Nicholas R Dinsmore 5 лет назад
Родитель
Сommit
79b360f0a6
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      src/portable/raspberrypi/rp2040/rp2040_usb.c

+ 8 - 0
src/portable/raspberrypi/rp2040/rp2040_usb.c

@@ -154,6 +154,14 @@ void _hw_endpoint_xfer_start(struct hw_endpoint *ep, uint8_t *buffer, uint16_t t
     ep->total_len = total_len;
     ep->len = 0;
     // FIXME: What if low speed
+    if(ep->transfer_type == TUSB_XFER_ISOCHRONOUS)
+    {
+        ep->transfer_size = total_len; //There is an assumption that the max buffer size of 1023 or 1024 was checked before this
+    }
+    else
+    {
+        ep->transfer_size = total_len > 64 ? 64 : total_len;
+    }
     ep->transfer_size = total_len > 64 ? 64 : total_len;
     ep->active = true;
     ep->user_buf = buffer;