acassis commented on code in PR #17484:
URL: https://github.com/apache/nuttx/pull/17484#discussion_r2615090119


##########
arch/sim/src/sim/posix/sim_libusb.c:
##########
@@ -283,6 +283,37 @@ static void host_libusb_inttransfer_cb(struct 
libusb_transfer *transfer)
   host_uninterruptible_no_return(libusb_free_transfer, transfer);
 }
 
+#ifndef CONFIG_USBHOST_ISOC_DISABLE
+static void host_libusb_isotransfer_cb(struct libusb_transfer *transfer)
+{
+  struct host_libusb_hostdev_s *dev = &g_libusb_dev;
+  struct host_usb_datareq_s *datareq;
+
+  if (!transfer)

Review Comment:
   ```suggestion
     if (transfer == NULL)



##########
arch/sim/src/sim/posix/sim_libusb.c:
##########
@@ -441,6 +472,47 @@ host_libusb_inttransfer(struct host_libusb_hostdev_s *dev, 
uint8_t addr,
   return ret;
 }
 
+#ifndef CONFIG_USBHOST_ISOC_DISABLE
+static int
+host_libusb_isotransfer(struct host_libusb_hostdev_s *dev, uint8_t addr,
+                        struct host_usb_datareq_s *datareq)
+{
+  struct libusb_transfer *transfer;
+  int max_packet_size;
+  int num_iso_pack;
+  int ret;
+
+  max_packet_size = host_uninterruptible(libusb_get_max_iso_packet_size,
+                                         dev->priv,
+                                         addr);
+  num_iso_pack = (datareq->len + max_packet_size - 1) / max_packet_size;
+  transfer = host_uninterruptible(libusb_alloc_transfer, num_iso_pack);
+  if (!transfer)

Review Comment:
   ```suggestion
     if (transfer == NULL)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to