]> jspc29.x-matter.uni-frankfurt.de Git - trbnettools.git/commitdiff
bugfix
authorhadaq <hadaq>
Sun, 8 Jan 2012 22:48:53 +0000 (22:48 +0000)
committerhadaq <hadaq>
Sun, 8 Jan 2012 22:48:53 +0000 (22:48 +0000)
libtrbnet/trbcmd.c
libtrbnet/trbnet.c

index 16dadb80aef66cc36225e46868afff8ae060a1df..290cafa9739d4c9b084fff816985ca4f62d2c8eb 100644 (file)
@@ -25,7 +25,7 @@
 
 static int hexMode = HEXMODE;
 
-static const char trbcmd_version[] = "$Revision: 2.75 $";
+static const char trbcmd_version[] = "$Revision: 2.76 $";
 
 #define BACKLOG 10
 static uint16_t tcp_port = 55555;
@@ -108,7 +108,6 @@ void usage(const char *progName)
   fprintf(stdout,
           "  -H    hex-mode: all arguments will be interpreted "
           "as hexadecimal-numbers\n");
-  fprintf(stdout, "  -e    put an EOF marker \"<EOF>\" at end of output\n");
   fprintf(stdout, "  -V    version number\n");
   fprintf(stdout, "\nCommands:\n");
   fprintf(stdout, "   r <trbaddress> <register>                        -> "
@@ -192,7 +191,6 @@ int start(int argc, char **argv)
   int loop = 1;
   int sleepTime = 0;
   int loopCtr = 0;
-  int eof_marker = 0;
   uint16_t trgCtr = 0;          /* counter for the %ctr option */
   int opt;
   int i;
@@ -233,9 +231,6 @@ int start(int argc, char **argv)
     case 'H':
       hexMode = 1;
       break;
-    case 'e':
-      eof_marker = 1;
-      break;
     case 'V':
       printf("%s %s, using libtrbnet %s\n",
              basename(argv[0]), trbcmd_version, trbnet_version);
@@ -1268,16 +1263,15 @@ int start(int argc, char **argv)
         logError(ERROR, "Invalid command, try -h option\n");
         return -1;
       }
-      if (eof_marker == 1) {
-        fprintf(stdout, "<EOF>\n");
+      if (loop != 1) {
+        fprintf(stdout, "---\n");
+        fflush(stdout);
       }
     }  /* End script-file-loop */
     
     trgCtr++;
   
     if (sleepTime > 0) {
-                       printf("---\n");
-                       fflush(stdout);
       usleep(sleepTime);
     }
   }    /* End repeat-loop */
index e3122511dfcaac0faf27486cd0329b91e08822a9..42303bcc5e5de6cf3fb350de2940ddc31f6435d7 100644 (file)
@@ -1,4 +1,4 @@
-const char trbnet_version[] = "$Revision: 4.15 $  Local";
+const char trbnet_version[] = "$Revision: 4.16 $  Local";
 
 #include <stdlib.h>
 #include <signal.h>
@@ -20,9 +20,7 @@ const char trbnet_version[] = "$Revision: 4.15 $  Local";
 
 #define PCIBAR 0
                                                  
-#define DATA_BUFFER_SIZE  1048576     /* in 32-Bit words */
-static uint32_t dataBuffer[DATA_BUFFER_SIZE];
-//static uint32_t* dataBuffer = NULL;
+static uint32_t dataBuffer[DMA_BUFFER_NUM_PAGES * 1024];
 static unsigned int dataBufferSize = 0;
 
 static struct pexor_trbnet_io pexorDescriptor;