Refs #820. Refactored return value check for NvmWrite and NvmErase.

git-svn-id: https://svn.code.sf.net/p/openblt/code/trunk@687 5dc33758-31d5-4daf-9ae8-b24bf3d40d73
This commit is contained in:
Frank Voorburg 2019-06-06 09:12:22 +00:00
parent 65d0755996
commit 41b4e6e69e
1 changed files with 3 additions and 3 deletions

View File

@ -1259,7 +1259,7 @@ static void XcpCmdProgramMax(blt_int8u *data)
#endif
/* program the data */
if (NvmWrite((blt_addr)xcpInfo.mta, XCP_CTO_PACKET_LEN-1, &data[1]) == 0)
if (NvmWrite((blt_addr)xcpInfo.mta, XCP_CTO_PACKET_LEN-1, &data[1]) == BLT_FALSE)
{
/* error occurred during programming */
XcpSetCtoError(XCP_ERR_GENERIC);
@ -1322,7 +1322,7 @@ static void XcpCmdProgram(blt_int8u *data)
return;
}
/* program the data */
if (NvmWrite((blt_addr)xcpInfo.mta, data[1], &data[2]) == 0)
if (NvmWrite((blt_addr)xcpInfo.mta, data[1], &data[2]) == BLT_FALSE)
{
/* error occurred during programming */
XcpSetCtoError(XCP_ERR_GENERIC);
@ -1354,7 +1354,7 @@ static void XcpCmdProgramClear(blt_int8u *data)
#endif
/* erase the memory */
if (NvmErase((blt_addr)xcpInfo.mta, *(blt_int32u *)&data[4]) == 0)
if (NvmErase((blt_addr)xcpInfo.mta, *(blt_int32u *)&data[4]) == BLT_FALSE)
{
/* error occurred during erasure */
XcpSetCtoError(XCP_ERR_GENERIC);