![]() |
libbladeRF
1.7.2
Nuand bladeRF library
|
This section defines functionality for configuring the device's LPF bandwidth. In most cases, one should define the bandwidth to be less than the sample rate to minimize the impact of aliases.
To determine the required bandwidth setting for a desired sample rate (or vice versa), review the TX/RX LPF amplitude response plots in the LMS6002D datasheet. (This was Figure 6 as of datasheet v1.2r0.)
These functions are thread-safe.
Macros | |
#define | BLADERF_BANDWIDTH_MIN 1500000u |
#define | BLADERF_BANDWIDTH_MAX 28000000u |
Enumerations | |
enum | bladerf_lpf_mode { BLADERF_LPF_NORMAL, BLADERF_LPF_BYPASSED, BLADERF_LPF_DISABLED } |
Functions | |
API_EXPORT int CALL_CONV | bladerf_set_bandwidth (struct bladerf *dev, bladerf_module module, unsigned int bandwidth, unsigned int *actual) |
API_EXPORT int CALL_CONV | bladerf_get_bandwidth (struct bladerf *dev, bladerf_module module, unsigned int *bandwidth) |
API_EXPORT int CALL_CONV | bladerf_set_lpf_mode (struct bladerf *dev, bladerf_module module, bladerf_lpf_mode mode) |
API_EXPORT int CALL_CONV | bladerf_get_lpf_mode (struct bladerf *dev, bladerf_module module, bladerf_lpf_mode *mode) |
#define BLADERF_BANDWIDTH_MAX 28000000u |
Maximum bandwidth, in Hz
Definition at line 948 of file libbladeRF.h.
#define BLADERF_BANDWIDTH_MIN 1500000u |
Minimum bandwidth, in Hz
Definition at line 945 of file libbladeRF.h.
enum bladerf_lpf_mode |
Low-Pass Filter (LPF) mode
Enumerator | |
---|---|
BLADERF_LPF_NORMAL |
LPF connected and enabled |
BLADERF_LPF_BYPASSED |
LPF bypassed |
BLADERF_LPF_DISABLED |
LPF disabled |
Definition at line 953 of file libbladeRF.h.
API_EXPORT int CALL_CONV bladerf_get_bandwidth | ( | struct bladerf * | dev, |
bladerf_module | module, | ||
unsigned int * | bandwidth | ||
) |
Get the bandwidth of the LMS LPF
dev | Device Handle |
module | Module for bandwidth request |
bandwidth | Actual bandwidth in Hz |
API_EXPORT int CALL_CONV bladerf_get_lpf_mode | ( | struct bladerf * | dev, |
bladerf_module | module, | ||
bladerf_lpf_mode * | mode | ||
) |
Get the current mode of the LMS LPF
dev | Device handle |
module | Module for mode request |
mode | Current mode of the LPF |
API_EXPORT int CALL_CONV bladerf_set_bandwidth | ( | struct bladerf * | dev, |
bladerf_module | module, | ||
unsigned int | bandwidth, | ||
unsigned int * | actual | ||
) |
Set the bandwidth of the LMS LPF to specified value in Hz
The underlying device is capable of a discrete set of bandwidth values. The caller should check the actual
parameter to determine which of these discrete bandwidth values is actually used for the requested bandwidth.
Values outside the range of [ BLADERF_BANDWIDTH_MIN, BLADERF_BANDWIDTH_MAX ] will be clamped.
[in] | dev | Device handle |
[in] | module | Module for bandwidth request |
[in] | bandwidth | Desired bandwidth |
[out] | actual | If non-NULL, written with the actual bandwidth that the device was able to achieve. |
API_EXPORT int CALL_CONV bladerf_set_lpf_mode | ( | struct bladerf * | dev, |
bladerf_module | module, | ||
bladerf_lpf_mode | mode | ||
) |
Set the LMS LPF mode to bypass or disable it
dev | Device handle |
module | Module for mode request |
mode | Mode to be set |