]> jspc29.x-matter.uni-frankfurt.de Git - trbnettools.git/commitdiff
added FaRICH to trbflash, mt
authorMichael Traxler <M.Traxler@gsi.de>
Fri, 2 Jul 2021 18:06:19 +0000 (20:06 +0200)
committerMichael Traxler <M.Traxler@gsi.de>
Fri, 2 Jul 2021 18:06:19 +0000 (20:06 +0200)
libtrbnet/trbflash.c

index 8c2e839ebbece09df2a5f7bb5a1c2756817a28a0..3dfa4eec0f6d3e5bc6fad0c7197f00f39f9f100c 100644 (file)
@@ -98,7 +98,8 @@ typedef enum
     FLASH_TRB5SC = 24,
     
     FLASH_MDCOEP = 25,
-    FLASH_MDCTDC = 26
+    FLASH_MDCTDC = 26,
+    FLASH_FARICH = 27
   } FlashType;
 
 static const char FlashTypeStr[][32] = {
@@ -128,7 +129,8 @@ static const char FlashTypeStr[][32] = {
   "DirichConcentrator",
   "Trb5sc",
   "MDC OEP",
-  "MDC TDC"
+  "MDC TDC",
+  "Farich"
 };
 
 typedef struct {
@@ -374,7 +376,14 @@ static int setFlashParam(FlashParam* flashParam, uint16_t hardwareId)
     strcpy(flashParam->allowedStringId[1], "combiner");
     flashParam->numPages = 32768;
     break;    
-    
+
+  case 0x9b00:
+    flashParam->flashType = FLASH_FARICH;
+    flashParam->manId = 0x1728c2;
+    strcpy(flashParam->allowedStringId[0], "farich");
+    flashParam->numPages = 32768;
+    break;    
+  
   case 0xa500:
     flashParam->flashType = FLASH_TRB5SC;
     flashParam->manId = 0x1720c2;
@@ -622,13 +631,13 @@ 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;
     int match = 0;
     unsigned int j = 0;
-    
+
     if (i == 0) {
       if (setFlashParam(&flashParamRef, hardwareId) == -1) {
         fprintf(logFile, "Error > initTransfer: "