]> jspc29.x-matter.uni-frankfurt.de Git - trbnettools.git/commitdiff
update
authorhadaq <hadaq>
Thu, 14 Jun 2012 18:24:51 +0000 (18:24 +0000)
committerhadaq <hadaq>
Thu, 14 Jun 2012 18:24:51 +0000 (18:24 +0000)
libtrbnet/trbnet.c

index bca6df608cc492dc4d1c6bc7c4fa52e203787bbd..a7a13d8d53f94466ebd93deabaa200778304924e 100644 (file)
@@ -1,4 +1,4 @@
-const char trbnet_version[] = "$Revision: 4.24 $  Local";
+const char trbnet_version[] = "$Revision: 4.25 $  Local";
 
 #include <stdlib.h>
 #include <signal.h>
@@ -22,7 +22,7 @@ const char trbnet_version[] = "$Revision: 4.24 $  Local";
 #define PCIBAR 0
                                                  
 static uint32_t dataBuffer[DMA_BUFFER_NUM_PAGES * 1024];
-static unsigned int dataBufferSize = 0;  /* Size of dataBuffer in BYTES */
+static unsigned int dataBufferSize = 0;  /* Size of dataBuffer in 32bit words */
 
 static struct pexor_trbnet_io pexorDescriptor;
 int dma_size = 0;
@@ -39,7 +39,7 @@ int pexor_dma = 1;
 
 static uint16_t udpBuffer[750]; /* Maxminum is payload of one Ethernet-Frame */
 static uint16_t dataBuffer[4096 * 1024];
-static unsigned int dataBufferSize = 0;  /* Size of dataBuffer in BYTES */
+static unsigned int dataBufferSize = 0;  /* Size of dataBuffer in 16BIt words */
 static int trb3_sockfd = -1;
 static int trb3_sockfd_in = -1;
 static uint16_t trb3_port = 25000; 
@@ -385,7 +385,7 @@ static int getUDPPackage()
       : TRB_TRB3_SOCKET_ERROR;
     return -1;
   }
-  dataBufferSize = status;
+  dataBufferSize = status / 2;
   
   /* Adjust endianess ... */
   if (trb_debug > 2) {
@@ -1274,7 +1274,7 @@ int trb_fifo_read(uint8_t channel,
     }
 #endif    
   } /* end while () */
-
+  
   /* Copy StatusBits and Sequenze of TerminationPackage */
   trb_term.status_common = package.F2;
   trb_term.status_channel =  package.F1;