Skip to content

Commit f29a2d8

Browse files
restyled-commitsmykrupp
authored andcommitted
Restyled by clang-format
1 parent 1b29c71 commit f29a2d8

File tree

6 files changed

+17
-24
lines changed

6 files changed

+17
-24
lines changed

examples/platform/silabs/OTAConfig.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
*/
1818

1919
#include "OTAConfig.h"
20-
#include <app/server/Server.h>
2120
#include "silabs_utils.h"
21+
#include <app/server/Server.h>
2222

2323
#ifndef SIWX_917
2424

src/platform/silabs/multi-ota/OTAMultiImageProcessorImpl.cpp

+3-9
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
* limitations under the License.
1717
*/
1818

19+
#include <app/clusters/ota-requestor/OTADownloader.h>
20+
#include <app/clusters/ota-requestor/OTARequestorInterface.h>
1921
#include <lib/support/BufferReader.h>
2022
#include <platform/DiagnosticDataProvider.h>
2123
#include <platform/internal/CHIPDeviceLayerInternal.h>
2224
#include <platform/internal/GenericConfigurationManagerImpl.h>
23-
#include <app/clusters/ota-requestor/OTADownloader.h>
24-
#include <app/clusters/ota-requestor/OTARequestorInterface.h>
2525

2626
#include <platform/silabs/multi-ota/OTAMultiImageProcessorImpl.h>
2727

@@ -38,7 +38,6 @@ extern "C" {
3838
#endif // SL_WIFI
3939
}
4040

41-
4241
namespace chip {
4342

4443
CHIP_ERROR OTAMultiImageProcessorImpl::Init(OTADownloader * downloader)
@@ -223,10 +222,8 @@ void OTAMultiImageProcessorImpl::HandleAbort(intptr_t context)
223222
imageProcessor->AbortAllProcessors();
224223
}
225224
imageProcessor->Clear();
226-
227225
}
228226

