]> jspc29.x-matter.uni-frankfurt.de Git - trbnettools.git/commitdiff
update
authorhadaq <hadaq>
Wed, 26 Jan 2011 13:57:50 +0000 (13:57 +0000)
committerhadaq <hadaq>
Wed, 26 Jan 2011 13:57:50 +0000 (13:57 +0000)
libtrbnet/trbnet.c

index 048ab001eb8f8093fe0b00119d084ba76724423a..54fdcce19ab11dca1efd647875e1e9eace7bef55 100644 (file)
@@ -1,4 +1,4 @@
-const char trbnet_version[] = "$Revision: 4.0 $";
+const char trbnet_version[] = "$Revision: 4.1 $";
 
 #include <stdlib.h>
 #include <signal.h>
@@ -467,11 +467,13 @@ static int trb_init_transfer(uint8_t channel)
   }
   
   /* Check for TX not Busy */
+#ifndef PEXOR
   read32_from_FPGA(CHANNEL_N_SENDER_STATUS | ((channel * 2 + 1) << 4), &tmp);
   if (tmp != 0) {
     /* FIFO_TOGGLE_BIT-BUG Workaround */
     com_reset_FPGA();
   }
+#endif
   read32_from_FPGA(CHANNEL_N_SENDER_STATUS | ((channel * 2 + 1) << 4), &tmp);
   if (tmp != 0) {
     trb_errno = TRB_TX_BUSY;
@@ -479,12 +481,14 @@ static int trb_init_transfer(uint8_t channel)
   }
   
   /* Check receiver FIFO empty */
+#ifndef PEXOR
   read32_from_FPGA(CHANNEL_N_RECEIVER_FIFO_STATUS | ((channel * 2 + 1) << 4), 
                    &tmp);
   if ((tmp & MASK_FIFO_EMPTY) == 0) {
     /* FIFO_TOGGLE_BIT-BUG Workaround */
     com_reset_FPGA();
   }
+#endif
   read32_from_FPGA(CHANNEL_N_RECEIVER_FIFO_STATUS | ((channel * 2 + 1) << 4), 
                    &tmp);
   if ((tmp & MASK_FIFO_EMPTY) == 0) {
@@ -662,7 +666,8 @@ static int trb_fifo_read(uint8_t channel,
           trb_errno = TRB_FIFO_INVALID_HEADER;
           return -1;
         }
-      
+        
+#ifndef PEXOR
         /* Check Header H0 */
         if (((package.H0 & MASK_HEADER_REPLY) >> SHIFT_HEADER_REPLY
              != 0x01) ||
@@ -674,6 +679,7 @@ static int trb_fifo_read(uint8_t channel,
           trb_errno = TRB_FIFO_HEADERS;
           return -1;
         }
+#endif
       }
 
       /* Get Data F0 - F3 and store it in User-Data-Buffer if requested */