From: Michael Traxler Date: Fri, 2 Jul 2021 18:06:19 +0000 (+0200) Subject: added FaRICH to trbflash, mt X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=45c884e56d9f0221097a8ff784eade10f4a08a86;p=trbnettools.git added FaRICH to trbflash, mt --- diff --git a/libtrbnet/trbflash.c b/libtrbnet/trbflash.c index 8c2e839..3dfa4ee 100644 --- a/libtrbnet/trbflash.c +++ b/libtrbnet/trbflash.c @@ -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: "