Minimal polyfill to support building against both bladeRF1 & bladeRF2 libraries
This commit is contained in:
parent
19f26968c7
commit
e419719731
|
@ -23,6 +23,11 @@
|
||||||
#include <libbladeRF.h>
|
#include <libbladeRF.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
// Polyfill for the older bladerf API
|
||||||
|
#if defined(LIBBLADERF_API_VERSION) && (LIBBLADERF_API_VERSION < 0x02000000)
|
||||||
|
typedef unsigned int bladerf_frequency;
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
const char *device_str;
|
const char *device_str;
|
||||||
const char *fpga_path;
|
const char *fpga_path;
|
||||||
|
@ -102,7 +107,7 @@ static void show_config()
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
unsigned rate;
|
unsigned rate;
|
||||||
unsigned freq;
|
bladerf_frequency freq;
|
||||||
bladerf_lpf_mode lpf_mode;
|
bladerf_lpf_mode lpf_mode;
|
||||||
unsigned lpf_bw;
|
unsigned lpf_bw;
|
||||||
bladerf_lna_gain lna_gain;
|
bladerf_lna_gain lna_gain;
|
||||||
|
|
Loading…
Reference in a new issue