![]() |
libbladeRF
2.5.0
Nuand bladeRF library
|
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.
These functions are thread-safe.
Typedefs | |
typedef uint64_t | bladerf_frequency |
Macros | |
#define | BLADERF_PRIuFREQ PRIu64 |
#define | BLADERF_PRIxFREQ PRIx64 |
#define | BLADERF_SCNuFREQ SCNu64 |
#define | BLADERF_SCNxFREQ SCNx64 |
Functions | |
API_EXPORT int CALL_CONV | bladerf_select_band (struct bladerf *dev, bladerf_channel ch, bladerf_frequency frequency) |
API_EXPORT int CALL_CONV | bladerf_set_frequency (struct bladerf *dev, bladerf_channel ch, bladerf_frequency frequency) |
API_EXPORT int CALL_CONV | bladerf_get_frequency (struct bladerf *dev, bladerf_channel ch, bladerf_frequency *frequency) |
API_EXPORT int CALL_CONV | bladerf_get_frequency_range (struct bladerf *dev, bladerf_channel ch, const struct bladerf_range **range) |
typedef uint64_t bladerf_frequency |
RF center frequency, in hertz (Hz)
BLADERF_PRIuFREQ
, BLADERF_PRIxFREQ
, BLADERF_SCNuFREQ
, BLADERF_SCNxFREQ
unsigned int
. Definition at line 1229 of file libbladeRF.h.
#define BLADERF_PRIuFREQ PRIu64 |
printf format for frequencies in unsigned decimal
Definition at line 1232 of file libbladeRF.h.
#define BLADERF_PRIxFREQ PRIx64 |
printf format for frequencies in hexadecimal
Definition at line 1234 of file libbladeRF.h.
#define BLADERF_SCNuFREQ SCNu64 |
scanf format for frequencies in unsigned decimal
Definition at line 1236 of file libbladeRF.h.
#define BLADERF_SCNxFREQ SCNx64 |
scanf format for frequencies in hexadecimal
Definition at line 1238 of file libbladeRF.h.
API_EXPORT int CALL_CONV bladerf_get_frequency | ( | struct bladerf * | dev, |
bladerf_channel | ch, | ||
bladerf_frequency * | frequency | ||
) |
Get channel's current frequency in Hz
dev | Device handle | |
[in] | ch | Channel |
[out] | frequency | Current frequency |
API_EXPORT int CALL_CONV bladerf_get_frequency_range | ( | struct bladerf * | dev, |
bladerf_channel | ch, | ||
const struct bladerf_range ** | range | ||
) |
Get the supported range of frequencies for a channel
dev | Device handle | |
[in] | ch | Channel |
[out] | range | Frequency range |
API_EXPORT int CALL_CONV bladerf_select_band | ( | struct bladerf * | dev, |
bladerf_channel | ch, | ||
bladerf_frequency | frequency | ||
) |
Select the appropriate band path given a frequency in Hz.
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.
dev | Device handle | |
[in] | ch | Channel |
[in] | frequency | Tuned frequency |
API_EXPORT int CALL_CONV bladerf_set_frequency | ( | struct bladerf * | dev, |
bladerf_channel | ch, | ||
bladerf_frequency | frequency | ||
) |
Set channel's frequency in Hz.
This function calls bladerf_select_band() internally, and performs all other tasks required to prepare the channel for the given frequency.
dev | Device handle | |
[in] | ch | Channel |
[in] | frequency | Desired frequency |