Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SL-UP] Updating the firmware upgrade status for SoC #136

Merged
merged 2 commits into from
Nov 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/platform/silabs/SiWx917/OTAImageProcessorImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ extern "C" {
#define RPS_HEADER 1
#define RPS_DATA 2

#define SL_STATUS_FW_UPDATE_DONE SL_STATUS_SI91X_NO_AP_FOUND
uint8_t flag = RPS_HEADER;
static chip::OTAImageProcessorImpl gImageProcessor;

Expand Down Expand Up @@ -185,13 +184,13 @@ void OTAImageProcessorImpl::HandleFinalize(intptr_t context)

if (status != SL_STATUS_OK)
{
if (status == SL_STATUS_FW_UPDATE_DONE)
if (status == SL_STATUS_SI91X_FW_UPDATE_DONE)
{
mReset = true;
}
else
{
ChipLogError(SoftwareUpdate, "ERROR: In HandleFinalize for last chunk sl_si91x_fwup_load() error %ld", status);
ChipLogError(SoftwareUpdate, "ERROR: In HandleFinalize for last chunk sl_si91x_fwup_load() error 0x%lx", status);
imageProcessor->mDownloader->EndDownload(CHIP_ERROR_WRITE_FAILED);
return;
}
Expand Down Expand Up @@ -302,13 +301,13 @@ void OTAImageProcessorImpl::HandleProcessBlock(intptr_t context)
{
// If the last chunk of last block-writeBufOffset length is exactly kAlignmentBytes(64) bytes then mReset value
// should be set to true in HandleProcessBlock
if (status == SL_STATUS_FW_UPDATE_DONE)
if (status == SL_STATUS_SI91X_FW_UPDATE_DONE)
{
mReset = true;
}
else
{
ChipLogError(SoftwareUpdate, "ERROR: In HandleProcessBlock sl_si91x_fwup_load() error %ld", status);
ChipLogError(SoftwareUpdate, "ERROR: In HandleProcessBlock sl_si91x_fwup_load() error 0x%lx", status);
imageProcessor->mDownloader->EndDownload(CHIP_ERROR_WRITE_FAILED);
return;
}
Expand Down
Loading