diff options
author | Josh Blum <josh@joshknows.com> | 2011-01-17 15:21:11 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-01-17 15:21:11 -0800 |
commit | 7e1d02710090c2c1aac971e41a2abb6f68c37d12 (patch) | |
tree | 9c3261ac3eebde988030a80f976e68d49516ac65 /host/lib/usrp/usrp1/usrp1_ctrl.cpp | |
parent | caa911aa270ee4aef7244f3159b9fd402a454069 (diff) | |
parent | d71344091b324266975b58ec075d896fcb79aeb9 (diff) | |
download | uhd-7e1d02710090c2c1aac971e41a2abb6f68c37d12.tar.gz uhd-7e1d02710090c2c1aac971e41a2abb6f68c37d12.tar.bz2 uhd-7e1d02710090c2c1aac971e41a2abb6f68c37d12.zip |
Merge branch 'usrp1' into next
Diffstat (limited to 'host/lib/usrp/usrp1/usrp1_ctrl.cpp')
-rw-r--r-- | host/lib/usrp/usrp1/usrp1_ctrl.cpp | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/host/lib/usrp/usrp1/usrp1_ctrl.cpp b/host/lib/usrp/usrp1/usrp1_ctrl.cpp index 5043aed7d..09f854813 100644 --- a/host/lib/usrp/usrp1/usrp1_ctrl.cpp +++ b/host/lib/usrp/usrp1/usrp1_ctrl.cpp @@ -139,13 +139,6 @@ public: _ctrl_transport = ctrl_transport; } - - ~usrp_ctrl_impl(void) - { - /* NOP */ - } - - int usrp_load_firmware(std::string filestring, bool force) { const char *filename = filestring.c_str(); @@ -233,6 +226,20 @@ public: return -1; } + void usrp_init(void){ + /* not calling because this causes junk to come at init + * and it does not seem to be necessary to call anyway + usrp_rx_enable(false); + usrp_rx_reset(true); + usrp_rx_reset(false); + usrp_rx_enable(true); + */ + + usrp_tx_enable(false); + usrp_tx_reset(true); + usrp_tx_reset(false); + usrp_tx_enable(true); + } int usrp_load_fpga(std::string filestring) { @@ -288,7 +295,7 @@ public: usrp_set_fpga_hash(hash); file.close(); if (load_img_msg) std::cout << " done" << std::endl; - return 0; + return 0; } int usrp_load_eeprom(std::string filestring) @@ -393,6 +400,12 @@ public: } + int usrp_rx_reset(bool on) + { + return usrp_control_write_cmd(VRQ_FPGA_SET_RX_RESET, on, 0); + } + + int usrp_control_write(boost::uint8_t request, boost::uint16_t value, boost::uint16_t index, |