libusb provides libusb_set_interface_alt_setting() method for providing alternate setting for an interface. My question is what is the meaning of having alternate setting for a interface.
if ((ret = libusb_claim_interface(handle, interface)) == LIBUSB_SUCCESS)
{
printf("%s: interface %d claimed.\n", __FUNCTION__, interface);
/* Set alternate interface */
if ((ret = libusb_set_interface_alt_setting(handle, interface, alternate)) == LIBUSB_SUCCESS)
{
printf("%s: alternate interface %d set.\n", __FUNCTION__, alternate);
return CIMAX_USB_NO_ERROR;
}
else
printf("%s: setting alternate interface %d failed (%s)!\n", __FUNCTION__, alternate, libusb_error_name(ret));
}
else
printf("%s: claim interface %d failed (%s)!\n", __FUNCTION__, interface, libusb_error_name(ret));