[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r11525 - in gnuradio/branches/developers/eb/vrt2: gr-v
From: |
eb |
Subject: |
[Commit-gnuradio] r11525 - in gnuradio/branches/developers/eb/vrt2: gr-vrt/src vrt/include/vrt vrt/lib |
Date: |
Sat, 1 Aug 2009 17:30:11 -0600 (MDT) |
Author: eb
Date: 2009-08-01 17:30:10 -0600 (Sat, 01 Aug 2009)
New Revision: 11525
Modified:
gnuradio/branches/developers/eb/vrt2/gr-vrt/src/vrt_quadradio_source_32fc.cc
gnuradio/branches/developers/eb/vrt2/gr-vrt/src/vrt_quadradio_source_32fc.h
gnuradio/branches/developers/eb/vrt2/vrt/include/vrt/quadradio.h
gnuradio/branches/developers/eb/vrt2/vrt/lib/quadradio.cc
Log:
Renamed write_dboard_pins to set_dboard_pins and added which_dboard as
the first parameter. The convenience methods were not modified.
Modified:
gnuradio/branches/developers/eb/vrt2/gr-vrt/src/vrt_quadradio_source_32fc.cc
===================================================================
---
gnuradio/branches/developers/eb/vrt2/gr-vrt/src/vrt_quadradio_source_32fc.cc
2009-08-01 14:56:28 UTC (rev 11524)
+++
gnuradio/branches/developers/eb/vrt2/gr-vrt/src/vrt_quadradio_source_32fc.cc
2009-08-01 23:30:10 UTC (rev 11525)
@@ -74,9 +74,9 @@
}
bool
-vrt_quadradio_source_32fc::write_dboard_pins(int v)
+vrt_quadradio_source_32fc::set_dboard_pins(int which_dboard, int v)
{
- return d_qr->write_dboard_pins(v);
+ return d_qr->set_dboard_pins(which_dboard, v);
}
bool
Modified:
gnuradio/branches/developers/eb/vrt2/gr-vrt/src/vrt_quadradio_source_32fc.h
===================================================================
--- gnuradio/branches/developers/eb/vrt2/gr-vrt/src/vrt_quadradio_source_32fc.h
2009-08-01 14:56:28 UTC (rev 11524)
+++ gnuradio/branches/developers/eb/vrt2/gr-vrt/src/vrt_quadradio_source_32fc.h
2009-08-01 23:30:10 UTC (rev 11525)
@@ -62,11 +62,6 @@
virtual bool stop();
/*!
- * \brief write \p v to daugherboard control setting register
- */
- bool write_dboard_pins(int v);
-
- /*!
* \brief Set the LO frequency (actually just sets the band select for now).
*/
bool set_center_freq(double target_freq);
@@ -103,6 +98,11 @@
void set_test_signal(int type);
bool set_setting_reg(int regno, int value);
+
+ /*!
+ * \brief write \p v to daugherboard control setting register
+ */
+ bool set_dboard_pins(int which_dboard, int v);
bool set_hsadc_conf(int which_dboard, int regno, int value);
bool set_lsdac(int which_dboard, int which_dac, int value);
bool set_mem32(int addr, int value);
Modified: gnuradio/branches/developers/eb/vrt2/vrt/include/vrt/quadradio.h
===================================================================
--- gnuradio/branches/developers/eb/vrt2/vrt/include/vrt/quadradio.h
2009-08-01 14:56:28 UTC (rev 11524)
+++ gnuradio/branches/developers/eb/vrt2/vrt/include/vrt/quadradio.h
2009-08-01 23:30:10 UTC (rev 11525)
@@ -89,7 +89,6 @@
bool start_streaming(int samples_per_pkt = 0);
bool stop_streaming();
- bool write_dboard_pins(int v);
/* convenience methods that ultimately write the dboard pins */
bool set_center_freq(double target_freq);
@@ -105,13 +104,14 @@
void set_digital_gain(float gain);
void set_test_signal(vrt_test_sig_t type);
+ /* primitives */
bool set_setting_reg(int regno, int value);
+ bool set_dboard_pins(int which_dboard, int v);
bool set_hsadc_conf(int which_dboard, int regno, int value);
bool set_lsdac(int which_dboard, int which_dac, int value);
bool set_mem32(int addr, int value); // poke a 32-bit value
bool set_lo_freq(double freq);
bool set_cal_freq(double freq);
-
};
};
Modified: gnuradio/branches/developers/eb/vrt2/vrt/lib/quadradio.cc
===================================================================
--- gnuradio/branches/developers/eb/vrt2/vrt/lib/quadradio.cc 2009-08-01
14:56:28 UTC (rev 11524)
+++ gnuradio/branches/developers/eb/vrt2/vrt/lib/quadradio.cc 2009-08-01
23:30:10 UTC (rev 11525)
@@ -161,20 +161,9 @@
d_band_select, d_rx_antenna, d_10dB_atten, d_attenuation, db_ctrl);*/
/*printf("Setting dboard pins:\nband_sel %d, rx_ant %d, atten0 %d, atten1
%d, bits %x\n",
d_band_select, d_rx_antenna, d_attenuation0, d_attenuation1,
db_ctrl);*/
- write_dboard_pins(db_ctrl);
+ set_dboard_pins(0, db_ctrl); // FIXME
}
-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
-
- return send_and_check(d_ctrl_fd, cmd, sizeof(cmd));
-}
-
void
vrt::quadradio::set_adc_gain(bool on){
if (on) set_hsadc_conf(0, 0x14, 0x90);
@@ -298,6 +287,8 @@
return true;
}
+// ------------------------------------------------------------------------
+
bool
vrt::quadradio::send_rx_command(int ctrl_fd, bool start,
struct in_addr addr, int data_port,
@@ -324,6 +315,18 @@
}
bool
+vrt::quadradio::set_dboard_pins(int which_dboard, int v)
+{
+ uint32_t cmd[4];
+ cmd[0] = htonl(0); // verb: set
+ cmd[1] = htonl(1); // id: dboard_pins
+ cmd[2] = htonl(which_dboard);
+ cmd[3] = htonl(v); // value
+
+ return send_and_check(d_ctrl_fd, cmd, sizeof(cmd));
+}
+
+bool
vrt::quadradio::set_setting_reg(int regno, int value)
{
uint32_t cmd[4];
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r11525 - in gnuradio/branches/developers/eb/vrt2: gr-vrt/src vrt/include/vrt vrt/lib,
eb <=