![]() |
libbladeRF
1.7.2
Nuand bladeRF library
|
This group provides routines for performing calibration and applying corrections. These functions are thread-safe.
The automatic DC correction used by the bladeRF-cli
is not part of this API, but it is implemented using libbladeRF. This automatic DC calibration code is available here under an "MIT" license.
Enumerations | |
enum | bladerf_cal_module { BLADERF_DC_CAL_INVALID = -1, BLADERF_DC_CAL_LPF_TUNING, BLADERF_DC_CAL_TX_LPF, BLADERF_DC_CAL_RX_LPF, BLADERF_DC_CAL_RXVGA2 } |
enum | bladerf_correction { BLADERF_CORR_LMS_DCOFF_I, BLADERF_CORR_LMS_DCOFF_Q, BLADERF_CORR_FPGA_PHASE, BLADERF_CORR_FPGA_GAIN } |
enum | bladerf_vctcxo_tamer_mode { BLADERF_VCTCXO_TAMER_INVALID = -1, BLADERF_VCTCXO_TAMER_DISABLED = 0, BLADERF_VCTCXO_TAMER_1_PPS = 1, BLADERF_VCTCXO_TAMER_10_MHZ = 2 } |
Functions | |
API_EXPORT int CALL_CONV | bladerf_set_correction (struct bladerf *dev, bladerf_module module, bladerf_correction corr, int16_t value) |
API_EXPORT int CALL_CONV | bladerf_get_correction (struct bladerf *dev, bladerf_module module, bladerf_correction corr, int16_t *value) |
API_EXPORT int CALL_CONV | bladerf_set_vctcxo_tamer_mode (struct bladerf *dev, bladerf_vctcxo_tamer_mode mode) |
API_EXPORT int CALL_CONV | bladerf_get_vctcxo_tamer_mode (struct bladerf *dev, bladerf_vctcxo_tamer_mode *mode) |
API_EXPORT int CALL_CONV | bladerf_dac_write (struct bladerf *dev, uint16_t val) |
API_EXPORT int CALL_CONV | bladerf_dac_read (struct bladerf *dev, uint16_t *val) |
enum bladerf_cal_module |
DC Calibration Modules
Definition at line 1844 of file libbladeRF.h.
enum bladerf_correction |
Correction parameter selection
These values specify the correction parameter to modify or query when calling bladerf_set_correction() or bladerf_get_correction(). Note that the meaning of the value
parameter to these functions depends upon the correction parameter.
Definition at line 1861 of file libbladeRF.h.
VCTCXO Tamer mode selection
These values control the use of header J71 pin 1 for taming the on-board VCTCXO to improve or sustain frequency accuracy.
When supplying input into the VCTCXO tamer, a 1.8V signal must be provided.
IMPORTANT: Exceeding 1.8V on J71-1 can damage the associated FPGA I/O bank. Ensure that you provide only a 1.8V signal!
Definition at line 1902 of file libbladeRF.h.
API_EXPORT int CALL_CONV bladerf_dac_read | ( | struct bladerf * | dev, |
uint16_t * | val | ||
) |
Read value from VCTCXO trim DAC.
This is similar to bladerf_get_vctcxo_trim(), except that it returns the current trim DAC value, as opposed to the calibration value read from flash.
Use this if you are trying to query the value after having previously made calls to bladerf_dac_write().
[in] | dev | Device handle |
[out] | val | Value to read from VCTCXO trim DAC |
API_EXPORT int CALL_CONV bladerf_dac_write | ( | struct bladerf * | dev, |
uint16_t | val | ||
) |
Write value to VCTCXO trim DAC.
This should not be used when the VCTCXO tamer is enabled.
dev | Device handle |
val | Value to write to VCTCXO trim DAC |
API_EXPORT int CALL_CONV bladerf_get_correction | ( | struct bladerf * | dev, |
bladerf_module | module, | ||
bladerf_correction | corr, | ||
int16_t * | value | ||
) |
Obtain the current value of the specified configuration parameter
[in] | dev | Device handle |
[in] | module | Module to retrieve correction information from |
[in] | corr | Correction type |
[out] | value | Current value |
API_EXPORT int CALL_CONV bladerf_get_vctcxo_tamer_mode | ( | struct bladerf * | dev, |
bladerf_vctcxo_tamer_mode * | mode | ||
) |
Get the current VCTCXO tamer mode
[in] | dev | Device handle |
[out] | mode | Current VCTCXO taming mode or BLADERF_VCTCXO_TAMER_INVALID if a failure occurs. |
API_EXPORT int CALL_CONV bladerf_set_correction | ( | struct bladerf * | dev, |
bladerf_module | module, | ||
bladerf_correction | corr, | ||
int16_t | value | ||
) |
Set the value of the specified configuration parameter
See the bladerf_correction description for the valid ranges of the value
parameter.
dev | Device handle |
module | Module to apply correction to |
corr | Correction type |
value | Value to apply |
API_EXPORT int CALL_CONV bladerf_set_vctcxo_tamer_mode | ( | struct bladerf * | dev, |
bladerf_vctcxo_tamer_mode | mode | ||
) |
Set the VCTCXO tamer mode.
dev | Device handle |
mode | VCTCXO taming mode |