libbladeRF  1.7.2
Nuand bladeRF library
Data Structures | Enumerations | Functions
Device properties and information

Description

These functions provide the ability to query various pieces of information from an attached device.

These functions are thread-safe.

Data Structures

struct  bladerf_version
 

Enumerations

enum  bladerf_fpga_size { BLADERF_FPGA_UNKNOWN = 0, BLADERF_FPGA_40KLE = 40, BLADERF_FPGA_115KLE = 115 }
 
enum  bladerf_dev_speed { BLADERF_DEVICE_SPEED_UNKNOWN, BLADERF_DEVICE_SPEED_HIGH, BLADERF_DEVICE_SPEED_SUPER }
 

Functions

API_EXPORT int CALL_CONV bladerf_get_serial (struct bladerf *dev, char *serial)
 
API_EXPORT int CALL_CONV bladerf_get_vctcxo_trim (struct bladerf *dev, uint16_t *trim)
 
API_EXPORT int CALL_CONV bladerf_get_fpga_size (struct bladerf *dev, bladerf_fpga_size *size)
 
API_EXPORT int CALL_CONV bladerf_fw_version (struct bladerf *dev, struct bladerf_version *version)
 
API_EXPORT int CALL_CONV bladerf_is_fpga_configured (struct bladerf *dev)
 
API_EXPORT int CALL_CONV bladerf_fpga_version (struct bladerf *dev, struct bladerf_version *version)
 
API_EXPORT bladerf_dev_speed CALL_CONV bladerf_device_speed (struct bladerf *dev)
 

Enumeration Type Documentation

This enum describes the USB Speed at which the bladeRF is connected. Speeds not listed here are not supported.

Definition at line 370 of file libbladeRF.h.

FPGA device variant (size)

Enumerator
BLADERF_FPGA_UNKNOWN 

Unable to determine FPGA variant

BLADERF_FPGA_40KLE 

40 kLE FPGA

BLADERF_FPGA_115KLE 

115 kLE FPGA

Definition at line 360 of file libbladeRF.h.

Function Documentation

API_EXPORT bladerf_dev_speed CALL_CONV bladerf_device_speed ( struct bladerf *  dev)

Obtain the bus speed at which the device is operating

Parameters
devDevice handle
Returns
speed Device speed
API_EXPORT int CALL_CONV bladerf_fpga_version ( struct bladerf *  dev,
struct bladerf_version version 
)

Query FPGA version

Parameters
[in]devDevice handle
[out]versionUpdated to contain firmware version
Returns
0 on success, value from Error codes list on failure
API_EXPORT int CALL_CONV bladerf_fw_version ( struct bladerf *  dev,
struct bladerf_version version 
)

Query firmware version

Parameters
[in]devDevice handle
[out]versionUpdated to contain firmware version
Returns
0 on success, value from Error codes list upon failing to retrieve this information from the device.
API_EXPORT int CALL_CONV bladerf_get_fpga_size ( struct bladerf *  dev,
bladerf_fpga_size size 
)

Query a device's FPGA size

Parameters
[in]devDevice handle
[out]sizeWill be updated with the on-board FPGA's size. If an error occurs, no data will be written to this pointer.
Returns
0 on success, value from Error codes list on failure
API_EXPORT int CALL_CONV bladerf_get_serial ( struct bladerf *  dev,
char *  serial 
)

Query a device's serial number

Parameters
[in]devDevice handle
[out]serialThis user-supplied buffer, which must be at least BLADERF_SERIAL_LENGTH bytes, will be updated to contain a NUL-terminated serial number string. If an error occurs (as indicated by a non-zero return value), no data will be written to this pointer.
Returns
0 on success, value from Error codes list on failure
API_EXPORT int CALL_CONV bladerf_get_vctcxo_trim ( struct bladerf *  dev,
uint16_t *  trim 
)

Query a device's VCTCXO calibration trim

Parameters
[in]devDevice handle
[out]trimWill be updated with the factory DAC trim value. If an error occurs, no data will be written to this pointer.
Returns
0 on success, value from Error codes list on failure
API_EXPORT int CALL_CONV bladerf_is_fpga_configured ( struct bladerf *  dev)

Check FPGA configuration status

Parameters
devDevice handle
Returns
1 if FPGA is configured, 0 if it is not, and value from Error codes list on failure