def set_interface_alt_setting(setting_or_interface_number, alternate_setting=nil)
      alternate_setting ||= setting_or_interface_number.bAlternateSetting if setting_or_interface_number.respond_to? :bAlternateSetting
      setting_or_interface_number = setting_or_interface_number.bInterfaceNumber if setting_or_interface_number.respond_to? :bInterfaceNumber
      res = Call.libusb_set_interface_alt_setting(@pHandle, setting_or_interface_number, alternate_setting)
      LIBUSB.raise_error res, "in libusb_set_interface_alt_setting" if res!=0
    end
def set_interface_alt_setting(setting_or_interface_number, alternate_setting=nil)
      alternate_setting ||= setting_or_interface_number.bAlternateSetting if setting_or_interface_number.respond_to? :bAlternateSetting
      setting_or_interface_number = setting_or_interface_number.bInterfaceNumber if setting_or_interface_number.respond_to? :bInterfaceNumber
      res = Call.libusb_set_interface_alt_setting(@pHandle, setting_or_interface_number, alternate_setting)
      LIBUSB.raise_error res, "in libusb_set_interface_alt_setting" if res!=0
    end
Activate an alternate setting for an interface.

 The interface must have been previously claimed with {DevHandle#claim_interface}.

 You should always use this function rather than formulating your own
 SET_INTERFACE control request. This is because the underlying operating system
 needs to know when such changes happen.

 This is a blocking function.

 @param [Setting, Fixnum] setting_or_interface_number  the alternate setting
   to activate or the bInterfaceNumber of the previously-claimed interface
 @param [Fixnum, nil] alternate_setting  the bAlternateSetting of the alternate setting to activate
   (only if first param is a Fixnum)