summaryrefslogtreecommitdiff
path: root/usrp/host/lib/inband/usrp_usb_interface.h
diff options
context:
space:
mode:
authoreb <eb@221aa14e-8319-0410-a670-987f0aec2ac5>2007-09-05 01:43:43 +0000
committereb <eb@221aa14e-8319-0410-a670-987f0aec2ac5>2007-09-05 01:43:43 +0000
commitb644e266dd6f5f4b6cdac126477b61debee89e26 (patch)
treeea2df43c9376b6125ae9b9bba070a3a901fc95f1 /usrp/host/lib/inband/usrp_usb_interface.h
parent9ccd0ffb7846f7d8d82e9214bca9c2d11311b649 (diff)
Merged features/inband-usb r5224:6306 into trunk.
This is work-in-progress on inband signaling for the USRP1. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@6307 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'usrp/host/lib/inband/usrp_usb_interface.h')
-rw-r--r--usrp/host/lib/inband/usrp_usb_interface.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/usrp/host/lib/inband/usrp_usb_interface.h b/usrp/host/lib/inband/usrp_usb_interface.h
new file mode 100644
index 000000000..42cda7af1
--- /dev/null
+++ b/usrp/host/lib/inband/usrp_usb_interface.h
@@ -0,0 +1,72 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef INCLUDED_USRP_USB_INTERFACE_H
+#define INCLUDED_USRP_USB_INTERFACE_H
+
+#include <mb_mblock.h>
+#include <vector>
+#include "usrp_standard.h"
+
+/*!
+ * \brief Implements the low level usb interface to the USRP
+ */
+class usrp_usb_interface : public mb_mblock
+{
+ public:
+
+ usrp_standard_tx* d_utx;
+ usrp_standard_rx* d_urx;
+
+ mb_port_sptr d_cs;
+ mb_port_sptr d_rx_cs;
+ mb_port_sptr d_tx_cs;
+
+ long d_ntx_chan;
+ long d_nrx_chan;
+
+ long d_fpga_debug;
+
+ bool d_fake_usrp;
+
+ long d_interp_tx;
+ long d_interp_rx;
+
+ long d_rf_freq;
+
+ std::string d_rbf;
+
+ public:
+ usrp_usb_interface(mb_runtime *rt, const std::string &instance_name, pmt_t user_arg);
+ ~usrp_usb_interface();
+ void initial_transition();
+ void handle_message(mb_message_sptr msg);
+
+ private:
+ void handle_cmd_open(pmt_t data);
+ void handle_cmd_close(pmt_t data);
+ void handle_cmd_write(pmt_t data);
+ void handle_cmd_start_reading(pmt_t data);
+ void handle_cmd_stop_reading(pmt_t data);
+
+};
+
+
+#endif /* INCLUDED_USRP_USB_INTERFACE_H */