diff options
Diffstat (limited to 'host/include')
| -rw-r--r-- | host/include/uhd/usrp/dboard_iface.hpp | 58 | 
1 files changed, 20 insertions, 38 deletions
diff --git a/host/include/uhd/usrp/dboard_iface.hpp b/host/include/uhd/usrp/dboard_iface.hpp index c3a3a4e00..4a80908e0 100644 --- a/host/include/uhd/usrp/dboard_iface.hpp +++ b/host/include/uhd/usrp/dboard_iface.hpp @@ -64,8 +64,9 @@ public:      //! tells the host which unit to use      enum unit_t{ -        UNIT_RX = int('r'), -        UNIT_TX = int('t') +        UNIT_RX   = int('r'), +        UNIT_TX   = int('t'), +        UNIT_BOTH = int('b'),      };      //! aux dac selection enums (per unit) @@ -84,6 +85,8 @@ public:      typedef uhd::usrp::gpio_atr::gpio_atr_reg_t atr_reg_t; +    virtual ~dboard_iface(void) {}; +      /*!       * Get special properties information for this dboard slot.       * This call helps the dboard code to handle implementation @@ -118,8 +121,8 @@ public:       * \param mask 16-bits, 0=do not change, 1=change value       */      virtual void set_pin_ctrl( -        unit_t unit, boost::uint16_t value, boost::uint16_t mask = 0xffff -    ); +        unit_t unit, boost::uint32_t value, boost::uint32_t mask = 0xffff +    ) = 0;      /*!       * Read back the pin control setting. @@ -127,7 +130,7 @@ public:       * \param unit which unit rx or tx       * \return the 16-bit settings value       */ -    virtual boost::uint16_t get_pin_ctrl(unit_t unit); +    virtual boost::uint32_t get_pin_ctrl(unit_t unit) = 0;      /*!       * Set a daughterboard ATR register. @@ -138,8 +141,8 @@ public:       * \param mask 16-bits, 0=do not change, 1=change value       */      virtual void set_atr_reg( -        unit_t unit, atr_reg_t reg, boost::uint16_t value, boost::uint16_t mask = 0xffff -    ); +        unit_t unit, atr_reg_t reg, boost::uint32_t value, boost::uint32_t mask = 0xffff +    ) = 0;      /*!       * Read back an ATR register setting. @@ -148,7 +151,7 @@ public:       * \param reg which ATR register       * \return the 16-bit settings value       */ -    virtual boost::uint16_t get_atr_reg(unit_t unit, atr_reg_t reg); +    virtual boost::uint32_t get_atr_reg(unit_t unit, atr_reg_t reg) = 0;      /*!       * Set daughterboard GPIO data direction setting. @@ -158,8 +161,8 @@ public:       * \param mask 16-bits, 0=do not change, 1=change value       */      virtual void set_gpio_ddr( -        unit_t unit, boost::uint16_t value, boost::uint16_t mask = 0xffff -    ); +        unit_t unit, boost::uint32_t value, boost::uint32_t mask = 0xffff +    ) = 0;      /*!       * Read back the GPIO data direction setting. @@ -167,7 +170,7 @@ public:       * \param unit which unit rx or tx       * \return the 16-bit settings value       */ -    virtual boost::uint16_t get_gpio_ddr(unit_t unit); +    virtual boost::uint32_t get_gpio_ddr(unit_t unit) = 0;      /*!       * Set daughterboard GPIO pin output setting. @@ -177,8 +180,8 @@ public:       * \param mask 16-bits, 0=do not change, 1=change value       */      virtual void set_gpio_out( -        unit_t unit, boost::uint16_t value, boost::uint16_t mask = 0xffff -    ); +        unit_t unit, boost::uint32_t value, boost::uint32_t mask = 0xffff +    ) = 0;      /*!       * Read back the GPIO pin output setting. @@ -186,15 +189,7 @@ public:       * \param unit which unit rx or tx       * \return the 16-bit settings value       */ -    virtual boost::uint16_t get_gpio_out(unit_t unit); - -    /*! -     * Setup the GPIO debug mux. -     * -     * \param unit which unit rx or tx -     * \param which which debug: 0, 1 -     */ -    virtual void set_gpio_debug(unit_t unit, int which) = 0; +    virtual boost::uint32_t get_gpio_out(unit_t unit) = 0;      /*!       * Read daughterboard GPIO pin values. @@ -202,7 +197,7 @@ public:       * \param unit which unit rx or tx       * \return the value of the gpio unit       */ -    virtual boost::uint16_t read_gpio(unit_t unit) = 0; +    virtual boost::uint32_t read_gpio(unit_t unit) = 0;      /*!       * Write data to SPI bus peripheral. @@ -280,26 +275,13 @@ public:       * Get the command time.       * \return the command time       */ -    virtual uhd::time_spec_t get_command_time(void); +    virtual uhd::time_spec_t get_command_time(void) = 0;      /*!       * Set the command time.       * \param t the time       */ -    virtual void set_command_time(const uhd::time_spec_t& t); - -private: -    UHD_PIMPL_DECL(impl) _impl; - -    virtual void _set_pin_ctrl(unit_t unit, boost::uint16_t value) = 0; -    virtual void _set_atr_reg(unit_t unit, atr_reg_t reg, boost::uint16_t value) = 0; -    virtual void _set_gpio_ddr(unit_t unit, boost::uint16_t value) = 0; -    virtual void _set_gpio_out(unit_t unit, boost::uint16_t value) = 0; - -protected: -    dboard_iface(void); -public: -    virtual ~dboard_iface(void); +    virtual void set_command_time(const uhd::time_spec_t& t) = 0;  };  | 
