summaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/usrp/dboard_iface.hpp39
1 files changed, 35 insertions, 4 deletions
diff --git a/host/include/uhd/usrp/dboard_iface.hpp b/host/include/uhd/usrp/dboard_iface.hpp
index 7ecfcd3c0..caf1e6ee6 100644
--- a/host/include/uhd/usrp/dboard_iface.hpp
+++ b/host/include/uhd/usrp/dboard_iface.hpp
@@ -22,6 +22,7 @@
#include <uhd/types/serial.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/cstdint.hpp>
+#include <vector>
namespace uhd{ namespace usrp{
@@ -35,13 +36,13 @@ class UHD_API dboard_iface{
public:
typedef boost::shared_ptr<dboard_iface> sptr;
- //tells the host which unit to use
+ //! tells the host which unit to use
enum unit_t{
UNIT_RX = 'r',
UNIT_TX = 't'
};
- //possible atr registers
+ //! possible atr registers
enum atr_reg_t{
ATR_REG_IDLE = 'i',
ATR_REG_TX_ONLY = 't',
@@ -49,6 +50,20 @@ public:
ATR_REG_FULL_DUPLEX = 'f'
};
+ //! aux dac selection enums (per unit)
+ enum aux_dac_t{
+ AUX_DAC_A = 'a',
+ AUX_DAC_B = 'b',
+ AUX_DAC_C = 'c',
+ AUX_DAC_D = 'd'
+ };
+
+ //! aux adc selection enums (per unit)
+ enum aux_adc_t{
+ AUX_ADC_A = 'a',
+ AUX_ADC_B = 'b'
+ };
+
/*!
* Write to an aux dac.
*
@@ -56,7 +71,7 @@ public:
* \param which_dac the dac index 0, 1, 2, 3...
* \param value the value in volts
*/
- virtual void write_aux_dac(unit_t unit, int which_dac, float value) = 0;
+ virtual void write_aux_dac(unit_t unit, aux_dac_t which_dac, float value) = 0;
/*!
* Read from an aux adc.
@@ -65,7 +80,7 @@ public:
* \param which_adc the adc index 0, 1, 2, 3...
* \return the value in volts
*/
- virtual float read_aux_adc(unit_t unit, int which_adc) = 0;
+ virtual float read_aux_adc(unit_t unit, aux_adc_t which_adc) = 0;
/*!
* Set a daughterboard output pin control source.
@@ -159,6 +174,14 @@ public:
) = 0;
/*!
+ * Set the rate of a dboard clock.
+ *
+ * \param unit which unit rx or tx
+ * \param rate the clock rate in Hz
+ */
+ virtual void set_clock_rate(unit_t unit, double rate) = 0;
+
+ /*!
* Get the rate of a dboard clock.
*
* \param unit which unit rx or tx
@@ -167,6 +190,14 @@ public:
virtual double get_clock_rate(unit_t unit) = 0;
/*!
+ * Get a list of possible rates for the dboard clock.
+ *
+ * \param unit which unit rx or tx
+ * \return a list of clock rates in Hz
+ */
+ virtual std::vector<double> get_clock_rates(unit_t unit) = 0;
+
+ /*!
* Enable or disable a dboard clock.
*
* \param unit which unit rx or tx