host_dev_info hi;
host_eop_info cfg_eop;
bool ignore_device = false;
- int err, sz, txed;
+ int err, sz;
+ unsigned txed;
int config_val;
hi = h->dev->create_dev_channel (h->info, ADDR_DEFAULT, USB_VERSION_1_1);
sz = usb_tx_all (&dev->cfg_eop, cd, dsz,
sizeof (struct config_descriptor), true);
- if (sz < sizeof (struct config_descriptor))
+ if (sz < (int) sizeof (struct config_descriptor))
{
printf ("USB: Did not rx GET descriptor (%d bytes, expected %d)\n", sz,
sizeof (struct config_descriptor));
sp.value = (SETUP_DESC_STRING << 8) | ndx;
sp.index = 0;
sp.length = MAX_USB_STR;
- udev->host->dev->tx_pkt (udev->h_cfg_eop, USB_TOKEN_SETUP,
- &sp, 0, sizeof (sp), NULL, false);
+
+ if (udev->host->dev->tx_pkt (udev->h_cfg_eop, USB_TOKEN_SETUP,
+ &sp, 0, sizeof (sp), NULL, true)
+ != USB_HOST_ERR_NONE)
+ return NULL;
+
sz = usb_tx_all (&udev->cfg_eop, &str, MAX_USB_STR, 2, true);
sz +=
usb_tx_all (&udev->cfg_eop, str + sz, (uint8_t) (str[0]) - sz, 0, true);