Skip to content

Commit

Permalink
Fix compiling errors for ESP32H2 (#19365)
Browse files Browse the repository at this point in the history
  • Loading branch information
wqx6 authored and pull[bot] committed Nov 15, 2023
1 parent 3112047 commit 5634156
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/lighting-app/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

using namespace ::chip;
using namespace ::chip::DeviceManager;
using namespace ::chip::DeviceLayer;

LEDWidget AppLED;

Expand Down
4 changes: 4 additions & 0 deletions examples/lighting-app/esp32/sdkconfig.defaults.esp32h2
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,9 @@ CONFIG_ESP32H2_RTC_CLK_CAL_CYCLES=576
# FreeRTOS should use legacy API
CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y

# Disable STA and AP for ESP32H2
CONFIG_ENABLE_WIFI_STATION=n
CONFIG_ENABLE_WIFI_AP=n

# Enable OTA Requestor
CONFIG_ENABLE_OTA_REQUESTOR=y
4 changes: 3 additions & 1 deletion examples/platform/esp32/common/Esp32AppServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "Esp32AppServer.h"
#include "CHIPDeviceManager.h"
#include <app/clusters/network-commissioning/network-commissioning.h>
#include <app/server/Dnssd.h>
#include <app/server/Server.h>
#include <credentials/DeviceAttestationCredsProvider.h>
#include <credentials/examples/DeviceAttestationCredsExample.h>
Expand All @@ -31,6 +32,7 @@
using namespace chip;
using namespace chip::Credentials;
using namespace chip::DeviceLayer;

namespace {
#if CHIP_DEVICE_CONFIG_ENABLE_WIFI
app::Clusters::NetworkCommissioning::Instance
Expand Down Expand Up @@ -67,7 +69,7 @@ void Esp32AppServer::Init(AppDelegate * sAppDelegate)
if (chip::DeviceLayer::ConnectivityMgr().IsThreadProvisioned() &&
(chip::Server::GetInstance().GetFabricTable().FabricCount() != 0))
{
ESP_LOGI(TAG, "Thread has been provisioned, publish the dns service now");
ESP_LOGI("ESP32AppServer", "Thread has been provisioned, publish the dns service now");
chip::app::DnssdServer::Instance().StartServer();
}
#endif
Expand Down

0 comments on commit 5634156

Please sign in to comment.