diff options
author | Pavel Demin <pavel.demin@uclouvain.be> | 2015-12-17 21:12:45 +0100 |
---|---|---|
committer | Dimitri Stolnikov <horiz0n@gmx.net> | 2015-12-18 22:02:25 +0100 |
commit | 3582ba17e0d7a5237c6393a1c5849533692018f7 (patch) | |
tree | 48eab4e20c5351741a717e9b8129a87efb694e1b /lib/source_impl.cc | |
parent | 7cec4c0f517144f271630f78dd6acd1f26f6b1f7 (diff) |
redpitaya: add support for Red Pitaya SDR transceiver
This patch adds two gr-osmosdr blocks that can be used with the SDR transceiver
application available from the Red Pitaya application marketplace:
http://bazaar.redpitaya.com
These new source and sink blocks are based on the file block with some pieces
borrowed from the rtl_tcp block.
More details about Red Pitaya SDR transceiver can be found at:
http://pavel-demin.github.io/red-pitaya-notes/sdr-transceiver
Usage example:
osmocom_fft -a "redpitaya=192.168.1.100:1001"
Signed-off-by: Pavel Demin <pavel.demin@uclouvain.be>
Diffstat (limited to 'lib/source_impl.cc')
-rw-r--r-- | lib/source_impl.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/source_impl.cc b/lib/source_impl.cc index 9b81dde..3aa17f9 100644 --- a/lib/source_impl.cc +++ b/lib/source_impl.cc @@ -84,6 +84,10 @@ #include <soapy_source_c.h> #endif +#ifdef ENABLE_REDPITAYA +#include <redpitaya_source_c.h> +#endif + #include "arg_helpers.h" #include "source_impl.h" @@ -156,6 +160,9 @@ source_impl::source_impl( const std::string &args ) #ifdef ENABLE_SOAPY dev_types.push_back("soapy"); #endif +#ifdef ENABLE_REDPITAYA + dev_types.push_back("redpitaya"); +#endif std::cerr << "gr-osmosdr " << GR_OSMOSDR_VERSION << " (" << GR_OSMOSDR_LIBVER << ") " << "gnuradio " << gr::version() << std::endl; @@ -229,6 +236,10 @@ source_impl::source_impl( const std::string &args ) BOOST_FOREACH( std::string dev, soapy_source_c::get_devices() ) dev_list.push_back( dev ); #endif +#ifdef ENABLE_REDPITAYA + BOOST_FOREACH( std::string dev, redpitaya_source_c::get_devices() ) + dev_list.push_back( dev ); +#endif // std::cerr << std::endl; // BOOST_FOREACH( std::string dev, dev_list ) @@ -346,6 +357,13 @@ source_impl::source_impl( const std::string &args ) } #endif +#ifdef ENABLE_REDPITAYA + if ( dict.count("redpitaya") ) { + redpitaya_source_c_sptr src = make_redpitaya_source_c( arg ); + block = src; iface = src.get(); + } +#endif + if ( iface != NULL && long(block.get()) != 0 ) { _devs.push_back( iface ); |