diff options
author | Josh Blum <josh@joshknows.com> | 2010-11-11 17:40:01 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-11-11 17:40:01 -0800 |
commit | 476afe68f5c37a3e10a1208b0150732d7770a023 (patch) | |
tree | 73ea72533375d32ac35bcfff578ac0d774a89343 /host/lib/usrp/usrp2/usrp2_iface.hpp | |
parent | 478f8174601350ad0edd52bb985657037b181a2d (diff) | |
download | uhd-476afe68f5c37a3e10a1208b0150732d7770a023.tar.gz uhd-476afe68f5c37a3e10a1208b0150732d7770a023.tar.bz2 uhd-476afe68f5c37a3e10a1208b0150732d7770a023.zip |
usrp2: made enums for the rev types and implemented in code
Diffstat (limited to 'host/lib/usrp/usrp2/usrp2_iface.hpp')
-rw-r--r-- | host/lib/usrp/usrp2/usrp2_iface.hpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_iface.hpp b/host/lib/usrp/usrp2/usrp2_iface.hpp index d7e5df9f5..af3ed6c9f 100644 --- a/host/lib/usrp/usrp2/usrp2_iface.hpp +++ b/host/lib/usrp/usrp2/usrp2_iface.hpp @@ -25,6 +25,7 @@ #include <boost/utility.hpp> #include <boost/cstdint.hpp> #include <utility> +#include <string> #include "fw_common.h" #include "usrp2_regs.hpp" @@ -108,16 +109,27 @@ public: virtual void write_uart(boost::uint8_t dev, const std::string &buf) = 0; virtual std::string read_uart(boost::uint8_t dev) = 0; - - virtual boost::uint16_t get_hw_rev(void) = 0; - - virtual bool is_usrp2p(void) = 0; + + //! The list of possible revision types + enum rev_type { + USRP2_REV3 = 3, + USRP2_REV4 = 4, + USRP_N200 = 200, + USRP_N210 = 210, + USRP_NXXX = 0 + }; + + //! Get the revision type for this device + virtual rev_type get_rev(void) = 0; + + //! Get the canonical name for this device + virtual const std::string get_cname(void) = 0; /*! * Register map selected from USRP2/USRP2+. */ usrp2_regs_t regs; - + //motherboard eeprom map structure uhd::usrp::mboard_eeprom_t mb_eeprom; }; |