Skip to content

Commit c0b7870

Browse files
committed
[nrf toup][nrfconnect] Fix OTAUtil
Fix build error in OTAUtil.cpp Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
1 parent 1fa2a5e commit c0b7870

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

examples/platform/nrfconnect/util/OTAUtil.cpp

+2-7
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <app/clusters/ota-requestor/DefaultOTARequestorStorage.h>
2525
#include <app/server/Server.h>
2626
#include <platform/CHIPDeviceLayer.h>
27+
#include <platform/nrfconnect/ExternalFlashManager.h>
2728
#include <platform/nrfconnect/OTAImageProcessorImpl.h>
2829
#include <zephyr/dfu/mcuboot.h>
2930
#endif
@@ -45,7 +46,7 @@ chip::DefaultOTARequestor sOTARequestor;
4546
OTAImageProcessorImpl & GetOTAImageProcessor()
4647
{
4748
#if CONFIG_PM_DEVICE && CONFIG_NORDIC_QSPI_NOR
48-
static OTAImageProcessorImpl sOTAImageProcessor(&GetFlashHandler());
49+
static OTAImageProcessorImpl sOTAImageProcessor(ExternalFlashManager.GetInstance());
4950
#else
5051
static OTAImageProcessorImpl sOTAImageProcessor;
5152
#endif
@@ -93,9 +94,3 @@ void OtaConfirmNewImage()
9394
}
9495

9596
#endif
96-
97-
ExternalFlashManager & GetFlashHandler()
98-
{
99-
static ExternalFlashManager sFlashHandler;
100-
return sFlashHandler;
101-
}

examples/platform/nrfconnect/util/include/OTAUtil.h

-10
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
#pragma once
1919

20-
#include <platform/nrfconnect/ExternalFlashManager.h>
21-
2220
#if CONFIG_CHIP_OTA_REQUESTOR
2321
#include <platform/nrfconnect/OTAImageProcessorImpl.h>
2422

@@ -57,11 +55,3 @@ void InitBasicOTARequestor();
5755
void OtaConfirmNewImage();
5856

5957
#endif // CONFIG_CHIP_OTA_REQUESTOR
60-
61-
/**
62-
* Get ExternalFlashManager static instance.
63-
*
64-
* Returned object can be used to control the QSPI external flash,
65-
* which can be introduced into sleep mode and woken up on demand.
66-
*/
67-
chip::DeviceLayer::ExternalFlashManager & GetFlashHandler();

0 commit comments

Comments
 (0)