if(size < 9) {
return -1;
}
- usb_get_descriptor(dev, INTERFACE, index, buf, 8);
- usb_get_descriptor(dev, INTERFACE, index, buf, size >= buf[0] ? buf[0] : size);
+ usb_get_descriptor(dev, INTERFACE, index, buf, 9);
return 0;
}
s8 usb_set_configuration(struct usb_device *dev, u8 configuration)
{
-
+ u8 buf[64];
+ usb_control_msg(dev, 0x00, SET_CONFIGURATION, configuration, 0, 0, buf, 0);
return 0;
}