Commit 3026947 1 parent 3facccb commit 3026947 Copy full SHA for 3026947
File tree 3 files changed +10
-0
lines changed
platform/bouffalolab/common/plat
3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ bouffalolab_executable("lighting_app") {
104
104
}
105
105
106
106
sources += [
107
+ " ${ chip_root } /examples/providers/DeviceInfoProviderImpl.cpp" ,
107
108
" ${ example_common_dir } /AppTask.cpp" ,
108
109
" ${ example_common_dir } /ZclCallbacks.cpp" ,
109
110
" ${ examples_plat_common_dir } /plat/LEDWidget.cpp" ,
Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ bouffalolab_executable("lighting_app") {
137
137
deps = [
138
138
" :sdk" ,
139
139
" ${ chip_root } /examples/lighting-app/lighting-common" ,
140
+ " ${ chip_root } /examples/providers:device_info_provider" ,
140
141
" ${ chip_root } /src/lib" ,
141
142
" ${ chip_root } /src/setup_payload" ,
142
143
" ${ chip_root } /third_party/openthread/platforms:libopenthread-platform" ,
Original file line number Diff line number Diff line change 58
58
#include " Rpc.h"
59
59
#endif
60
60
61
+ #include < DeviceInfoProviderImpl.h>
62
+
61
63
#if CONFIG_ENABLE_CHIP_SHELL || PW_RPC_ENABLED
62
64
#include " uart.h"
63
65
#endif
@@ -77,6 +79,8 @@ chip::app::Clusters::NetworkCommissioning::Instance
77
79
}
78
80
#endif
79
81
82
+ static chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider ;
83
+
80
84
void ChipEventHandler (const ChipDeviceEvent * event, intptr_t arg)
81
85
{
82
86
switch (event->Type )
@@ -201,11 +205,15 @@ CHIP_ERROR PlatformManagerImpl::PlatformInit(void)
201
205
chip::app::DnssdServer::Instance ().SetExtendedDiscoveryTimeoutSecs (EXT_DISCOVERY_TIMEOUT_SECS);
202
206
#endif
203
207
208
+ chip::DeviceLayer::SetDeviceInfoProvider (&gExampleDeviceInfoProvider );
209
+
204
210
static CommonCaseDeviceServerInitParams initParams;
205
211
(void ) initParams.InitializeStaticResourcesBeforeServerInit ();
206
212
207
213
ReturnLogErrorOnFailure (chip::Server::GetInstance ().Init (initParams));
208
214
215
+ gExampleDeviceInfoProvider .SetStorageDelegate (&chip::Server::GetInstance ().GetPersistentStorage ());
216
+
209
217
chip::DeviceLayer::PlatformMgr ().UnlockChipStack ();
210
218
211
219
#if CHIP_ENABLE_OPENTHREAD
You can’t perform that action at this time.
0 commit comments