File tree 1 file changed +15
-0
lines changed
src/platform/silabs/SiWx917
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ extern "C" {
39
39
#define SL_BOOTLOADER_OK 0L
40
40
#define SL_STATUS_FW_UPDATE_DONE SL_STATUS_SI91X_NO_AP_FOUND
41
41
uint8_t flag = RPS_HEADER;
42
+ static chip::OTAImageProcessorImpl gImageProcessor ;
42
43
43
44
namespace chip {
44
45
@@ -49,6 +50,15 @@ uint32_t OTAImageProcessorImpl::mWriteOffset
49
50
uint16_t OTAImageProcessorImpl::writeBufOffset = 0 ;
50
51
uint8_t OTAImageProcessorImpl::writeBuffer[kAlignmentBytes ] __attribute__((aligned(4 ))) = { 0 };
51
52
53
+ CHIP_ERROR OTAImageProcessorImpl::Init (OTADownloader * downloader)
54
+ {
55
+ ReturnErrorCodeIf (downloader == nullptr , CHIP_ERROR_INVALID_ARGUMENT);
56
+
57
+ gImageProcessor .SetOTADownloader (downloader);
58
+
59
+ return CHIP_NO_ERROR;
60
+ }
61
+
52
62
CHIP_ERROR OTAImageProcessorImpl::PrepareDownload ()
53
63
{
54
64
DeviceLayer::PlatformMgr ().ScheduleWork (HandlePrepareDownload, reinterpret_cast <intptr_t >(this ));
@@ -355,4 +365,9 @@ CHIP_ERROR OTAImageProcessorImpl::ReleaseBlock()
355
365
return CHIP_NO_ERROR;
356
366
}
357
367
368
+ OTAImageProcessorImpl & OTAImageProcessorImpl::GetDefaultInstance ()
369
+ {
370
+ return gImageProcessor ;
371
+ }
372
+
358
373
} // namespace chip
You can’t perform that action at this time.
0 commit comments