mirror of https://github.com/rusefi/openblt.git
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:
parent
65d0755996
commit
41b4e6e69e
|
@ -1259,7 +1259,7 @@ static void XcpCmdProgramMax(blt_int8u *data)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* program the data */
|
/* 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 */
|
/* error occurred during programming */
|
||||||
XcpSetCtoError(XCP_ERR_GENERIC);
|
XcpSetCtoError(XCP_ERR_GENERIC);
|
||||||
|
@ -1322,7 +1322,7 @@ static void XcpCmdProgram(blt_int8u *data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* program the data */
|
/* 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 */
|
/* error occurred during programming */
|
||||||
XcpSetCtoError(XCP_ERR_GENERIC);
|
XcpSetCtoError(XCP_ERR_GENERIC);
|
||||||
|
@ -1354,7 +1354,7 @@ static void XcpCmdProgramClear(blt_int8u *data)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* erase the memory */
|
/* 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 */
|
/* error occurred during erasure */
|
||||||
XcpSetCtoError(XCP_ERR_GENERIC);
|
XcpSetCtoError(XCP_ERR_GENERIC);
|
||||||
|
|
Loading…
Reference in New Issue