mirror of https://github.com/rusefi/openblt.git
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:
parent
6f80eb072f
commit
dcfac1767f
|
@ -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 */
|
/* this example computes the checksum using the add byte to byte algorithm */
|
||||||
while (length-- > 0)
|
while (length-- > 0)
|
||||||
{
|
{
|
||||||
|
/* add the next byte value */
|
||||||
cs += *((blt_int8u *)(blt_addr)address);
|
cs += *((blt_int8u *)(blt_addr)address);
|
||||||
|
/* increment address */
|
||||||
address++;
|
address++;
|
||||||
|
/* service the watchdog */
|
||||||
|
CopService();
|
||||||
}
|
}
|
||||||
|
/* store the computed checksum value */
|
||||||
*checksum = cs;
|
*checksum = cs;
|
||||||
|
/* inform the caller of the uses checksum computation algorithm */
|
||||||
return XCP_CS_ADD11;
|
return XCP_CS_ADD11;
|
||||||
} /*** end of XcpComputeChecksum ***/
|
} /*** end of XcpComputeChecksum ***/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue