File tree 7 files changed +15
-19
lines changed
all-clusters-app/esp32/main
all-clusters-minimal-app/esp32/main
energy-management-app/esp32/main
light-switch-app/esp32/main
7 files changed +15
-19
lines changed Original file line number Diff line number Diff line change @@ -210,9 +210,10 @@ extern "C" void app_main()
210
210
{
211
211
ESP_LOGE (TAG, " GetAppTask().StartAppTask() failed : %" CHIP_ERROR_FORMAT, error.Format ());
212
212
}
213
- ESPOpenThreadInit ();
214
213
215
214
chip::DeviceLayer::PlatformMgr ().ScheduleWork (InitServer, reinterpret_cast <intptr_t >(nullptr ));
215
+
216
+ ESPOpenThreadInit ();
216
217
}
217
218
218
219
bool lowPowerClusterSleep ()
Original file line number Diff line number Diff line change @@ -186,8 +186,9 @@ extern "C" void app_main()
186
186
ESP_LOGE (TAG, " GetAppTask().StartAppTask() failed : %" CHIP_ERROR_FORMAT, error.Format ());
187
187
}
188
188
189
- ESPOpenThreadInit ();
190
189
chip::DeviceLayer::PlatformMgr ().ScheduleWork (InitServer, reinterpret_cast <intptr_t >(nullptr ));
190
+
191
+ ESPOpenThreadInit ();
191
192
}
192
193
193
194
bool lowPowerClusterSleep ()
Original file line number Diff line number Diff line change @@ -294,7 +294,8 @@ extern "C" void app_main()
294
294
#endif
295
295
296
296
SetDeviceAttestationCredentialsProvider (get_dac_provider ());
297
- ESPOpenThreadInit ();
298
297
299
298
chip::DeviceLayer::PlatformMgr ().ScheduleWork (InitServer, reinterpret_cast <intptr_t >(nullptr ));
299
+
300
+ ESPOpenThreadInit ();
300
301
}
Original file line number Diff line number Diff line change 19
19
#include " DeviceCallbacks.h"
20
20
#include < common/CHIPDeviceManager.h>
21
21
#include < common/Esp32AppServer.h>
22
+ #include < common/Esp32ThreadInit.h>
22
23
23
24
#include " AppTask.h"
24
25
#include " BindingHandler.h"
@@ -135,21 +136,10 @@ extern "C" void app_main()
135
136
SetDeviceAttestationCredentialsProvider (Examples::GetExampleDACProvider ());
136
137
#endif // CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER
137
138
138
- #if CHIP_DEVICE_CONFIG_ENABLE_THREAD
139
- if (DeviceLayer::ThreadStackMgr ().InitThreadStack () != CHIP_NO_ERROR)
140
- {
141
- ESP_LOGE (TAG, " Failed to initialize Thread stack" );
142
- return ;
143
- }
144
- if (DeviceLayer::ThreadStackMgr ().StartThreadTask () != CHIP_NO_ERROR)
145
- {
146
- ESP_LOGE (TAG, " Failed to launch Thread task" );
147
- return ;
148
- }
149
- #endif
150
-
151
139
chip::DeviceLayer::PlatformMgr ().ScheduleWork (InitServer, reinterpret_cast <intptr_t >(nullptr ));
152
140
141
+ ESPOpenThreadInit ();
142
+
153
143
error = GetAppTask ().StartAppTask ();
154
144
if (error != CHIP_NO_ERROR)
155
145
{
Original file line number Diff line number Diff line change @@ -210,10 +210,11 @@ extern "C" void app_main()
210
210
#endif
211
211
212
212
SetDeviceAttestationCredentialsProvider (get_dac_provider ());
213
- ESPOpenThreadInit ();
214
213
215
214
chip::DeviceLayer::PlatformMgr ().ScheduleWork (InitServer, reinterpret_cast <intptr_t >(nullptr ));
216
215
216
+ ESPOpenThreadInit ();
217
+
217
218
error = GetAppTask ().StartAppTask ();
218
219
if (error != CHIP_NO_ERROR)
219
220
{
Original file line number Diff line number Diff line change @@ -130,10 +130,11 @@ extern "C" void app_main()
130
130
#else
131
131
SetDeviceAttestationCredentialsProvider (Examples::GetExampleDACProvider ());
132
132
#endif // CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER
133
- ESPOpenThreadInit ();
134
133
static UatButton sButton ;
135
134
sButton .Init (UAT_GPIO, ESP_EXT1_WAKEUP_ANY_LOW);
136
135
sButton .SetUatButtonPressCallback (UatButtonHandler);
137
136
138
137
chip::DeviceLayer::PlatformMgr ().ScheduleWork (InitServer, reinterpret_cast <intptr_t >(nullptr ));
138
+
139
+ ESPOpenThreadInit ();
139
140
}
Original file line number Diff line number Diff line change @@ -149,9 +149,10 @@ extern "C" void app_main()
149
149
SetDeviceAttestationCredentialsProvider (Examples::GetExampleDACProvider ());
150
150
#endif // CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER
151
151
esp_openthread_set_backbone_netif (esp_netif_get_handle_from_ifkey (" WIFI_STA_DEF" ));
152
- ESPOpenThreadInit ();
153
152
154
153
chip::DeviceLayer::PlatformMgr ().ScheduleWork (InitServer, reinterpret_cast <intptr_t >(nullptr ));
154
+
155
+ ESPOpenThreadInit ();
155
156
}
156
157
157
158
extern " C" void otSysProcessDrivers (otInstance * aInstance)
You can’t perform that action at this time.
0 commit comments