summaryrefslogtreecommitdiff
path: root/usrp2
diff options
context:
space:
mode:
authoreb2008-10-27 08:08:52 +0000
committereb2008-10-27 08:08:52 +0000
commit02f918615be22ea1660aa70ac74904d8abaedb41 (patch)
treea080d8891f0a7f627d84a5e59868c615c9587f6a /usrp2
parent8b9d8612e3e32a8037782e027690e14b29254335 (diff)
downloadgnuradio-02f918615be22ea1660aa70ac74904d8abaedb41.tar.gz
gnuradio-02f918615be22ea1660aa70ac74904d8abaedb41.tar.bz2
gnuradio-02f918615be22ea1660aa70ac74904d8abaedb41.zip
Minor cleanup.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9873 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'usrp2')
-rw-r--r--usrp2/firmware/apps/app_common_v2.c2
-rw-r--r--usrp2/firmware/lib/db_rfx.c16
-rw-r--r--usrp2/firmware/lib/db_tvrx.c1
3 files changed, 15 insertions, 4 deletions
diff --git a/usrp2/firmware/apps/app_common_v2.c b/usrp2/firmware/apps/app_common_v2.c
index b048c3fca..a8d7b9270 100644
--- a/usrp2/firmware/apps/app_common_v2.c
+++ b/usrp2/firmware/apps/app_common_v2.c
@@ -123,8 +123,6 @@ op_id_cmd(const op_generic_t *p,
// r->fpga_md5sum = ; // FIXME
// r->sw_md5sum = ; // FIXME
- // FIXME Add d'board info, including dbid, min/max gain, min/max freq
-
return r->len;
}
diff --git a/usrp2/firmware/lib/db_rfx.c b/usrp2/firmware/lib/db_rfx.c
index 974222508..40d2cb2dc 100644
--- a/usrp2/firmware/lib/db_rfx.c
+++ b/usrp2/firmware/lib/db_rfx.c
@@ -447,6 +447,10 @@ rfx_init_tx(struct db_base *dbb)
{
//struct db_rfx_dummy *db = (struct db_rfx_dummy *) dbb;
clocks_enable_tx_dboard(true, 0);
+
+ // Set the freq now to get the one time 10ms delay out of the way.
+ u2_fxpt_freq_t dc;
+ dbb->set_freq(dbb, dbb->freq_min, &dc);
return true;
}
@@ -458,12 +462,19 @@ rfx_init_rx(struct db_base *dbb)
// test gain
dbb->set_gain(dbb,U2_DOUBLE_TO_FXPT_GAIN(45.0));
+
+ // Set the freq now to get the one time 10ms delay out of the way.
+ u2_fxpt_freq_t dc;
+ dbb->set_freq(dbb, dbb->freq_min, &dc);
+
return true;
}
bool
rfx_set_freq(struct db_base *dbb, u2_fxpt_freq_t freq, u2_fxpt_freq_t *dc)
{
+ static unsigned char first = true;
+
*dc = 0;
struct db_rfx_dummy *db = (struct db_rfx_dummy *) dbb;
//u2_fxpt_freq_t desired_n = db->common.freq_mult*freq/phdet_freq;
@@ -483,7 +494,10 @@ rfx_set_freq(struct db_base *dbb, u2_fxpt_freq_t freq, u2_fxpt_freq_t *dc)
spi_transact(SPI_TXONLY,db->common.spi_mask,R,24,SPIF_PUSH_FALL);
spi_transact(SPI_TXONLY,db->common.spi_mask,C,24,SPIF_PUSH_FALL);
- mdelay(10);
+ if (first){
+ first = false;
+ mdelay(10);
+ }
spi_transact(SPI_TXONLY,db->common.spi_mask,N,24,SPIF_PUSH_FALL);
//printf("A = %d, B = %d, N_DIV = %d\n",A, B, N_DIV);
diff --git a/usrp2/firmware/lib/db_tvrx.c b/usrp2/firmware/lib/db_tvrx.c
index 6b523d8fd..9e600bf88 100644
--- a/usrp2/firmware/lib/db_tvrx.c
+++ b/usrp2/firmware/lib/db_tvrx.c
@@ -23,7 +23,6 @@
#include <hal_io.h>
#include <ad9510.h>
#include <stdio.h>
-#include <mdelay.h>
bool tvrx_init(struct db_base *db);
bool tvrx_set_freq(struct db_base *db, u2_fxpt_freq_t freq, u2_fxpt_freq_t *dc);