struct usb_irp *irp = (struct usb_irp*)malloc(sizeof(struct usb_irp));
irp->dev = dev;
irp->endpoint = 0;
-
+
irp->epsize = dev->bMaxPacketSize0;
irp->type = USB_CTRL;
off += 7;
}
}
-
- printf("=============\nafter usb_get_desc_config_ext:\n");
- hexdump((void*) gbuf, dev->conf->wTotalLength);
return 0;
}
u8 usb_get_configuration(struct usb_device *dev)
{
cleargbuf();
- usb_control_msg(dev, 0x80, GET_CONFIGURATION, 0, 0, 8, gbuf, 0);
+ usb_control_msg(dev, 0x80, GET_CONFIGURATION, 0, 0, 4, gbuf, 0);
+ printf("=============\nafter usb_get_configuration:\n");
+ hexdump((void*) gbuf, 1);
return gbuf[0];
}