229-
230227
void OTAMultiImageProcessorImpl::HandleProcessBlock(intptr_t context)
231228
{
232229
auto * imageProcessor = reinterpret_cast<OTAMultiImageProcessorImpl *>(context);
@@ -347,7 +344,7 @@ CHIP_ERROR OTAMultiImageProcessorImpl::SetBlock(ByteSpan & block)
347344
void OTAMultiImageProcessorImpl::HandleFinalize(intptr_t context)
348345
{
349346
ChipLogError(SoftwareUpdate, "HandleFinalize begin");
350-
CHIP_ERROR error = CHIP_NO_ERROR;
347+
CHIP_ERROR error = CHIP_NO_ERROR;
351348
auto * imageProcessor = reinterpret_cast<OTAMultiImageProcessorImpl *>(context);
352349
if (imageProcessor == nullptr)
353350
{
@@ -423,7 +420,6 @@ void OTAMultiImageProcessorImpl::HandleApply(intptr_t context)
423420

424421
ChipLogProgress(SoftwareUpdate, "HandleApply: Finished");
425422

426-
427423
// TODO: check where to put this
428424
// ConfigurationManagerImpl().StoreSoftwareUpdateCompleted();
429425

@@ -446,7 +442,6 @@ void OTAMultiImageProcessorImpl::FetchNextData(uint32_t context)
446442
{
447443
ChipLogError(SoftwareUpdate, "Fetch data 1:");
448444

449-
450445
auto * imageProcessor = &OTAMultiImageProcessorImpl::GetDefaultInstance();
451446
SystemLayer().ScheduleLambda([imageProcessor] {
452447
if (imageProcessor->mDownloader)
@@ -455,7 +450,6 @@ void OTAMultiImageProcessorImpl::FetchNextData(uint32_t context)
455450
}
456451
});
457452
ChipLogError(SoftwareUpdate, "Fetch data 2:");
458-
459453
}
460454

461455
OTAMultiImageProcessorImpl & OTAMultiImageProcessorImpl::GetDefaultInstance()

src/platform/silabs/multi-ota/OTAMultiImageProcessorImpl.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818

1919
#pragma once
2020

21-
#include <lib/core/OTAImageHeader.h>
22-
#include <map>
23-
#include <platform/silabs/multi-ota/OTATlvProcessor.h>
2421
#include <app/clusters/ota-requestor/OTADownloader.h>
2522
#include <app/clusters/ota-requestor/OTARequestorInterface.h>
2623
#include <include/platform/CHIPDeviceLayer.h>
2724
#include <include/platform/OTAImageProcessor.h>
25+
#include <lib/core/OTAImageHeader.h>
26+
#include <map>
27+
#include <platform/silabs/multi-ota/OTATlvProcessor.h>
2828

2929
/*
3030
* This hook is called at the end of OTAMultiImageProcessorImpl::Init.

src/platform/silabs/multi-ota/OTATlvProcessor.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ class OTATlvProcessor
8080
public:
8181
virtual ~OTATlvProcessor() {}
8282

83-
virtual CHIP_ERROR Init() = 0;
84-
virtual CHIP_ERROR Clear() = 0;
85-
virtual CHIP_ERROR ApplyAction() = 0;
83+
virtual CHIP_ERROR Init() = 0;
84+
virtual CHIP_ERROR Clear() = 0;
85+
virtual CHIP_ERROR ApplyAction() = 0;
8686
virtual CHIP_ERROR FinalizeAction() = 0;
87-
//virtual CHIP_ERROR AbortAction() = 0;
87+
// virtual CHIP_ERROR AbortAction() = 0;
8888
virtual CHIP_ERROR ExitAction() { return CHIP_NO_ERROR; }
8989

9090
CHIP_ERROR Process(ByteSpan & block);

src/platform/silabs/multi-ota/efr32/OTAFirmwareProcessor.cpp

+4-5
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ CHIP_ERROR OTAFirmwareProcessor::ProcessInternal(ByteSpan & block)
104104
{
105105
ChipLogError(SoftwareUpdate, "bootloader_eraseWriteStorage() error: %ld", err);
106106
// TODO: add this somewhere
107-
//imageProcessor->mDownloader->EndDownload(CHIP_ERROR_WRITE_FAILED);
107+
// imageProcessor->mDownloader->EndDownload(CHIP_ERROR_WRITE_FAILED);
108108
// TODO: Replace CHIP_ERROR_CANCELLED with new error statement
109109
return CHIP_ERROR_CANCELLED;
110110
}
@@ -130,7 +130,7 @@ CHIP_ERROR OTAFirmwareProcessor::ApplyAction()
130130
{
131131
uint32_t err = SL_BOOTLOADER_OK;
132132

133-
#if SL_BTLCTRL_MUX
133+
#if SL_BTLCTRL_MUX
134134
err = sl_wfx_host_pre_bootloader_spi_transfer();
135135
if (err != SL_STATUS_OK)
136136
{
@@ -181,14 +181,14 @@ CHIP_ERROR OTAFirmwareProcessor::ApplyAction()
181181
}
182182
#endif // SL_BTLCTRL_MUX
183183
// This reboots the device
184-
//CORE_CRITICAL_SECTION(bootloader_rebootAndInstall();)
184+
// CORE_CRITICAL_SECTION(bootloader_rebootAndInstall();)
185185

186186
return CHIP_NO_ERROR;
187187
}
188188

189189
CHIP_ERROR OTAFirmwareProcessor::FinalizeAction()
190190
{
191-
uint32_t err = SL_BOOTLOADER_OK;
191+
uint32_t err = SL_BOOTLOADER_OK;
192192

193193
// Pad the remainder of the write buffer with zeros and write it to bootloader storage
194194
if (writeBufOffset != 0)
@@ -216,7 +216,6 @@ CHIP_ERROR OTAFirmwareProcessor::FinalizeAction()
216216
return SL_GENERIC_OTA_ERROR;
217217
}
218218
#endif // SL_BTLCTRL_MUX
219-
220219
}
221220

222221
return err ? CHIP_ERROR_WRITE_FAILED : CHIP_NO_ERROR;

src/platform/silabs/multi-ota/efr32/OTAHooks.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
* limitations under the License.
1717
*/
1818

19-
#include <platform/silabs/multi-ota/OTAMultiImageProcessorImpl.h>
2019
#include <include/platform/CHIPDeviceLayer.h>
20+
#include <platform/silabs/multi-ota/OTAMultiImageProcessorImpl.h>
2121

2222
#include <app/clusters/ota-requestor/OTARequestorInterface.h>
2323

24-
#include <platform/silabs/multi-ota/efr32/OTAFirmwareProcessor.h>
2524
#include <platform/silabs/multi-ota/efr32/OTACustomProcessor.h>
25+
#include <platform/silabs/multi-ota/efr32/OTAFirmwareProcessor.h>
2626

2727
CHIP_ERROR ProcessDescriptor(void * descriptor)
2828
{

0 commit comments

Comments
 (0)