summaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-10-12 16:26:19 -0700
committerNick Foster <nick@nerdnetworks.org>2010-10-12 16:26:19 -0700
commit5b4cbfe4616492d96ad1b48578cf2d94e1216bf4 (patch)
tree67d843278ead59b2e85725b3dbc3de80562d9ccd /host/include
parent5982ec4ee2c6f9efca1c5068e42dc38b822df7dc (diff)
downloaduhd-5b4cbfe4616492d96ad1b48578cf2d94e1216bf4.tar.gz
uhd-5b4cbfe4616492d96ad1b48578cf2d94e1216bf4.tar.bz2
uhd-5b4cbfe4616492d96ad1b48578cf2d94e1216bf4.zip
USRP2P: mboard rev works through props interface.
Added usrp2_burn_mb_rev.cpp to utils. It is not installed to the utils install dir. Not all happy with the mboard_rev setup -- is_usrp2p() is too specific for a generalized mboard_rev concept. I'm not sure where else to put it so for now it stays.
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/usrp/mboard_rev.hpp34
1 files changed, 31 insertions, 3 deletions
diff --git a/host/include/uhd/usrp/mboard_rev.hpp b/host/include/uhd/usrp/mboard_rev.hpp
index 5307d80c1..be968d01d 100644
--- a/host/include/uhd/usrp/mboard_rev.hpp
+++ b/host/include/uhd/usrp/mboard_rev.hpp
@@ -25,7 +25,7 @@
namespace uhd{ namespace usrp{
- class UHD_API mboard_rev_t : boost::equality_comparable<mboard_rev_t>{
+ class UHD_API mboard_rev_t : boost::equality_comparable<mboard_rev_t>, boost::less_than_comparable<mboard_rev_t>{
public:
/*!
* Create a mboard rev from an integer.
@@ -71,6 +71,24 @@ namespace uhd{ namespace usrp{
* \return a string with the mboard name and rev number
*/
std::string to_pp_string(void) const;
+
+ /*!
+ * Tell you if you're USRP2 or USRP2+
+ * \return true if USRP2+, false if USRP2
+ */
+ bool is_usrp2p(void) const;
+
+ /*!
+ * Get the major revision number
+ * \return major revision number
+ */
+ boost::uint8_t major(void) const;
+
+ /*!
+ * Get the minor revision number
+ * \return minor revision number
+ */
+ boost::uint8_t minor(void) const;
private:
boost::uint16_t _rev; //internal representation
@@ -79,11 +97,21 @@ namespace uhd{ namespace usrp{
/*!
* Comparator operator overloaded for mboard rev.
* The boost::equality_comparable provides the !=.
- * \param lhs the dboard id to the left of the operator
- * \param rhs the dboard id to the right of the operator
+ * \param lhs the mboard rev to the left of the operator
+ * \param rhs the mboard rev to the right of the operator
* \return true when the mboard revs are equal
*/
UHD_API bool operator==(const mboard_rev_t &lhs, const mboard_rev_t &rhs);
+
+ /*!
+ * Comparator operator overloaded for mboard rev.
+ * The boost::less_than_comparable provides the >, <=, >=.
+ * \param lhs the mboard rev to the left of the operator
+ * \param rhs the mboard rev to the right of the operator
+ * \return true when lhs < rhs
+ */
+
+ UHD_API bool operator<(const mboard_rev_t &lhs, const mboard_rev_t &rhs);
}} //namespace