openusb_get_altsetting,openusb_set_altsettingopenusb_get_altsetting,openusb_set_altsetting -- Get alternate setting number, Set alternate setting
openusb_get_altsetting() get the current alternate setting number of interface
ifc. The alternate number is returned in alt.
openusb_set_altsetting() sets the active alternate setting of the interface
ifc.
Application should call this function to set proper alternate setting of an
interface before doing data transfer on endpoints in that setting.
openusb_get_altsetting(), openusb_set_altsetting() returns 0 on success.
Otherwise, a openusb error is returned.
LIBUSB_SUCCESS No errors.
LIBUSB_BADARG ifc or alt is not valid.
LIBUSB_UNKNOWN_DEVICE Device handle is not valid
LIBUSB_PLATFORM_FAILURE Unspecified kernel/driver failure
LIBUSB_BUSY The interface ifc has already been claimed.