aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp')
-rw-r--r--host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp b/host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp
index f30694dbf..c059a3a09 100644
--- a/host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp
+++ b/host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp
@@ -45,27 +45,23 @@ public:
virtual ~ad9361_ctrl(void) {}
//! make a new codec control object
- static sptr make_spi(
- ad9361_params::sptr client_settings,
+ static sptr make_spi(ad9361_params::sptr client_settings,
uhd::spi_iface::sptr spi_iface,
- uint32_t slave_num
- );
+ uint32_t slave_num);
static sptr make_spi(
- ad9361_params::sptr client_settings,
- ad9361_io::sptr spi_io_iface
- );
+ ad9361_params::sptr client_settings, ad9361_io::sptr spi_io_iface);
//! Get a list of gain names for RX or TX
- static std::vector<std::string> get_gain_names(const std::string &/*which*/)
+ static std::vector<std::string> get_gain_names(const std::string& /*which*/)
{
return std::vector<std::string>(1, "PGA");
}
//! get the gain range for a particular gain element
- static uhd::meta_range_t get_gain_range(const std::string &which)
+ static uhd::meta_range_t get_gain_range(const std::string& which)
{
- if(which[0] == 'R') {
+ if (which[0] == 'R') {
return uhd::meta_range_t(0.0, 76.0, 1.0);
} else {
return uhd::meta_range_t(0.0, 89.75, 0.25);
@@ -81,29 +77,28 @@ public:
//! get the filter range for the frontend which
static uhd::meta_range_t get_bw_filter_range(void)
{
- return uhd::meta_range_t(ad9361_device_t::AD9361_MIN_BW, ad9361_device_t::AD9361_MAX_BW);
+ return uhd::meta_range_t(
+ ad9361_device_t::AD9361_MIN_BW, ad9361_device_t::AD9361_MAX_BW);
}
//! get the clock rate range for the frontend
static uhd::meta_range_t get_clock_rate_range(void)
{
- return uhd::meta_range_t(
- ad9361_device_t::AD9361_MIN_CLOCK_RATE,
- ad9361_device_t::AD9361_MAX_CLOCK_RATE
- );
+ return uhd::meta_range_t(ad9361_device_t::AD9361_MIN_CLOCK_RATE,
+ ad9361_device_t::AD9361_MAX_CLOCK_RATE);
}
//! set the filter bandwidth for the frontend's analog low pass
- virtual double set_bw_filter(const std::string &/*which*/, const double /*bw*/) = 0;
+ virtual double set_bw_filter(const std::string& /*which*/, const double /*bw*/) = 0;
//! set the gain for a particular gain element
- virtual double set_gain(const std::string &which, const double value) = 0;
+ virtual double set_gain(const std::string& which, const double value) = 0;
//! Enable or disable the AGC module
- virtual void set_agc(const std::string &which, bool enable) = 0;
+ virtual void set_agc(const std::string& which, bool enable) = 0;
//! configure the AGC module to slow or fast mode
- virtual void set_agc_mode(const std::string &which, const std::string &mode) = 0;
+ virtual void set_agc_mode(const std::string& which, const std::string& mode) = 0;
//! set a new clock rate, return the exact value
virtual double set_clock_rate(const double rate) = 0;
@@ -112,55 +107,60 @@ public:
virtual void set_active_chains(bool tx1, bool tx2, bool rx1, bool rx2) = 0;
//! set which timing mode is used
- virtual void set_timing_mode(const std::string &timing_mode) = 0;
+ virtual void set_timing_mode(const std::string& timing_mode) = 0;
//! tune the given frontend, return the exact value
- virtual double tune(const std::string &which, const double value) = 0;
+ virtual double tune(const std::string& which, const double value) = 0;
//! set the DC offset for I and Q manually
- void set_dc_offset(const std::string &, const std::complex<double>)
+ void set_dc_offset(const std::string&, const std::complex<double>)
{
- //This feature should not be used according to Analog Devices
- throw uhd::runtime_error("ad9361_ctrl::set_dc_offset this feature is not supported on this device.");
+ // This feature should not be used according to Analog Devices
+ throw uhd::runtime_error(
+ "ad9361_ctrl::set_dc_offset this feature is not supported on this device.");
}
//! enable or disable the BB/RF DC tracking feature
- virtual void set_dc_offset_auto(const std::string &which, const bool on) = 0;
+ virtual void set_dc_offset_auto(const std::string& which, const bool on) = 0;
//! set the IQ correction value manually
- void set_iq_balance(const std::string &, const std::complex<double>)
+ void set_iq_balance(const std::string&, const std::complex<double>)
{
- //This feature should not be used according to Analog Devices
- throw uhd::runtime_error("ad9361_ctrl::set_iq_balance this feature is not supported on this device.");
+ // This feature should not be used according to Analog Devices
+ throw uhd::runtime_error(
+ "ad9361_ctrl::set_iq_balance this feature is not supported on this device.");
}
//! enable or disable the quadrature calibration
- virtual void set_iq_balance_auto(const std::string &which, const bool on) = 0;
+ virtual void set_iq_balance_auto(const std::string& which, const bool on) = 0;
//! get the current frequency for the given frontend
- virtual double get_freq(const std::string &which) = 0;
+ virtual double get_freq(const std::string& which) = 0;
//! turn on/off Catalina's data port loopback
virtual void data_port_loopback(const bool on) = 0;
//! read internal RSSI sensor
- virtual sensor_value_t get_rssi(const std::string &which) = 0;
+ virtual sensor_value_t get_rssi(const std::string& which) = 0;
//! read the internal temp sensor
virtual sensor_value_t get_temperature() = 0;
//! List all available filters by name
- virtual std::vector<std::string> get_filter_names(const std::string &which) = 0;
+ virtual std::vector<std::string> get_filter_names(const std::string& which) = 0;
//! Return a list of all filters
- virtual filter_info_base::sptr get_filter(const std::string &which, const std::string &filter_name) = 0;
+ virtual filter_info_base::sptr get_filter(
+ const std::string& which, const std::string& filter_name) = 0;
//! Write back a filter
- virtual void set_filter(const std::string &which, const std::string &filter_name, const filter_info_base::sptr) = 0;
+ virtual void set_filter(const std::string& which,
+ const std::string& filter_name,
+ const filter_info_base::sptr) = 0;
virtual void output_digital_test_tone(bool enb) = 0;
};
-}}
+}} // namespace uhd::usrp
#endif /* INCLUDED_AD9361_CTRL_HPP */