![]() |
libbladeRF
1.1.0
Nuand bladeRF library
|
Data Structures | |
struct | bladerf_devinfo |
Macros | |
#define | BLADERF_SERIAL_LENGTH 33 |
Enumerations | |
enum | bladerf_backend { BLADERF_BACKEND_ANY, BLADERF_BACKEND_LINUX, BLADERF_BACKEND_LIBUSB, BLADERF_BACKEND_CYPRESS, BLADERF_BACKEND_DUMMY = 100 } |
enum | bladerf_dev_speed { BLADERF_DEVICE_SPEED_UNKNOWN, BLADERF_DEVICE_SPEED_HIGH, BLADERF_DEVICE_SPEED_SUPER } |
Functions | |
API_EXPORT int CALL_CONV | bladerf_get_device_list (struct bladerf_devinfo **devices) |
API_EXPORT void CALL_CONV | bladerf_free_device_list (struct bladerf_devinfo *devices) |
API_EXPORT int CALL_CONV | bladerf_open_with_devinfo (struct bladerf **device, struct bladerf_devinfo *devinfo) |
API_EXPORT int CALL_CONV | bladerf_open (struct bladerf **device, const char *device_identifier) |
API_EXPORT void CALL_CONV | bladerf_close (struct bladerf *device) |
The functions in this section provide the ability query available devices, initialize them, and deinitialize them. They are not guaranteed to be thread-safe; the caller is responsible for ensuring they are executed atomically.
#define BLADERF_SERIAL_LENGTH 33 |
Length of device serial number string, including NUL-terminator
Definition at line 131 of file libbladeRF.h.
enum bladerf_backend |
Backend by which the host communicates with the device
Definition at line 111 of file libbladeRF.h.
enum bladerf_dev_speed |
This enum describes the USB Speed at which the bladeRF is connected. Speeds not listed here are not supported.
Definition at line 124 of file libbladeRF.h.
API_EXPORT void CALL_CONV bladerf_close | ( | struct bladerf * | device | ) |
Close device
device | Device handle previously obtained by bladerf_open(). This function does nothing if device is NULL. |
API_EXPORT void CALL_CONV bladerf_free_device_list | ( | struct bladerf_devinfo * | devices | ) |
Free device list returned by bladerf_get_device_list()
devices | List of available devices |
API_EXPORT int CALL_CONV bladerf_get_device_list | ( | struct bladerf_devinfo ** | devices | ) |
Obtain a list of bladeRF devices attached to the system
[out] | devices |
API_EXPORT int CALL_CONV bladerf_open | ( | struct bladerf ** | device, |
const char * | device_identifier | ||
) |
Open specified device using a device identifier string. See bladerf_open_with_devinfo() if a device identifier string is not readily available.
The general form of the device identifier string is;
An empty ("") or NULL device identifier will result in the first encountered device being opened (using the first discovered backend)
The 'backend' describes the mechanism used to communicate with the device, and may be one of the following:
If no arguments are provided after the backend, the first encountered device on the specified backend will be opened. Note that a backend is required, if any arguments are to be provided.
Next, any provided arguments are provide as used to find the desired device. Be sure not to over constrain the search. Generally, only one of the above is required – providing all of these may over constrain the search for the desired device (e.g., if a serial number matches, but not on the specified bus and address.)
[out] | device | Update with device handle on success |
[in] | device_identifier | Device identifier, formatted as described above |
API_EXPORT int CALL_CONV bladerf_open_with_devinfo | ( | struct bladerf ** | device, |
struct bladerf_devinfo * | devinfo | ||
) |
Opens device specified by provided bladerf_devinfo structure
This function is generally preferred over bladerf_open() when a device identifier string is not already provided.
The most common uses of this function are to:
Below is an example of how to use this function to open a device with a specific serial number:
[out] | device | Update with device handle on success |
[in] | devinfo | Device specification. If NULL, any available device will be opened. |