[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r9873 - in gnuradio/trunk/usrp2/firmware: apps lib
From: |
eb |
Subject: |
[Commit-gnuradio] r9873 - in gnuradio/trunk/usrp2/firmware: apps lib |
Date: |
Mon, 27 Oct 2008 02:08:52 -0600 (MDT) |
Author: eb
Date: 2008-10-27 02:08:52 -0600 (Mon, 27 Oct 2008)
New Revision: 9873
Modified:
gnuradio/trunk/usrp2/firmware/apps/app_common_v2.c
gnuradio/trunk/usrp2/firmware/lib/db_rfx.c
gnuradio/trunk/usrp2/firmware/lib/db_tvrx.c
Log:
Minor cleanup.
Modified: gnuradio/trunk/usrp2/firmware/apps/app_common_v2.c
===================================================================
--- gnuradio/trunk/usrp2/firmware/apps/app_common_v2.c 2008-10-27 07:31:41 UTC
(rev 9872)
+++ gnuradio/trunk/usrp2/firmware/apps/app_common_v2.c 2008-10-27 08:08:52 UTC
(rev 9873)
@@ -123,8 +123,6 @@
// r->fpga_md5sum = ; // FIXME
// r->sw_md5sum = ; // FIXME
- // FIXME Add d'board info, including dbid, min/max gain, min/max freq
-
return r->len;
}
Modified: gnuradio/trunk/usrp2/firmware/lib/db_rfx.c
===================================================================
--- gnuradio/trunk/usrp2/firmware/lib/db_rfx.c 2008-10-27 07:31:41 UTC (rev
9872)
+++ gnuradio/trunk/usrp2/firmware/lib/db_rfx.c 2008-10-27 08:08:52 UTC (rev
9873)
@@ -447,6 +447,10 @@
{
//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 @@
// 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 @@
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);
Modified: gnuradio/trunk/usrp2/firmware/lib/db_tvrx.c
===================================================================
--- gnuradio/trunk/usrp2/firmware/lib/db_tvrx.c 2008-10-27 07:31:41 UTC (rev
9872)
+++ gnuradio/trunk/usrp2/firmware/lib/db_tvrx.c 2008-10-27 08:08:52 UTC (rev
9873)
@@ -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);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r9873 - in gnuradio/trunk/usrp2/firmware: apps lib,
eb <=