update DISPLAY_ENABLED define (#73069)
diff --git a/examples/air-quality-sensor-app/silabs/include/AppTask.h b/examples/air-quality-sensor-app/silabs/include/AppTask.h
index 621db92..79da9c1 100644
--- a/examples/air-quality-sensor-app/silabs/include/AppTask.h
+++ b/examples/air-quality-sensor-app/silabs/include/AppTask.h
@@ -27,7 +27,7 @@
#include <stdbool.h>
#include <stdint.h>
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
#include "AirQualitySensorUI.h"
#endif
diff --git a/examples/air-quality-sensor-app/silabs/src/AirQualitySensorUI.cpp b/examples/air-quality-sensor-app/silabs/src/AirQualitySensorUI.cpp
index 1d9ab69..70c7002 100644
--- a/examples/air-quality-sensor-app/silabs/src/AirQualitySensorUI.cpp
+++ b/examples/air-quality-sensor-app/silabs/src/AirQualitySensorUI.cpp
@@ -24,10 +24,10 @@
#include "demo-ui-bitmaps.h"
#include "dmd.h"
#include <air-quality-sensor-manager.h>
-#if defined(DISPLAY_ENABLED) && DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
#include "glib.h"
#include "lcd.h"
-#endif
+#endif // SL_MATTER_DISPLAY_ENABLED
using namespace chip::app::Clusters;
using namespace chip::app::Clusters::AirQuality;
diff --git a/examples/air-quality-sensor-app/silabs/src/AppTask.cpp b/examples/air-quality-sensor-app/silabs/src/AppTask.cpp
index a5b0124..cf05d6d 100644
--- a/examples/air-quality-sensor-app/silabs/src/AppTask.cpp
+++ b/examples/air-quality-sensor-app/silabs/src/AppTask.cpp
@@ -27,13 +27,13 @@
#include "LEDWidget.h"
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
#include "AirQualitySensorUI.h"
#include "lcd.h"
#if SL_MATTER_QR_CODE_ENABLED
#include "qrcodegen.h"
#endif // SL_MATTER_QR_CODE_ENABLED
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
#include <AirQualityConfig.h>
#include <air-quality-sensor-manager.h>
@@ -237,7 +237,7 @@
{
CHIP_ERROR err = CHIP_NO_ERROR;
chip::DeviceLayer::Silabs::GetPlatform().SetButtonsCb(&CustomerAppTask::ButtonEventHandler);
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
GetLCD().SetCustomUI(AirQualitySensorUI::DrawUI);
#endif
@@ -287,7 +287,7 @@
void AppTask::UpdateAirQualitySensorUI()
{
// Update the LCD with the Stored value. Show QR Code if not provisioned
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
GetLCD().WriteDemoUI(false);
#if SL_MATTER_QR_CODE_ENABLED
if (BaseApplication::GetProvisionStatus())
diff --git a/examples/chef/silabs/src/AppTask.cpp b/examples/chef/silabs/src/AppTask.cpp
index bf1a2d2..c4e5224 100644
--- a/examples/chef/silabs/src/AppTask.cpp
+++ b/examples/chef/silabs/src/AppTask.cpp
@@ -23,12 +23,12 @@
#include "LEDWidget.h"
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
#include "lcd.h"
#if SL_MATTER_QR_CODE_ENABLED
#include "qrcodegen.h"
#endif // SL_MATTER_QR_CODE_ENABLED
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
#include <app/server/Server.h>
#include <app/util/attribute-storage.h>
diff --git a/examples/closure-app/silabs/include/AppTask.h b/examples/closure-app/silabs/include/AppTask.h
index 9012746..d6f5b12 100644
--- a/examples/closure-app/silabs/include/AppTask.h
+++ b/examples/closure-app/silabs/include/AppTask.h
@@ -78,7 +78,7 @@
*/
static void ButtonEventHandler(uint8_t button, uint8_t btnAction);
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
/**
* @brief Updates the closure UI with current closure state
*/
@@ -91,7 +91,7 @@
* @param aEvent pointer to the UI update event being processed
*/
static void UpdateClosureUIHandler(AppEvent * aEvent);
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
/**
* @brief Closure button action event handler
diff --git a/examples/closure-app/silabs/include/ClosureManager.h b/examples/closure-app/silabs/include/ClosureManager.h
index 7ec5b82..a9f85ed 100644
--- a/examples/closure-app/silabs/include/ClosureManager.h
+++ b/examples/closure-app/silabs/include/ClosureManager.h
@@ -31,7 +31,7 @@
#include <AppEvent.h>
#include <lib/core/DataModelTypes.h>
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
#include "ClosureUI.h"
#endif
@@ -160,7 +160,7 @@
*/
const Action_t & GetCurrentAction() const { return mCurrentAction; }
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
/**
* @brief Gets closure data specifically for UI display.
*
@@ -168,7 +168,7 @@
*/
ClosureUIData GetClosureUIData();
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
/**
* @brief Checks if a MoveTo action is currently in progress.
diff --git a/examples/closure-app/silabs/src/AppTask.cpp b/examples/closure-app/silabs/src/AppTask.cpp
index d2230f3..33be719 100644
--- a/examples/closure-app/silabs/src/AppTask.cpp
+++ b/examples/closure-app/silabs/src/AppTask.cpp
@@ -22,14 +22,14 @@
#include "AppEvent.h"
#include "LEDWidget.h"
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
#include "ClosureUI.h"
#include "ClosureUIStrings.h"
#include "lcd.h"
#if SL_MATTER_QR_CODE_ENABLED
#include "qrcodegen.h"
#endif // SL_MATTER_QR_CODE_ENABLED
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
#include <ClosureManager.h>
#include <app-common/zap-generated/cluster-enums.h>
@@ -82,7 +82,7 @@
CHIP_ERROR err = CHIP_NO_ERROR;
chip::DeviceLayer::Silabs::GetPlatform().SetButtonsCb(AppTask::ButtonEventHandler);
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
LogErrorOnFailure(GetLCD().Init((uint8_t *) "Closure-App"));
GetLCD().SetCustomUI(ClosureUI::DrawUI);
#endif
@@ -91,7 +91,7 @@
ClosureManager::GetInstance().Init();
// Update the LCD with the Stored value. Show QR Code if not provisioned
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
UpdateClosureUI();
#if SL_MATTER_QR_CODE_ENABLED
#ifdef SL_WIFI
@@ -103,7 +103,7 @@
GetLCD().ShowQRCode(true);
}
#endif // SL_MATTER_QR_CODE_ENABLED
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
return err;
}
@@ -228,7 +228,7 @@
}
}
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
void AppTask::UpdateClosureUIHandler(AppEvent * aEvent)
{
if (aEvent->Type == AppEvent::kEventType_UpdateUI)
@@ -326,4 +326,4 @@
AppTask::GetAppTask().GetLCD().WriteDemoUI(false); // State doesn't matter for custom UI
}
}
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
diff --git a/examples/closure-app/silabs/src/ClosureManager.cpp b/examples/closure-app/silabs/src/ClosureManager.cpp
index f77a436..23b864d 100644
--- a/examples/closure-app/silabs/src/ClosureManager.cpp
+++ b/examples/closure-app/silabs/src/ClosureManager.cpp
@@ -1257,7 +1257,7 @@
return true;
}
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
ClosureUIData ClosureManager::GetClosureUIData()
{
ClosureUIData uiData;
@@ -1265,7 +1265,7 @@
uiData.overallCurrentState = mClosureEndpoint1.GetClusterInstance().GetOverallCurrentState();
return uiData;
}
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
bool ClosureManager::IsClosureControlMotionInProgress() const
{
diff --git a/examples/closure-app/silabs/src/DataModelCallbacks.cpp b/examples/closure-app/silabs/src/DataModelCallbacks.cpp
index 9f681d4..90ad164 100644
--- a/examples/closure-app/silabs/src/DataModelCallbacks.cpp
+++ b/examples/closure-app/silabs/src/DataModelCallbacks.cpp
@@ -54,7 +54,7 @@
void MatterClosureControlClusterServerAttributeChangedCallback(const app::ConcreteAttributePath & attributePath)
{
ChipLogProgress(Zcl, "Closure Control cluster ID: " ChipLogFormatMEI, ChipLogValueMEI(attributePath.mAttributeId));
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
using namespace chip::app::Clusters::ClosureControl::Attributes;
switch (attributePath.mAttributeId)
@@ -70,7 +70,7 @@
default:
break;
}
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
}
void MatterClosureDimensionClusterServerAttributeChangedCallback(const app::ConcreteAttributePath & attributePath)
diff --git a/examples/dishwasher-app/silabs/src/AppTask.cpp b/examples/dishwasher-app/silabs/src/AppTask.cpp
index 0cb4291..cb90f30 100644
--- a/examples/dishwasher-app/silabs/src/AppTask.cpp
+++ b/examples/dishwasher-app/silabs/src/AppTask.cpp
@@ -101,7 +101,7 @@
GetDishwasherManager()->UpdateOperationState(state);
// Update the LCD with the Stored value. Show QR Code if not provisioned
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
GetLCD().WriteDemoUI((GetDishwasherManager()->GetOperationalState() == OperationalStateEnum::kRunning));
#if SL_MATTER_QR_CODE_ENABLED
#ifdef SL_WIFI
@@ -222,7 +222,7 @@
void AppTask::ActionCompleted()
{
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
sAppTask.GetLCD().WriteDemoUI((GetDishwasherManager()->GetOperationalState() == OperationalStateEnum::kRunning));
#endif
}
diff --git a/examples/evse-app/silabs/src/AppTask.cpp b/examples/evse-app/silabs/src/AppTask.cpp
index d3c0373..87390d5 100644
--- a/examples/evse-app/silabs/src/AppTask.cpp
+++ b/examples/evse-app/silabs/src/AppTask.cpp
@@ -169,8 +169,8 @@
#endif // SL_MATTER_TEST_EVENT_TRIGGER_ENABLED
// Update the LCD with the Stored value. Show QR Code if not provisioned
-#ifdef DISPLAY_ENABLED
-#if SL_MATTER_QR_CODE_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
+#ifdef SL_MATTER_QR_CODE_ENABLED
#ifdef SL_WIFI
if (!chip::DeviceLayer::ConnectivityMgr().IsWiFiStationProvisioned())
#else
diff --git a/examples/light-switch-app/silabs/src/AppTask.cpp b/examples/light-switch-app/silabs/src/AppTask.cpp
index 80b8ee1..71e075a 100644
--- a/examples/light-switch-app/silabs/src/AppTask.cpp
+++ b/examples/light-switch-app/silabs/src/AppTask.cpp
@@ -31,12 +31,12 @@
#include "ShellCommands.h"
#endif // defined(ENABLE_CHIP_SHELL)
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
#include "lcd.h"
#if SL_MATTER_QR_CODE_ENABLED
#include "qrcodegen.h"
#endif // SL_MATTER_QR_CODE_ENABLED
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app-common/zap-generated/cluster-objects.h>
diff --git a/examples/lighting-app/silabs/src/AppTask.cpp b/examples/lighting-app/silabs/src/AppTask.cpp
index 263ec8d..d711fed 100644
--- a/examples/lighting-app/silabs/src/AppTask.cpp
+++ b/examples/lighting-app/silabs/src/AppTask.cpp
@@ -142,7 +142,7 @@
sLightOn = false;
sLightLED.Set(false);
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
BaseApplication::GetLCD().WriteDemoUI(false);
#endif
}
@@ -188,7 +188,7 @@
DisarmOffWithEffectTimer();
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
BaseApplication::GetLCD().WriteDemoUI(sLightOn);
#endif
@@ -250,7 +250,7 @@
sLightLED.Set(sLightOn);
// Update the LCD with the stored value. Show QR Code if not provisioned
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
GetLCD().WriteDemoUI(sLightOn);
#if SL_MATTER_QR_CODE_ENABLED
#ifdef SL_WIFI
@@ -459,7 +459,7 @@
sLightOn = lightOn;
sLightLED.Set(sLightOn);
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
BaseApplication::GetLCD().WriteDemoUI(sLightOn);
#endif
}
diff --git a/examples/lit-icd-app/silabs/src/AppTask.cpp b/examples/lit-icd-app/silabs/src/AppTask.cpp
index 40fc068..1f05094 100644
--- a/examples/lit-icd-app/silabs/src/AppTask.cpp
+++ b/examples/lit-icd-app/silabs/src/AppTask.cpp
@@ -26,12 +26,12 @@
#include "LEDWidget.h"
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
#include "lcd.h"
#if SL_MATTER_QR_CODE_ENABLED
#include "qrcodegen.h"
#endif // SL_MATTER_QR_CODE_ENABLED
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app-common/zap-generated/ids/Clusters.h>
@@ -151,7 +151,7 @@
// DO NOT COPY for product logic. LIT ICD app is a test app with very simple application logic to enable testing.
void AppTask::OnEnterActiveMode()
{
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
sAppTask.GetLCD().WriteDemoUI(true);
#endif
}
@@ -159,7 +159,7 @@
// DO NOT COPY for product logic. LIT ICD app is a test app with very simple application logic to enable testing.
void AppTask::OnEnterIdleMode()
{
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
sAppTask.GetLCD().WriteDemoUI(false);
#endif
}
diff --git a/examples/lock-app/silabs/src/AppTask.cpp b/examples/lock-app/silabs/src/AppTask.cpp
index 99af20f..5dbea15 100644
--- a/examples/lock-app/silabs/src/AppTask.cpp
+++ b/examples/lock-app/silabs/src/AppTask.cpp
@@ -27,12 +27,12 @@
#include "LEDWidget.h"
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
#include "lcd.h"
#if SL_MATTER_QR_CODE_ENABLED
#include "qrcodegen.h"
#endif // SL_MATTER_QR_CODE_ENABLED
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app-common/zap-generated/cluster-objects.h>
@@ -214,7 +214,7 @@
sUnlatchTimer = xTimerCreate("UnlatchTimer", pdMS_TO_TICKS(UNLATCH_TIME_MS), pdFALSE, (void *) 0, UnlatchTimerCallback);
// Update the LCD with the Stored value. Show QR Code if not provisioned
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
GetLCD().WriteDemoUI(state.Value() != DlLockState::kUnlocked);
#if SL_MATTER_QR_CODE_ENABLED
#ifdef SL_WIFI
@@ -335,9 +335,9 @@
SILABS_LOG("%s Action has been initiated", (locked) ? "Lock" : "Unlock");
sLockLED.Set(!locked);
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
sAppTask.GetLCD().WriteDemoUI(locked);
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
}
else if (aAction == LockManager::UNLATCH_ACTION)
{
diff --git a/examples/platform/silabs/BaseAppEvent.h b/examples/platform/silabs/BaseAppEvent.h
index 7a83e7a..cc5e44e 100644
--- a/examples/platform/silabs/BaseAppEvent.h
+++ b/examples/platform/silabs/BaseAppEvent.h
@@ -17,7 +17,7 @@
#pragma once
#include <cstdint>
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
#include "lcd.h"
#endif
@@ -42,7 +42,7 @@
{
uint8_t Action;
} ButtonEvent;
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
struct
{
SilabsLCD::Screen_e screen;
diff --git a/examples/platform/silabs/BaseApplication.cpp b/examples/platform/silabs/BaseApplication.cpp
index 46fca63..5e57523 100644
--- a/examples/platform/silabs/BaseApplication.cpp
+++ b/examples/platform/silabs/BaseApplication.cpp
@@ -32,12 +32,12 @@
#define APP_ACTION_BUTTON 1
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
#include "lcd.h"
#if SL_MATTER_QR_CODE_ENABLED
#include "qrcodegen.h"
#endif // SL_MATTER_QR_CODE_ENABLED
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
#ifdef ENABLE_CHIP_SHELL
#if defined(CHIP_CONFIG_ENABLE_READ_CLIENT) && CHIP_CONFIG_ENABLE_READ_CLIENT
@@ -162,7 +162,7 @@
.stack_size = APP_TASK_STACK_SIZE,
.priority = osPriorityNormal };
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
SilabsLCD slLCD;
#endif
@@ -214,14 +214,14 @@
// After the device is provisioned and the commissioning passed
// resetting the isCommissioningStarted to false
isComissioningStarted = false;
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
#if SL_MATTER_QR_CODE_ENABLED
SilabsLCD::Screen_e screen;
slLCD.GetScreen(screen);
VerifyOrReturn(screen == SilabsLCD::Screen_e::QRCodeScreen);
BaseApplication::PostUpdateDisplayEvent(SilabsLCD::Screen_e::DemoScreen);
#endif // SL_MATTER_QR_CODE_ENABLED
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
}
}
@@ -298,7 +298,7 @@
{
CHIP_ERROR err = CHIP_NO_ERROR;
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
TEMPORARY_RETURN_IGNORED GetLCD().Init((uint8_t *) APP_TASK_NAME);
#endif
@@ -625,9 +625,9 @@
}
// Print the QR Code
OutputQrCode(false);
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
PostUpdateDisplayEvent(SilabsLCD::Screen_e::CycleScreen);
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
}
}
}
@@ -790,7 +790,7 @@
LightEventHandler();
}
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
SilabsLCD & BaseApplication::GetLCD(void)
{
return slLCD;
@@ -957,7 +957,7 @@
}
}
#endif // SL_MATTER_ENABLE_AWS
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
SilabsLCD::Screen_e screen;
AppTask::GetLCD().GetScreen(screen);
// Update the LCD screen with SSID and connected state
@@ -965,7 +965,7 @@
{
PostUpdateDisplayEvent(SilabsLCD::Screen_e::StatusScreen);
}
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
if ((event->ThreadConnectivityChange.Result == kConnectivity_Established) ||
(event->InternetConnectivityChange.IPv6 == kConnectivity_Established))
{
diff --git a/examples/platform/silabs/BaseApplication.h b/examples/platform/silabs/BaseApplication.h
index 5d390bf..3d68544 100644
--- a/examples/platform/silabs/BaseApplication.h
+++ b/examples/platform/silabs/BaseApplication.h
@@ -42,13 +42,13 @@
#include <app/clusters/identify-server/identify-server.h>
#endif
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
#include "demo-ui.h"
#include "lcd.h"
#if SL_MATTER_QR_CODE_ENABLED
#include "qrcodegen.h"
#endif // SL_MATTER_QR_CODE_ENABLED
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
/**********************************************************
* Defines
@@ -131,7 +131,7 @@
*/
static void PostEvent(const AppEvent * event);
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
/**
* @brief Return LCD object
*/
@@ -158,7 +158,7 @@
* @param screen The screen to be displayed
*/
static void PostUpdateDisplayEvent(SilabsLCD::Screen_e screen);
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
/**
* @brief Function called to start the LED light timer
diff --git a/examples/platform/silabs/SiWx917/BUILD.gn b/examples/platform/silabs/SiWx917/BUILD.gn
index ccd7573..1bf6b91 100644
--- a/examples/platform/silabs/SiWx917/BUILD.gn
+++ b/examples/platform/silabs/SiWx917/BUILD.gn
@@ -73,7 +73,9 @@
if (!disable_lcd) {
include_dirs = [ "${silabs_common_plat_dir}/display" ]
- defines += [ "DISPLAY_ENABLED" ]
+ defines += [ "SL_MATTER_DISPLAY_ENABLED=1" ]
+ } else {
+ defines += [ "SL_MATTER_DISPLAY_ENABLED=0" ]
}
if (show_qr_code) {
diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn
index 58b9c10..3e66fd9 100644
--- a/examples/platform/silabs/efr32/BUILD.gn
+++ b/examples/platform/silabs/efr32/BUILD.gn
@@ -96,7 +96,9 @@
if (!disable_lcd) {
include_dirs = [ "${silabs_common_plat_dir}/display" ]
- defines += [ "DISPLAY_ENABLED" ]
+ defines += [ "SL_MATTER_DISPLAY_ENABLED=1" ]
+ } else {
+ defines += [ "SL_MATTER_DISPLAY_ENABLED=0" ]
}
if (show_qr_code) {
diff --git a/examples/pump-app/silabs/src/AppTask.cpp b/examples/pump-app/silabs/src/AppTask.cpp
index 4aba556..728bb0e 100644
--- a/examples/pump-app/silabs/src/AppTask.cpp
+++ b/examples/pump-app/silabs/src/AppTask.cpp
@@ -89,7 +89,7 @@
sPumpLED.Set(!PumpMgr().IsStopped());
// Update the LCD with the Stored value. Show QR Code if not provisioned
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
GetLCD().WriteDemoUI(!PumpMgr().IsStopped());
#if SL_MATTER_QR_CODE_ENABLED
#ifdef SL_WIFI
@@ -199,7 +199,7 @@
sPumpLED.Set(pumpOn);
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
sAppTask.GetLCD().WriteDemoUI(pumpOn);
#endif
diff --git a/examples/refrigerator-app/silabs/include/AppTask.h b/examples/refrigerator-app/silabs/include/AppTask.h
index 5b1efd6..f0d3f9e 100644
--- a/examples/refrigerator-app/silabs/include/AppTask.h
+++ b/examples/refrigerator-app/silabs/include/AppTask.h
@@ -25,7 +25,7 @@
#include <stdbool.h>
#include <stdint.h>
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
#include "RefrigeratorUI.h"
#endif
diff --git a/examples/refrigerator-app/silabs/src/AppTask.cpp b/examples/refrigerator-app/silabs/src/AppTask.cpp
index fc53a0d..8d205b5 100644
--- a/examples/refrigerator-app/silabs/src/AppTask.cpp
+++ b/examples/refrigerator-app/silabs/src/AppTask.cpp
@@ -26,13 +26,13 @@
#include "AppEvent.h"
#include "LEDWidget.h"
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
#include "RefrigeratorUI.h"
#include "lcd.h"
#if SL_MATTER_QR_CODE_ENABLED
#include "qrcodegen.h"
#endif // SL_MATTER_QR_CODE_ENABLED
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
#if defined(ENABLE_CHIP_SHELL)
#include "EventHandlerLibShell.h"
diff --git a/examples/smoke-co-alarm-app/silabs/src/AppTask.cpp b/examples/smoke-co-alarm-app/silabs/src/AppTask.cpp
index 21830ae..0ca466e 100644
--- a/examples/smoke-co-alarm-app/silabs/src/AppTask.cpp
+++ b/examples/smoke-co-alarm-app/silabs/src/AppTask.cpp
@@ -77,7 +77,7 @@
sAlarmLED.Set(false);
// Update the LCD with the Stored value. Show QR Code if not provisioned
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
GetLCD().WriteDemoUI(false);
#if SL_MATTER_QR_CODE_ENABLED
#ifdef SL_WIFI
diff --git a/examples/thermostat/silabs/src/AppTask.cpp b/examples/thermostat/silabs/src/AppTask.cpp
index 5a5e094..e672ed4 100644
--- a/examples/thermostat/silabs/src/AppTask.cpp
+++ b/examples/thermostat/silabs/src/AppTask.cpp
@@ -23,10 +23,10 @@
#include "CustomerAppTask.h"
#include "ThermostatConfig.h"
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
#include "ThermostatUI.h"
#include "lcd.h"
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app-common/zap-generated/callback.h>
@@ -99,7 +99,7 @@
CHIP_ERROR err = CHIP_NO_ERROR;
chip::DeviceLayer::Silabs::GetPlatform().SetButtonsCb(&CustomerAppTask::ButtonEventHandler);
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
GetLCD().SetCustomUI(ThermostatUI::DrawUI);
#endif
@@ -199,7 +199,7 @@
const int8_t heatingC = ConvertToPrintableTemp(heatingSetpointRaw);
const uint8_t modeForUi = chip::to_underlying(systemMode);
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
ThermostatUI::SetMode(modeForUi);
ThermostatUI::SetHeatingSetPoint(heatingC);
ThermostatUI::SetCoolingSetPoint(coolingC);
@@ -211,7 +211,7 @@
}
#else
ChipLogProgress(AppServer, "Thermostat Status - M:%d T:%d'C H:%d'C C:%d'C", modeForUi, currentTempC, heatingC, coolingC);
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
}
void AppTask::ButtonEventHandler(uint8_t button, uint8_t btnAction)
diff --git a/examples/water-heater-app/silabs/src/AppTask.cpp b/examples/water-heater-app/silabs/src/AppTask.cpp
index ee3ffca..dea5b73 100644
--- a/examples/water-heater-app/silabs/src/AppTask.cpp
+++ b/examples/water-heater-app/silabs/src/AppTask.cpp
@@ -159,7 +159,7 @@
#endif // SL_MATTER_TEST_EVENT_TRIGGER_ENABLED
// Update the LCD with the Stored value. Show QR Code if not provisioned
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
#if SL_MATTER_QR_CODE_ENABLED
#ifdef SL_WIFI
if (!chip::DeviceLayer::ConnectivityMgr().IsWiFiStationProvisioned())
diff --git a/examples/window-app/silabs/include/WindowManager.h b/examples/window-app/silabs/include/WindowManager.h
index ce70834..785ab85 100644
--- a/examples/window-app/silabs/include/WindowManager.h
+++ b/examples/window-app/silabs/include/WindowManager.h
@@ -25,7 +25,7 @@
#include "LEDWidget.h"
#include <cmsis_os2.h>
#include <string>
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
#include <LcdPainter.h>
#endif
@@ -128,10 +128,10 @@
static void ButtonEventHandler(uint8_t button, uint8_t btnAction);
void UpdateLED();
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
static void DrawUI(GLIB_Context_t * glibContext);
void UpdateLCD();
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
static void GeneralEventHandler(AppEvent * aEvent);
@@ -159,7 +159,7 @@
uint8_t mCurrentCover = 0;
LEDWidget mActionLED;
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
Timer * mIconTimer = nullptr;
LcdIcon mIcon = LcdIcon::None;
#endif
diff --git a/examples/window-app/silabs/src/AppTask.cpp b/examples/window-app/silabs/src/AppTask.cpp
index e9fd334..5e1bdc0 100644
--- a/examples/window-app/silabs/src/AppTask.cpp
+++ b/examples/window-app/silabs/src/AppTask.cpp
@@ -85,9 +85,9 @@
SILABS_LOG("App Task started");
WindowManager::sWindow.UpdateLED();
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
WindowManager::sWindow.UpdateLCD();
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
while (true)
{
diff --git a/examples/window-app/silabs/src/WindowManager.cpp b/examples/window-app/silabs/src/WindowManager.cpp
index 8debf7f..17fee2f 100644
--- a/examples/window-app/silabs/src/WindowManager.cpp
+++ b/examples/window-app/silabs/src/WindowManager.cpp
@@ -41,7 +41,7 @@
#include <platform/silabs/wifi/WifiInterface.h>
#endif
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
#include <LcdPainter.h>
#endif
@@ -190,9 +190,9 @@
case Attributes::CurrentPositionLiftPercent100ths::Id:
case Attributes::CurrentPositionTiltPercent100ths::Id:
UpdateLED();
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
UpdateLCD();
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
break;
default:
break;
@@ -573,17 +573,17 @@
void WindowManager::OnIconTimeout(WindowManager::Timer & timer)
{
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
sWindow.mIcon = LcdIcon::None;
sWindow.UpdateLCD();
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
}
CHIP_ERROR WindowManager::Init()
{
chip::DeviceLayer::PlatformMgr().LockChipStack();
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
mIconTimer = new Timer(LCD_ICON_TIMEOUT, OnIconTimeout, this);
#endif
// Timers
@@ -662,7 +662,7 @@
}
}
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
void WindowManager::DrawUI(GLIB_Context_t * glibContext)
{
sWindow.UpdateLCD();
@@ -690,7 +690,7 @@
}
}
}
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
// Silabs button callback from button event ISR
void WindowManager::ButtonEventHandler(uint8_t button, uint8_t btnAction)
@@ -806,7 +806,7 @@
window->DispatchEventAttributeChange(aEvent->mEndpoint, aEvent->mAttributeId);
break;
-#ifdef DISPLAY_ENABLED
+#if SL_MATTER_DISPLAY_ENABLED
case AppEvent::kEventType_CoverTypeChange:
window->UpdateLCD();
break;
@@ -827,7 +827,7 @@
window->mIcon = window->mTiltMode ? LcdIcon::Tilt : LcdIcon::Lift;
window->UpdateLCD();
break;
-#endif // DISPLAY_ENABLED
+#endif // SL_MATTER_DISPLAY_ENABLED
default:
break;
diff --git a/src/platform/silabs/wifi/BUILD.gn b/src/platform/silabs/wifi/BUILD.gn
index 0811079..2b76354 100644
--- a/src/platform/silabs/wifi/BUILD.gn
+++ b/src/platform/silabs/wifi/BUILD.gn
@@ -77,7 +77,9 @@
# TODO: This defines needs to be here for the spi_multiplex.h configuration header.
# We need to find a better way to handle this.
if (!disable_lcd) {
- defines += [ "DISPLAY_ENABLED" ]
+ defines += [ "SL_MATTER_DISPLAY_ENABLED=1" ]
+ } else {
+ defines += [ "SL_MATTER_DISPLAY_ENABLED=0" ]
}
if (use_SiWx917 || wifi_soc) {
include_dirs += [
diff --git a/src/platform/silabs/wifi/ncp/spi_multiplex.h b/src/platform/silabs/wifi/ncp/spi_multiplex.h
index c04e9ce..f736677 100644
--- a/src/platform/silabs/wifi/ncp/spi_multiplex.h
+++ b/src/platform/silabs/wifi/ncp/spi_multiplex.h
@@ -25,7 +25,7 @@
#pragma once
#ifndef SL_LCDCTRL_MUX
-#define SL_LCDCTRL_MUX (EFR32MG24 && SL_WIFI && DISPLAY_ENABLED)
+#define SL_LCDCTRL_MUX (EFR32MG24 && SL_WIFI && SL_MATTER_DISPLAY_ENABLED)
#endif // SL_LCDCTRL_MUX
#ifndef SL_UARTCTRL_MUX