usb_claim_interface

Name

usb_claim_interface -- Claim an interface of a device

Description

int usb_claim_interface(usb_dev_handle *dev, int interface);

usb_claim_interface claims the interface with the Operating System. The interface parameter is the value as specified in the descriptor field bInterfaceNumber. Returns 0 on success or < 0 on error.

Must be called!: usb_claim_interface must be called before you perform any operations related to this interface (like usb_set_altinterface, usb_bulk_write, etc).

Table 1. Return Codes

codedescription
-EBUSYInterface is not available to be claimed
-ENOMEMInsufficient memory