]> jspc29.x-matter.uni-frankfurt.de Git - trbnettools.git/commitdiff
add trb5sc to trbflash
authorJan Michel <j.michel@gsi.de>
Wed, 17 Oct 2018 14:00:46 +0000 (16:00 +0200)
committerJan Michel <j.michel@gsi.de>
Wed, 17 Oct 2018 14:00:46 +0000 (16:00 +0200)
libtrbnet/trbflash.c

index 6809439b55e79ea13ab16c311dbe02af50a53d8d..9b7697a874a1f918c590f7c13db0d0c8301e4935 100644 (file)
@@ -94,7 +94,8 @@ typedef enum
     CBM_TOF_1 = 20,
     FLASH_TRB3SC = 21,
     FLASH_DIRICH = 22,
-    FLASH_DIRICH_CONCENTRATOR = 23
+    FLASH_DIRICH_CONCENTRATOR = 23,
+    FLASH_TRB5SC = 24
     
   } FlashType;
 
@@ -122,7 +123,8 @@ static const char FlashTypeStr[][32] = {
   "CBM TOF V1",
   "TRB3sc",
   "Dirich",
-  "DirichConcentrator"
+  "DirichConcentrator",
+  "Trb5sc"
 };
 
 typedef struct {
@@ -369,6 +371,13 @@ static int setFlashParam(FlashParam* flashParam, uint16_t hardwareId)
     flashParam->numPages = 32768;
     break;    
     
+  case 0xa500:
+    flashParam->flashType = FLASH_TRB5SC;
+    flashParam->manId = 0x1720c2;
+    strcpy(flashParam->allowedStringId[0], "trb5sc");
+    flashParam->numPages = 32768;
+    break;    
+  
   default:
     return -1;
   }
@@ -1796,7 +1805,7 @@ int main(int argc, char** argv)
     }
 
     for (i = 0; i < status; i++) {
-      char text[32] = "";
+      char text[33] = "";
       char cc[2] = " \0";
       int c;
       fprintf(stdout, "\nEndPoint: 0x%04x   Page #%d\n",