As the functions in this section do not operate on a device, there are no internal thread-safety concerns. The caller only needs to ensure the function parameters are not modified while these functions are executing.
Retrieve the backend string associated with the specified backend enumeration value.
- Warning
- Do not attempt to modify or free() the returned string.
- Returns
- A string that can used to specify the
backend
portion of a device identifier string. (See bladerf_open().)
Test whether two device identifier information structures match, taking wildcard values into account.
Test whether a provided device string matches a device described by the provided bladerf_devinfo structure
- Parameters
-
[in] | dev_str | Devices string, formated as described in the the documentation of bladerf_open |
[in] | info | Device info to compare with |
- Returns
- true upon a match, false otherwise
Fill out a provided bladerf_devinfo structure, given an open device handle. This function is thread-safe.
- Precondition
- dev must be a valid device handle.
- Parameters
-
[in] | dev | Device handle previously obtained with bladerf_open() |
[out] | info | Device information populated by this function |
- Returns
- 0 on success, value from Error codes list on failure
Populate a device identifier information structure using the provided device identifier string.
- Parameters
-
[in] | devstr | Device identifier string, formated as described in the bladerf_open() documentation |
[out] | info | Upon success, this will be filled out according to the provided device identifier string, with wildcards for any fields that were not provided. |
- Returns
- 0 on success, value from Error codes list on failure
Initialize a device identifier information structure to a "wildcard" state. The values in each field will match any value for that field.
Passing a bladerf_devinfo initialized with this function to bladerf_open_with_devinfo() will match the first device found.