aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp1/usrp1_ctrl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-01-17 15:18:46 -0800
committerJosh Blum <josh@joshknows.com>2011-01-17 15:18:46 -0800
commitd71344091b324266975b58ec075d896fcb79aeb9 (patch)
tree33f2204ece9261f63ebe3a68c1d1d0f0faf2a307 /host/lib/usrp/usrp1/usrp1_ctrl.cpp
parent81dc70a6217f3d35dcf477a44c0151a6bc56e5a9 (diff)
downloaduhd-d71344091b324266975b58ec075d896fcb79aeb9.tar.gz
uhd-d71344091b324266975b58ec075d896fcb79aeb9.tar.bz2
uhd-d71344091b324266975b58ec075d896fcb79aeb9.zip
usrp1: work on usrp1 hardware compat with the api
today we added shutoff the DAC when not transmitting using EOB as an indicator added various other features and cleaned up code for soft time control
Diffstat (limited to 'host/lib/usrp/usrp1/usrp1_ctrl.cpp')
-rw-r--r--host/lib/usrp/usrp1/usrp1_ctrl.cpp29
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,