diff options
author | unknown <XSLOSHO@.seavus-dev2.com> | 2011-11-07 10:14:35 +0100 |
---|---|---|
committer | Viktor Mladenovski <viktor.mladenovski@seavus.com> | 2012-05-25 14:38:13 +0200 |
commit | e5812923ee1ae1298cb9ebf8a095cc62367a399c (patch) | |
tree | 5879aa1d44cc4a7704c86e1efb58059a7b39255b /source/LCDriverMethods.cpp | |
parent | c60e5c40802a7f14e9005eb9f462c6f741b1e839 (diff) |
Add LCD/LCM compatibility check
LCD/LCM compatibility check added to determine whether
PC-LCM is compatible with the LCD.
Error handling in LCM is added.
Depends-On: I6ad7dc8807cb8c407379fe448f06816904253520
ST-Ericsson ID: 362575
ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10204
Change-Id: If5b3c993739f93276e2a76b012a1852d687ad746
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/36378
Reviewed-by: QATOOLS
Reviewed-by: QABUILD
Reviewed-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com>
Tested-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com>
Diffstat (limited to 'source/LCDriverMethods.cpp')
-rw-r--r-- | source/LCDriverMethods.cpp | 75 |
1 files changed, 64 insertions, 11 deletions
diff --git a/source/LCDriverMethods.cpp b/source/LCDriverMethods.cpp index a24e5b9..13997ea 100644 --- a/source/LCDriverMethods.cpp +++ b/source/LCDriverMethods.cpp @@ -343,6 +343,13 @@ void CLCDriverMethods::BulkDataReqCallback(void *pObject, uint16 uiSession, uint return pLcdMethods->Do_BulkDataReqCallback(uiSession, uiChunkSize, uiOffset, uiLength, uiTotalLength, uiTransferedLength); } +void CLCDriverMethods::BulkReleaseBuffers(void *pObject, TL_BulkVectorList_t *BulkVector_p) +{ + CLCDriverMethods *pLcdMethods = static_cast<CLCDriverMethods *>(pObject); + return pLcdMethods->m_pBuffers->ReleaseBulkVector(BulkVector_p); +} + + void CLCDriverMethods::BulkDataEndOfDumpCallback(void *pObject) { CLCDriverMethods *pLcdMethods = static_cast<CLCDriverMethods *>(pObject); @@ -526,6 +533,10 @@ int CLCDriverMethods::Done_System_LoaderStartupStatus(char *pchVersion, int *piV CopyStringToArray(m_pCmdResult->System_LoaderStartupStatus_LoaderVersion, pchVersion, piVersionSize); CopyStringToArray(m_pCmdResult->System_LoaderStartupStatus_ProtocolVersion, pchProtocol, piProtocolSize); + //TODO: enable LCM_LDR Version check here!!!! + //LCM_t LCMType = LDR_LCM; + //VERIFY_SUCCESS(m_pLcmInterface->CommunicationCheckVersion(pchProtocol,LCMType)); + ErrorExit: if (E_SUCCESS != ReturnValue) { @@ -688,7 +699,12 @@ int CLCDriverMethods::Do_System_ExecuteSoftware(const uint32 ExecuteMode, const ErrorExit: if (iUseBulk) { - m_pBulkHandler->Finish(); + if (E_SUCCESS != ReturnValue) { + m_pBulkHandler->Finish(TRUE); + } else { + m_pBulkHandler->Finish(FALSE); + } + m_pBuffers->ReleaseBulkFile(); } @@ -910,6 +926,7 @@ int CLCDriverMethods::Do_Flash_ProcessFile(const char *pchPath, const char *pchT if (iUseBulk) { CLockCS lock(LCDMethodsCS); m_pLcmInterface->BulkSetCallbacks((void *)BulkCommandReqCallback, (void *)BulkDataReqCallback, (void *)BulkDataEndOfDumpCallback); + m_pLcmInterface->BulkBuffersRelease((void *)BulkReleaseBuffers); VERIFY_SUCCESS(m_pBuffers->AllocateBulkFile(pchPath)); uint64 uiLength = m_pBuffers->GetBulkFileLength(); m_uiBulkLength = uiLength; @@ -927,10 +944,14 @@ int CLCDriverMethods::Do_Flash_ProcessFile(const char *pchPath, const char *pchT ErrorExit: if (iUseBulk) { - m_pBulkHandler->Finish(); + if (E_SUCCESS != ReturnValue) { + m_pBulkHandler->Finish(TRUE); + } else { + m_pBulkHandler->Finish(FALSE); - if (0 != iDeleteBuffers) { - m_pBuffers->ReleaseBulkFile(); + if (0 != iDeleteBuffers) { + m_pBuffers->ReleaseBulkFile(); + } } } @@ -1008,7 +1029,11 @@ int CLCDriverMethods::Do_Flash_DumpArea(const char *pchPathToDump, uint64 uiStar ErrorExit: if (iUseBulk) { - m_pBulkHandler->Finish(); + if (E_SUCCESS != ReturnValue) { + m_pBulkHandler->Finish(TRUE); + } else { + m_pBulkHandler->Finish(FALSE); + } } return ReturnValue; @@ -1081,7 +1106,11 @@ int CLCDriverMethods::Do_Flash_FlashRaw(const char *pchPath, uint64 uiStart, uin ErrorExit: if (iUseBulk) { - m_pBulkHandler->Finish(); + if (E_SUCCESS != ReturnValue) { + m_pBulkHandler->Finish(TRUE); + } else { + m_pBulkHandler->Finish(FALSE); + } if (0 != iDeleteBuffers) { m_pBuffers->ReleaseBulkFile(); @@ -1282,7 +1311,11 @@ int CLCDriverMethods::Do_FileSystem_CopyFile(const char *pchSourcePath, int iSou ErrorExit: if (iSourceUseBulk || iDestinationUseBulk) { - m_pBulkHandler->Finish(); + if (E_SUCCESS != ReturnValue) { + m_pBulkHandler->Finish(TRUE); + } else { + m_pBulkHandler->Finish(FALSE); + } if (iSourceUseBulk) { m_pBuffers->ReleaseBulkFile(); @@ -1376,7 +1409,13 @@ int CLCDriverMethods::Do_FileSystem_ReadLoadModuleManifests(const char *pchTarge VERIFY_SUCCESS(WaitForEvent(EVENT_GR_RECEIVED, GROUP_FILE_SYSTEM_OPERATIONS, COMMAND_FILE_SYSTEM_OPERATIONS_READLOADMODULESMANIFESTS)); ErrorExit: - m_pBulkHandler->Finish(); + + if (E_SUCCESS != ReturnValue) { + m_pBulkHandler->Finish(TRUE); + } else { + m_pBulkHandler->Finish(FALSE); + } + return ReturnValue; } @@ -1495,7 +1534,12 @@ int CLCDriverMethods::Do_OTP_StoreSecureObject(const char *pchSourcePath, int iD ErrorExit: if (iUseBulk) { - m_pBulkHandler->Finish(); + if (E_SUCCESS != ReturnValue) { + m_pBulkHandler->Finish(TRUE); + } else { + m_pBulkHandler->Finish(FALSE); + } + m_pBuffers->ReleaseBulkFile(); } @@ -1580,7 +1624,11 @@ int CLCDriverMethods::Do_ParameterStorage_ReadGlobalDataSet(const char *pchGdfsI ErrorExit: if (iUseBulk) { - m_pBulkHandler->Finish(); + if (E_SUCCESS != ReturnValue) { + m_pBulkHandler->Finish(TRUE); + } else { + m_pBulkHandler->Finish(FALSE); + } } return ReturnValue; @@ -1618,7 +1666,12 @@ int CLCDriverMethods::Do_ParameterStorage_WriteGlobalDataSet(const char *pchGdfs ErrorExit: if (iUseBulk) { - m_pBulkHandler->Finish(); + if (E_SUCCESS != ReturnValue) { + m_pBulkHandler->Finish(TRUE); + } else { + m_pBulkHandler->Finish(FALSE); + } + m_pBuffers->ReleaseBulkFile(); } |