Refs #483. Added watchdog servicing to XcpComputeChecksum().

git-svn-id: https://svn.code.sf.net/p/openblt/code/trunk@425 5dc33758-31d5-4daf-9ae8-b24bf3d40d73
This commit is contained in:
Frank Voorburg 2018-02-12 15:01:29 +00:00
parent 6f80eb072f
commit dcfac1767f
1 changed files with 6 additions and 2 deletions

View File

@ -359,12 +359,16 @@ static blt_int8u XcpComputeChecksum(blt_int32u address, blt_int32u length,
/* this example computes the checksum using the add byte to byte algorithm */
while (length-- > 0)
{
/* add the next byte value */
cs += *((blt_int8u *)(blt_addr)address);
/* increment address */
address++;
/* service the watchdog */
CopService();
}
/* store the computed checksum value */
*checksum = cs;
/* inform the caller of the uses checksum computation algorithm */
return XCP_CS_ADD11;
} /*** end of XcpComputeChecksum ***/