also configure the last SM (#622)

fixes #617
This commit is contained in:
lbckmnn 2022-07-02 11:32:02 +02:00 committed by GitHub
parent 9183e3068a
commit 42ec9bf238
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -919,7 +919,7 @@ static void ecx_config_create_input_mappings(ecx_contextt *context, void *pIOmap
} }
} }
/* search for SM that contribute to the input mapping */ /* search for SM that contribute to the input mapping */
while ((SMc < (EC_MAXSM - 1)) && (FMMUdone < ((context->slavelist[slave].Ibits + 7) / 8))) while ((SMc < EC_MAXSM) && (FMMUdone < ((context->slavelist[slave].Ibits + 7) / 8)))
{ {
EC_PRINT(" FMMU %d\n", FMMUc); EC_PRINT(" FMMU %d\n", FMMUc);
while ((SMc < (EC_MAXSM - 1)) && (context->slavelist[slave].SMtype[SMc] != 4)) while ((SMc < (EC_MAXSM - 1)) && (context->slavelist[slave].SMtype[SMc] != 4))
@ -1057,7 +1057,7 @@ static void ecx_config_create_output_mappings(ecx_contextt *context, void *pIOma
configadr = context->slavelist[slave].configadr; configadr = context->slavelist[slave].configadr;
/* search for SM that contribute to the output mapping */ /* search for SM that contribute to the output mapping */
while ((SMc < (EC_MAXSM - 1)) && (FMMUdone < ((context->slavelist[slave].Obits + 7) / 8))) while ((SMc < EC_MAXSM) && (FMMUdone < ((context->slavelist[slave].Obits + 7) / 8)))
{ {
EC_PRINT(" FMMU %d\n", FMMUc); EC_PRINT(" FMMU %d\n", FMMUc);
while ((SMc < (EC_MAXSM - 1)) && (context->slavelist[slave].SMtype[SMc] != 3)) while ((SMc < (EC_MAXSM - 1)) && (context->slavelist[slave].SMtype[SMc] != 3))