libbladeRF: VCTCXO Trim DAC

| libbladeRF 2.2.0-git Nuand bladeRF library

Functions
VCTCXO Trim DAC
Low-level Functions

## Description

These functions provide the ability to manipulate the VCTCXO Trim DAC.

These functions are thread-safe.

## Functions
API_EXPORT int CALL_CONV | bladerf_get_vctcxo_trim (struct bladerf *dev, uint16_t *trim)
API_EXPORT int CALL_CONV | bladerf_trim_dac_write (struct bladerf *dev, uint16_t val)
API_EXPORT int CALL_CONV | bladerf_trim_dac_read (struct bladerf *dev, uint16_t *val)

## Function Documentation

## ◆ bladerf_get_vctcxo_trim()

API_EXPORT int CALL_CONV bladerf_get_vctcxo_trim | ( | struct bladerf * | dev,
|  | uint16_t * | trim
| ) |  |

Query a device's VCTCXO calibration trim

Parameters

  | dev | Device handle
  [out] | trim | VCTCXO calibration trim

Returns
  0 on success, value from Error codes list on failure

## ◆ bladerf_trim_dac_read()

API_EXPORT int CALL_CONV bladerf_trim_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_trim_dac_write().

Parameters

  | dev | Device handle
  [out] | val | Current VCTCXO trim DAC value

Returns
  0 on success, value from Error codes list on failure

## ◆ bladerf_trim_dac_write()

API_EXPORT int CALL_CONV bladerf_trim_dac_write | ( | struct bladerf * | dev,
|  | uint16_t | val
| ) |  |

Write value to VCTCXO trim DAC.

Note
  This should not be used when the VCTCXO tamer is enabled.

Parameters

  | dev | Device handle
  [in] | val | Desired VCTCXO trim DAC value

Returns
  0 on success, value from Error codes list on failure