diff options
author | Dimitri Stolnikov <horiz0n@gmx.net> | 2013-04-10 20:42:43 +0200 |
---|---|---|
committer | Dimitri Stolnikov <horiz0n@gmx.net> | 2013-04-10 21:05:14 +0200 |
commit | f5670788fc9cab640aa00833921313ee46583ae5 (patch) | |
tree | 296b1a039778abdc6606c3b891ce19c51520f5af /lib/osmosdr_device.cc | |
parent | fd56ae76403097a7a8d246d2467b8a5a2912b8df (diff) |
hackrf: add support for HackRF devices through libhackrf
features:
- gain control for LNA & VGA
- frequency error correction
- automatic baseband filter
- up to 20M sampling rate
limitations:
- no DC offset correction implemented (yet)
- no RX preamplifier control (disabled by default)
- high sampling rates may not work on slow machines
Diffstat (limited to 'lib/osmosdr_device.cc')
-rw-r--r-- | lib/osmosdr_device.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/osmosdr_device.cc b/lib/osmosdr_device.cc index 12f126f..154ebf3 100644 --- a/lib/osmosdr_device.cc +++ b/lib/osmosdr_device.cc @@ -29,15 +29,7 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif -/* -#define ENABLE_OSMOSDR -#define ENABLE_FCD -#define ENABLE_FILE -#define ENABLE_RTL -#define ENABLE_RTL_TCP -#define ENABLE_UHD -#define ENABLE_MIRI -*/ + #ifdef ENABLE_OSMOSDR #include <osmosdr_src_c.h> #endif @@ -66,6 +58,10 @@ #include <miri_source_c.h> #endif +#ifdef ENABLE_HACKRF +#include <hackrf_source_c.h> +#endif + #include "osmosdr_arg_helpers.h" using namespace osmosdr; @@ -145,6 +141,10 @@ devices_t device::find(const device_t &hint) BOOST_FOREACH( std::string dev, miri_source_c::get_devices() ) devices.push_back( device_t(dev) ); #endif +#ifdef ENABLE_HACKRF + BOOST_FOREACH( std::string dev, hackrf_source_c::get_devices() ) + devices.push_back( device_t(dev) ); +#endif return devices; } |