diff options
author | Josh Blum <josh@joshknows.com> | 2011-10-21 16:38:27 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-11-03 20:37:13 -0700 |
commit | 07ba94643ed2cfeed91542e3c1fc59cbdb39a932 (patch) | |
tree | 0203eb83489e5c0bddd696c84c4285e51b36b23f /host/include | |
parent | ae9e89d76b2eb86a29995f04aaab1aa59ee93f04 (diff) | |
download | uhd-07ba94643ed2cfeed91542e3c1fc59cbdb39a932.tar.gz uhd-07ba94643ed2cfeed91542e3c1fc59cbdb39a932.tar.bz2 uhd-07ba94643ed2cfeed91542e3c1fc59cbdb39a932.zip |
usrp: add api control for tx/rx dc offset control
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/usrp/multi_usrp.hpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/host/include/uhd/usrp/multi_usrp.hpp b/host/include/uhd/usrp/multi_usrp.hpp index baa47b39e..9fbc9cfe6 100644 --- a/host/include/uhd/usrp/multi_usrp.hpp +++ b/host/include/uhd/usrp/multi_usrp.hpp @@ -21,6 +21,7 @@ //define API capabilities for compile time detection of new features #define UHD_USRP_MULTI_USRP_REF_SOURCES_API #define UHD_USRP_MULTI_USRP_GET_RATES_API +#define UHD_USRP_MULTI_USRP_DC_OFFSET_API #include <uhd/config.hpp> #include <uhd/device.hpp> @@ -35,6 +36,7 @@ #include <uhd/usrp/mboard_iface.hpp> #include <boost/shared_ptr.hpp> #include <boost/utility.hpp> +#include <complex> #include <string> #include <vector> @@ -528,6 +530,30 @@ public: */ virtual std::vector<std::string> get_rx_sensor_names(size_t chan = 0) = 0; + + /*! + * Enable/disable the automatic RX DC offset correction. + * The automatic correction subtracts out the long-run average. + * + * When disabled, the averaging option operation is halted. + * Once halted, the average value will be held constant + * until the user re-enables the automatic correction + * or overrides the value by manually setting the offset. + * + * \param enb true to enable automatic DC offset correction + * \param chan the channel index 0 to N-1 + */ + virtual void set_rx_dc_offset(const bool enb, size_t chan = ALL_CHANS) = 0; + + /*! + * Set a constant RX DC offset value. + * The value is complex to control both I and Q. + * Only set this when automatic correction is disabled. + * \param offset the dc offset (1.0 is full-scale) + * \param chan the channel index 0 to N-1 + */ + virtual void set_rx_dc_offset(const std::complex<double> &offset, size_t chan = ALL_CHANS) = 0; + /******************************************************************* * TX methods ******************************************************************/ @@ -724,6 +750,15 @@ public: * \return a vector of sensor names */ virtual std::vector<std::string> get_tx_sensor_names(size_t chan = 0) = 0; + + /*! + * Set a constant TX DC offset value. + * The value is complex to control both I and Q. + * \param offset the dc offset (1.0 is full-scale) + * \param chan the channel index 0 to N-1 + */ + virtual void set_tx_dc_offset(const std::complex<double> &offset, size_t chan = ALL_CHANS) = 0; + }; }} |