libbladeRF: Correction

| libbladeRF 2.2.1-git Nuand bladeRF library

Typedefs | Enumerations | Functions
Correction
Channel control

## Description

This group provides routines for applying manual offset, gain, and phase corrections.

These functions are thread-safe.

## Typedefs
typedef int16_t | bladerf_correction_value

## Enumerations
enum | bladerf_correction { BLADERF_CORR_DCOFF_I, BLADERF_CORR_DCOFF_Q, BLADERF_CORR_PHASE, BLADERF_CORR_GAIN }

## Functions
API_EXPORT int CALL_CONV | bladerf_set_correction (struct bladerf *dev, bladerf_channel ch, bladerf_correction corr, bladerf_correction_value value)
API_EXPORT int CALL_CONV | bladerf_get_correction (struct bladerf *dev, bladerf_channel ch, bladerf_correction corr, bladerf_correction_value *value)

## Typedef Documentation

## ◆ bladerf_correction_value

typedef int16_t bladerf_correction_value

Correction value, in arbitrary units

See also
  bladerf_correction
  bladerf_get_correction()
  bladerf_set_correction()

Definition at line 1928 of file libbladeRF.h.

## Enumeration Type Documentation

## ◆ bladerf_correction

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.

Enumerator
BLADERF_CORR_DCOFF_I | Adjusts the in-phase DC offset. Valid values are [-2048, 2048], which are scaled to the available control bits.
BLADERF_CORR_DCOFF_Q | Adjusts the quadrature DC offset. Valid values are [-2048, 2048], which are scaled to the available control bits.
BLADERF_CORR_PHASE | Adjusts phase correction of [-10, 10] degrees, via a provided count value of [-4096, 4096].
BLADERF_CORR_GAIN | Adjusts gain correction value in [-1.0, 1.0], via provided values in the range of [-4096, 4096].

Definition at line 1939 of file libbladeRF.h.

## Function Documentation

## ◆ bladerf_get_correction()

API_EXPORT int CALL_CONV bladerf_get_correction | ( | struct bladerf * | dev,
|  | bladerf_channel | ch,
|  | bladerf_correction | corr,
|  | bladerf_correction_value * | value
| ) |  |

Obtain the current value of the specified configuration parameter

Parameters

  | dev | Device handle
  [in] | ch | Channel
  [in] | corr | Correction type
  [out] | value | Current value

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

## ◆ bladerf_set_correction()

API_EXPORT int CALL_CONV bladerf_set_correction | ( | struct bladerf * | dev,
|  | bladerf_channel | ch,
|  | bladerf_correction | corr,
|  | bladerf_correction_value | value
| ) |  |

Set the value of the specified configuration parameter

See also
  The bladerf_correction description for the valid ranges of the `value` parameter.

Parameters

  | dev | Device handle
  [in] | ch | Channel
  [in] | corr | Correction type
  [in] | value | Value to apply

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