]> jspc29.x-matter.uni-frankfurt.de Git - trbnettools.git/commitdiff
Bug in trbflash.c fixed, FaRICH was missing.
authorMichael Boehmer <mboehmer@ph.tum.de>
Wed, 1 Jun 2022 18:12:02 +0000 (20:12 +0200)
committerMichael Boehmer <mboehmer@ph.tum.de>
Wed, 1 Jun 2022 18:12:02 +0000 (20:12 +0200)
libtrbnet/trbflash.c

index ca40c0c0f78f79c33b2a8e213823b50e4c2e9875..2c5e2a1a23c9363fcc9e5a85a25c149f7fed8189 100644 (file)
@@ -132,7 +132,7 @@ static const char FlashTypeStr[][32] = {
   "Trb5sc",
   "MDC OEP",
   "MDC TDC",
-  "Farich"
+  "Farich",
   "Dirich5s",
   "TOMcat"
 };
@@ -649,7 +649,7 @@ static int initTransfer(uint16_t trb_address)
             __LINE__, trb_strerror());
     return -1;
   }
-   
+  
   for (i = 0; i < status; i += 2) {
     FlashParam flashParam;
     uint16_t hardwareId = (trbBuffer[i + 1] >> 16) & 0xffff;
@@ -672,7 +672,7 @@ static int initTransfer(uint16_t trb_address)
               hardwareId, trbBuffer[i] & 0xffff);
       return -1;   
     }
-    
+
     /* Check here for flash group compatibility */
     do {
       if ((flashParam.flashType == flashParamRef.flashType) || 
@@ -732,7 +732,6 @@ static int initTransfer(uint16_t trb_address)
     }
   }
   
-  
   NUM_PAGES = flashParamRef.numPages;
   NUM_BLOCKS = (NUM_PAGES * PAGE_SIZE) / BLOCK_SIZE;
 
@@ -745,7 +744,7 @@ static int initTransfer(uint16_t trb_address)
     
   fprintf(stderr, "Found %d Endpoint(s) of group %s\n",
           counter, FlashTypeStr[flashParamRef.flashType]);
-  
+
   return counter;
 }
 
@@ -838,6 +837,7 @@ static int writePage(uint16_t trb_address, uint32_t pageNumber,
 
   /* Transfer trbBuffer */
   size = temp - trbBuffer + 1;
+  fprintf(logFile, "XXX PN %u NB %u S %u\n", pageNumber, numBytes, size);
   if ((status = trb_register_write_mem(trb_address, BlockRam, 0,
                                        trbBuffer, size))
       == -1) {