## Description

These functions provide the ability to tune the RX and TX channels.

See this page for more detailed information about how the API performs this tuning, and for example code snippets.

## Typedef Documentation

RF center frequency, in hertz (Hz)

Format macros for fprintf() and fscanf(): BLADERF_PRIuFREQ, BLADERF_PRIxFREQ, BLADERF_SCNuFREQ, BLADERF_SCNxFREQ
Remarks
Prior to libbladeRF 2.0.0, frequencies were specified as unsigned int.

Definition at line 1229 of file libbladeRF.h.

## Macro Definition Documentation

printf format for frequencies in unsigned decimal

Definition at line 1232 of file libbladeRF.h.

printf format for frequencies in hexadecimal

Definition at line 1234 of file libbladeRF.h.

scanf format for frequencies in unsigned decimal

Definition at line 1236 of file libbladeRF.h.

scanf format for frequencies in hexadecimal

Definition at line 1238 of file libbladeRF.h.

## Function Documentation

Get channel's current frequency in Hz

Parameters
 dev Device handle [in] ch Channel [out] frequency Current frequency
Returns
0 on success, value from Error codes list on failure

Get the supported range of frequencies for a channel

Parameters
 dev Device handle [in] ch Channel [out] range Frequency range
Returns
0 on success, value from Error codes list on failure

Select the appropriate band path given a frequency in Hz.

Note
Most API users will not need to use this function, as bladerf_set_frequency() calls this internally after tuning the device.

The high band is used for frequency above 1.5 GHz on bladeRF1 and above 3.0 GHz on bladeRF2. Otherwise, the low band is used.

bladerf_get_frequency_range() to determine the range of supported frequencies.
Parameters
 dev Device handle [in] ch Channel [in] frequency Tuned frequency
Returns
0 on success, value from Error codes list on failure

Set channel's frequency in Hz.

Note
On the bladeRF1 platform, it is recommended to keep the RX and TX frequencies at least 1 MHz apart, and to digitally mix on the RX side if reception closer to the TX frequency is required.
On the bladeRF2, there is one oscillator for all RX channels and one oscillator for all TX channels. Therefore, changing one channel will change the frequency of all channels in that direction.

This function calls bladerf_select_band() internally, and performs all other tasks required to prepare the channel for the given frequency.