[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r11071 - in gnuradio/branches/developers/eb/vrt: gr-vr
From: |
eb |
Subject: |
[Commit-gnuradio] r11071 - in gnuradio/branches/developers/eb/vrt: gr-vrt/src vrt/include/vrt vrt/lib |
Date: |
Wed, 20 May 2009 02:13:14 -0600 (MDT) |
Author: eb
Date: 2009-05-20 02:13:14 -0600 (Wed, 20 May 2009)
New Revision: 11071
Modified:
gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt.i
gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt_quadradio_source_32fc.cc
gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt_quadradio_source_32fc.h
gnuradio/branches/developers/eb/vrt/vrt/include/vrt/quadradio.h
gnuradio/branches/developers/eb/vrt/vrt/lib/quadradio.cc
Log:
added support to set dboard ctrl reg
Modified: gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt.i
===================================================================
--- gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt.i 2009-05-20
07:24:36 UTC (rev 11070)
+++ gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt.i 2009-05-20
08:13:14 UTC (rev 11071)
@@ -70,6 +70,9 @@
public:
~vrt_quadradio_source_32fc();
+
+ bool write_dboard_pins(int v);
+
};
Modified:
gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt_quadradio_source_32fc.cc
===================================================================
--- gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt_quadradio_source_32fc.cc
2009-05-20 07:24:36 UTC (rev 11070)
+++ gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt_quadradio_source_32fc.cc
2009-05-20 08:13:14 UTC (rev 11071)
@@ -59,3 +59,9 @@
{
return d_qr->stop_streaming();
}
+
+bool
+vrt_quadradio_source_32fc::write_dboard_pins(int v)
+{
+ return d_qr->write_dboard_pins(v);
+}
Modified:
gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt_quadradio_source_32fc.h
===================================================================
--- gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt_quadradio_source_32fc.h
2009-05-20 07:24:36 UTC (rev 11070)
+++ gnuradio/branches/developers/eb/vrt/gr-vrt/src/vrt_quadradio_source_32fc.h
2009-05-20 08:13:14 UTC (rev 11071)
@@ -56,6 +56,12 @@
* \brief Called by scheduler when stopping flowgraph
*/
virtual bool stop();
+
+ /*!
+ * \brief write \p v to daugherboard control setting register
+ */
+ bool write_dboard_pins(int v);
+
};
Modified: gnuradio/branches/developers/eb/vrt/vrt/include/vrt/quadradio.h
===================================================================
--- gnuradio/branches/developers/eb/vrt/vrt/include/vrt/quadradio.h
2009-05-20 07:24:36 UTC (rev 11070)
+++ gnuradio/branches/developers/eb/vrt/vrt/include/vrt/quadradio.h
2009-05-20 08:13:14 UTC (rev 11071)
@@ -71,6 +71,7 @@
bool start_streaming(int samples_per_pkt = 0);
bool stop_streaming();
+ bool write_dboard_pins(int v);
};
};
Modified: gnuradio/branches/developers/eb/vrt/vrt/lib/quadradio.cc
===================================================================
--- gnuradio/branches/developers/eb/vrt/vrt/lib/quadradio.cc 2009-05-20
07:24:36 UTC (rev 11070)
+++ gnuradio/branches/developers/eb/vrt/vrt/lib/quadradio.cc 2009-05-20
08:13:14 UTC (rev 11071)
@@ -66,7 +66,28 @@
return send_stop_rx_command(d_ctrl_fd);
}
+bool
+vrt::quadradio::write_dboard_pins(int v)
+{
+ uint32_t cmd[3];
+ cmd[0] = htonl(0); // verb: set
+ cmd[1] = htonl(1); // id: dboard_pins
+ cmd[2] = htonl(v); // value
+ int r = send(d_ctrl_fd, cmd, sizeof(cmd), 0);
+ if (r < 0){
+ perror("send");
+ return false;
+ }
+ if (r != sizeof(cmd)){
+ fprintf(stderr, "send: short return value. expected %zd, got %d\n",
sizeof(cmd), r);
+ return false;
+ }
+
+ return true;
+}
+
+
bool
vrt::quadradio::open_sockets(const char *quad_radio_ip, int
quad_radio_ctrl_port,
int *ctrl_fd_ptr, struct in_addr *ctrl_port_inaddr,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r11071 - in gnuradio/branches/developers/eb/vrt: gr-vrt/src vrt/include/vrt vrt/lib,
eb <=