]> jspc29.x-matter.uni-frankfurt.de Git - trbnettools.git/commitdiff
bugfix in readCtrlReg fixed, was reading statusRegister before
authorhadaq <hadaq>
Thu, 10 Sep 2009 19:46:16 +0000 (19:46 +0000)
committerhadaq <hadaq>
Thu, 10 Sep 2009 19:46:16 +0000 (19:46 +0000)
trbrich/trbflash.c

index 781fe5efb94255e57fb17fc8a095c9b139480add..d0ce5d78d9b6a3828f47bb4848a62782070ebd2a 100644 (file)
@@ -63,7 +63,7 @@ static const char FlashTypeStr[][16] = {"INVALID", "ADCM1", "ADCM2", "MDC"};
 
 static FlashType flashType = FLASH_INVALID; 
 
-static const char trbflash_version[] = "$Revision: 2.05 $"; 
+static const char trbflash_version[] = "$Revision: 2.06 $"; 
 
 static uint32_t mdcFlashSelect = 1;
 
@@ -175,7 +175,7 @@ static int readCtrlRegister(uint16_t trb_address,
   
   /* Wait until NoMoreData is withdrawn */
   do {
-    if ((status = trb_register_read(trb_address, SetupReg,
+    if ((status = trb_register_read(trb_address, CtrlReg,
                                     trbBuffer, TRB_BUFFER_SIZE)) == -1) {
       fprintf(logFile, "Error > readCtrlRegister: TRBNet %s\n",
               trb_strerror(trb_errno));