@@ -283,13 +283,13 @@ esp_err_t OTAImageProcessorImpl::DeltaOTAWriteCallback(const uint8_t * buf, size
283
283
#if defined(CONFIG_AUTO_UPDATE_RCP) && defined(CONFIG_OPENTHREAD_BORDER_ROUTER)
284
284
esp_err_t OTAImageProcessorImpl::ProcessRcpImage (intptr_t context, const uint8_t * buffer, uint32_t bufLen)
285
285
{
286
- esp_err_t err = ESP_OK;
286
+ esp_err_t err = ESP_OK;
287
287
auto * imageProcessor = reinterpret_cast <OTAImageProcessorImpl *>(context);
288
288
289
289
if (!imageProcessor->mRcpDone )
290
290
{
291
291
size_t rcpOtaReceivedLen = 0 ;
292
- err = esp_rcp_ota_receive (imageProcessor->mRcpOtaHandle , buffer, bufLen, &rcpOtaReceivedLen);
292
+ err = esp_rcp_ota_receive (imageProcessor->mRcpOtaHandle , buffer, bufLen, &rcpOtaReceivedLen);
293
293
294
294
if (esp_rcp_ota_get_state (imageProcessor->mRcpOtaHandle ) == ESP_RCP_OTA_STATE_FINISHED)
295
295
{
@@ -369,9 +369,9 @@ void OTAImageProcessorImpl::HandlePrepareDownload(intptr_t context)
369
369
#endif // CONFIG_ENABLE_ENCRYPTED_OTA
370
370
371
371
#if defined(CONFIG_AUTO_UPDATE_RCP) && defined(CONFIG_OPENTHREAD_BORDER_ROUTER)
372
- imageProcessor->mRcpOtaHandle = 0 ;
372
+ imageProcessor->mRcpOtaHandle = 0 ;
373
373
imageProcessor->mBrFirmwareSize = 0 ;
374
- imageProcessor->mRcpDone = false ;
374
+ imageProcessor->mRcpDone = false ;
375
375
if (esp_rcp_ota_begin (&imageProcessor->mRcpOtaHandle ) != ESP_OK)
376
376
{
377
377
return ;
@@ -424,9 +424,9 @@ void OTAImageProcessorImpl::HandleFinalize(intptr_t context)
424
424
#elif defined(CONFIG_AUTO_UPDATE_RCP) && defined(CONFIG_OPENTHREAD_BORDER_ROUTER)
425
425
esp_err_t err = esp_rcp_ota_end (imageProcessor->mRcpOtaHandle );
426
426
err |= esp_ota_end (imageProcessor->mOTAUpdateHandle );
427
- imageProcessor->mRcpOtaHandle = 0 ;
427
+ imageProcessor->mRcpOtaHandle = 0 ;
428
428
imageProcessor->mBrFirmwareSize = 0 ;
429
- imageProcessor->mRcpDone = false ;
429
+ imageProcessor->mRcpDone = false ;
430
430
#else
431
431
esp_err_t err = esp_ota_end (imageProcessor->mOTAUpdateHandle );
432
432
#endif // CONFIG_ENABLE_DELTA_OTA
@@ -473,9 +473,9 @@ void OTAImageProcessorImpl::HandleAbort(intptr_t context)
473
473
{
474
474
ESP_LOGE (TAG, " ESP RCP OTA abort failed" );
475
475
}
476
- imageProcessor->mRcpOtaHandle = 0 ;
476
+ imageProcessor->mRcpOtaHandle = 0 ;
477
477
imageProcessor->mBrFirmwareSize = 0 ;
478
- imageProcessor->mRcpDone = false ;
478
+ imageProcessor->mRcpDone = false ;
479
479
#endif
480
480
481
481
if (esp_ota_abort (imageProcessor->mOTAUpdateHandle ) != ESP_OK)
@@ -541,9 +541,9 @@ void OTAImageProcessorImpl::HandleProcessBlock(intptr_t context)
541
541
// Apply the patch and writes that data to the passive partition.
542
542
err = esp_delta_ota_feed_patch (imageProcessor->mDeltaOTAUpdateHandle , blockToWrite.data () + index , blockToWrite.size () - index );
543
543
#elif defined(CONFIG_AUTO_UPDATE_RCP) && defined(CONFIG_OPENTHREAD_BORDER_ROUTER)
544
- err = imageProcessor->ProcessRcpImage (context, blockToWrite.data (), blockToWrite.size ());
544
+ err = imageProcessor->ProcessRcpImage (context, blockToWrite.data (), blockToWrite.size ());
545
545
#else
546
- err = esp_ota_write (imageProcessor->mOTAUpdateHandle , blockToWrite.data (), blockToWrite.size ());
546
+ err = esp_ota_write (imageProcessor->mOTAUpdateHandle , blockToWrite.data (), blockToWrite.size ());
547
547
#endif // CONFIG_ENABLE_DELTA_OTA
548
548
549
549
#ifdef CONFIG_ENABLE_ENCRYPTED_OTA
0 commit comments