commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r7429 - in usrp2/trunk: firmware/apps host/apps


From: eb
Subject: [Commit-gnuradio] r7429 - in usrp2/trunk: firmware/apps host/apps
Date: Sun, 13 Jan 2008 21:43:09 -0700 (MST)

Author: eb
Date: 2008-01-13 21:43:08 -0700 (Sun, 13 Jan 2008)
New Revision: 7429

Modified:
   usrp2/trunk/firmware/apps/app_common.c
   usrp2/trunk/host/apps/gen_const.cc
Log:
minor tweaks

Modified: usrp2/trunk/firmware/apps/app_common.c
===================================================================
--- usrp2/trunk/firmware/apps/app_common.c      2008-01-14 03:56:12 UTC (rev 
7428)
+++ usrp2/trunk/firmware/apps/app_common.c      2008-01-14 04:43:08 UTC (rev 
7429)
@@ -25,6 +25,7 @@
 #include "memcpy_wa.h"
 #include "ethernet.h"
 #include "nonstdio.h"
+#include "print_rmon_regs.h"
 #include <string.h>
 
 volatile bool link_is_up = false;      // eth handler sets this
@@ -159,6 +160,7 @@
 config_tx_cmd(op_config_tx_t *p)
 {
   printf("config_tx_cmd: interp = %d\n", p->interp);
+  // print_rmon_regs();
 
   dsp_tx_regs->freq = p->phase_inc;
   dsp_tx_regs->scale_iq = p->scale_iq;

Modified: usrp2/trunk/host/apps/gen_const.cc
===================================================================
--- usrp2/trunk/host/apps/gen_const.cc  2008-01-14 03:56:12 UTC (rev 7428)
+++ usrp2/trunk/host/apps/gen_const.cc  2008-01-14 04:43:08 UTC (rev 7429)
@@ -1,6 +1,7 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
+#include <unistd.h>
 
 int
 main(int argc, char **argv)
@@ -13,10 +14,14 @@
   int i_val = strtol(argv[1], 0, 0);
   int q_val = strtol(argv[2], 0, 0);
 
-  uint32_t     sample;
-  sample = ((i_val & 0xffff) << 16) | (q_val & 0xffff);
+  static const int NSAMPLES = 16384;
 
+  uint32_t     sample[NSAMPLES];
+  sample[0] = ((i_val & 0xffff) << 16) | (q_val & 0xffff);
+  for (int i = 1; i < NSAMPLES; i++)
+    sample[i] = sample[0];
+
   while(1){
-    fwrite(&sample, sizeof(sample), 1, stdout);
+    write(1, sample, sizeof(sample));
   }
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]