USBLib_FindFreeDev (SWI &56340)
Prev | 3.6. Device management SWIs | Next

## Name

USBLib_FindFreeDev (SWI &56340) — Finds a device in the unclaimed device pool

## On Entry

R0 | Vendor ID ( or -1 for any )
R1 | Product ID ( or -1 for any )
R2 | Class code ( or -1 for any )
R3 | Sub-class code ( or -1 for any )
R4 | Protocol code ( or -1 for any )
R5 | Number of matches to skip before returning match.

## On Exit

R0 | Pointer to new device message block or 0 if no device was found.

## Use

This call may be used to obtain a new device block from the unclaimed device pool. The device driver may search for a specific vendor,class,sub class and product code. If more than one device is available that matches the parameters the next may be found by looping calling the SWI with increasing R5 value untill the required device is located or 0 returned.

This call may return an error if the core is not loaded.

## Related SWIs

USBLib_DevMgrFindFree (SWI &56340)

## Related Information

Chapter 3

Prev | Up | Next
USBLib_DevMgrFindFree (SWI &56340) | Home | USBLib_ParseCmdLine (SWI &56340)