usb_find_object — find an object, or enumerate current objects
extern void* usb_find_object( | void* master_structure, | |
unsigned long object_tag, | ||
int reference_type, | ||
unsigned long behaviour_control, | ||
unsigned long* result_tag, | ||
int* result) ; |
find an object, or enumerate current objects This call can either be used to find a specific object given a base to start from, or can be used to enumerate all objects of a specific type. When used with USB_FIND_NEXT_OBJECT the system will keep returning objects until the full set is enumerated. search_result is used to keep track of where the search is currently, and it should be initialised to NULL. object_tag provides a filter for the objects when searching, or the value of the specific object when finding. The type of object_tag is dependant on the object type, USB_REFERENCE_ENDPOINT takes the endpoint number, USB_REFERENCE_DEVICE takes the device number, and USB_REFERENCE_CONTROLLER takes a pointer to the controller name. result points to a integer to place the result of the search in and returns a pointer to the item if result == USB_RESULT_OK The returned object's reference count will have been incremented before it is returned. You will need to call usb_object_deregister() once you have finished with the object.