diff options
author | Josh Blum <josh@joshknows.com> | 2010-09-30 15:03:04 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-09-30 15:03:04 -0700 |
commit | ccb7adcb150ae481ce08d4e0fa32641b5aec4e6e (patch) | |
tree | 111e27a507d711f890f99ea47c57f25757482e03 /host/lib/usrp/usrp1/usrp1_iface.cpp | |
parent | 507283b3d43d653bf7ff1b2aa04f3d642297c9b1 (diff) | |
parent | 790a5ac665144180cde712d46b799a115bb74e46 (diff) | |
download | uhd-ccb7adcb150ae481ce08d4e0fa32641b5aec4e6e.tar.gz uhd-ccb7adcb150ae481ce08d4e0fa32641b5aec4e6e.tar.bz2 uhd-ccb7adcb150ae481ce08d4e0fa32641b5aec4e6e.zip |
Merge branch 'master' into usrp_e_next
Diffstat (limited to 'host/lib/usrp/usrp1/usrp1_iface.cpp')
-rw-r--r-- | host/lib/usrp/usrp1/usrp1_iface.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/host/lib/usrp/usrp1/usrp1_iface.cpp b/host/lib/usrp/usrp1/usrp1_iface.cpp index 5fd3987d5..64ced2905 100644 --- a/host/lib/usrp/usrp1/usrp1_iface.cpp +++ b/host/lib/usrp/usrp1/usrp1_iface.cpp @@ -49,7 +49,7 @@ public: ******************************************************************/ void poke32(boost::uint32_t addr, boost::uint32_t value) { - boost::uint32_t swapped = byteswap(value); + boost::uint32_t swapped = uhd::htonx(value); if (iface_debug) { std::cout.fill('0'); @@ -72,12 +72,6 @@ public: std::cerr << "USRP: failed memory write: " << ret << std::endl; } - void poke16(boost::uint32_t, boost::uint16_t) - { - //fpga only handles 32 bit writes - std::cerr << "USRP: unsupported operation: poke16()" << std::endl; - } - boost::uint32_t peek32(boost::uint32_t addr) { boost::uint32_t value_out; @@ -95,13 +89,7 @@ public: if (ret < 0) std::cerr << "USRP: failed memory read: " << ret << std::endl; - return byteswap(value_out); - } - - boost::uint16_t peek16(boost::uint32_t addr) - { - boost::uint32_t val = peek32(addr); - return boost::uint16_t(val & 0xff); + return uhd::ntohx(value_out); } /******************************************************************* |