From: hadaq Date: Thu, 14 Jun 2012 18:24:51 +0000 (+0000) Subject: update X-Git-Tag: v6.0~40 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=fac4ca3fcf9acc96e7aba0d8d1e2ecb9ae7e920f;p=trbnettools.git update --- diff --git a/libtrbnet/trbnet.c b/libtrbnet/trbnet.c index bca6df6..a7a13d8 100644 --- a/libtrbnet/trbnet.c +++ b/libtrbnet/trbnet.c @@ -1,4 +1,4 @@ -const char trbnet_version[] = "$Revision: 4.24 $ Local"; +const char trbnet_version[] = "$Revision: 4.25 $ Local"; #include #include @@ -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;