From: hadaq Date: Thu, 10 Sep 2009 19:46:16 +0000 (+0000) Subject: bugfix in readCtrlReg fixed, was reading statusRegister before X-Git-Tag: v6.0~344 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=6259d7ae38723d8e060494b3acb208de912c0a1f;p=trbnettools.git bugfix in readCtrlReg fixed, was reading statusRegister before --- diff --git a/trbrich/trbflash.c b/trbrich/trbflash.c index 781fe5e..d0ce5d7 100644 --- a/trbrich/trbflash.c +++ b/trbrich/trbflash.c @@ -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));