Skip to content

Commit 9f960eb

Browse files
[Silabs] : matter_support update and integrations fixes (#43412)
* matter_support update and integrations fixes * Restyled by clang-format * Restyled by gn * fix spaces * fix esp --------- Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 90f3ffd commit 9f960eb

7 files changed

Lines changed: 25 additions & 19 deletions

File tree

examples/air-quality-sensor-app/silabs/src/AirQualitySensorUI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include "demo-ui-bitmaps.h"
2626
#include "dmd.h"
2727
#include <air-quality-sensor-manager.h>
28-
#if DISPLAY_ENABLED
28+
#if defined(DISPLAY_ENABLED) && DISPLAY_ENABLED
2929
#include "glib.h"
3030
#include "lcd.h"
3131
#endif

examples/closure-app/silabs/src/ClosureUI.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
#include "lcd.h"
2828

2929
// Only needed for wifi NCP devices
30-
#if SL_WIFI && !defined(SLI_SI91X_MCU_INTERFACE)
30+
#if defined(SL_WIFI) && SL_WIFI && !defined(SLI_SI91X_MCU_INTERFACE)
3131
#include <platform/silabs/wifi/ncp/spi_multiplex.h>
32-
#endif // SL_WIFI && !defined(SLI_SI91X_MCU_INTERFACE)
32+
#endif // defined(SL_WIFI) && SL_WIFI && !defined(SLI_SI91X_MCU_INTERFACE)
3333

3434
// Layout positions
3535
#define STATUS_ICON_LINE 0

examples/platform/silabs/BaseApplication.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -914,12 +914,12 @@ void BaseApplication::DoProvisioningReset()
914914
});
915915
}
916916

917-
#if SILABS_OTA_ENABLED
917+
#if defined(SILABS_OTA_ENABLED) && SILABS_OTA_ENABLED
918918
void BaseApplication::InitOTARequestorHandler(System::Layer * systemLayer, void * appState)
919919
{
920920
OTAConfig::Init();
921921
}
922-
#endif
922+
#endif // defined(SILABS_OTA_ENABLED) && SILABS_OTA_ENABLED
923923

924924
void BaseApplication::OnPlatformEvent(const ChipDeviceEvent * event, intptr_t)
925925
{
@@ -963,21 +963,21 @@ void BaseApplication::OnPlatformEvent(const ChipDeviceEvent * event, intptr_t)
963963
#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
964964
#endif // SL_WIFI
965965

966-
#if SILABS_OTA_ENABLED
966+
#if defined(SILABS_OTA_ENABLED) && SILABS_OTA_ENABLED
967967
ChipLogProgress(AppServer, "Scheduling OTA Requestor initialization");
968968
TEMPORARY_RETURN_IGNORED chip::DeviceLayer::SystemLayer().StartTimer(
969969
chip::System::Clock::Seconds32(OTAConfig::kInitOTARequestorDelaySec), InitOTARequestorHandler, nullptr);
970-
#endif // SILABS_OTA_ENABLED
970+
#endif // defined(SILABS_OTA_ENABLED) && SILABS_OTA_ENABLED
971971
}
972972
}
973973
break;
974974

975975
case DeviceEventType::kDnssdInitialized: {
976-
#if SILABS_OTA_ENABLED
976+
#if defined(SILABS_OTA_ENABLED) && SILABS_OTA_ENABLED
977977
ChipLogProgress(AppServer, "DNS-SD initialized, scheduling OTA Requestor initialization");
978978
TEMPORARY_RETURN_IGNORED chip::DeviceLayer::SystemLayer().StartTimer(
979979
chip::System::Clock::Seconds32(OTAConfig::kInitOTARequestorDelaySec), InitOTARequestorHandler, nullptr);
980-
#endif // SILABS_OTA_ENABLED
980+
#endif // defined(SILABS_OTA_ENABLED) && SILABS_OTA_ENABLED
981981
}
982982
break;
983983

examples/refrigerator-app/silabs/src/RefrigeratorUI.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
#include <lib/support/logging/CHIPLogging.h>
2828

2929
// Only needed for wifi NCP devices
30-
#if SL_WIFI && !defined(SLI_SI91X_MCU_INTERFACE)
30+
#if defined(SL_WIFI) && SL_WIFI && !defined(SLI_SI91X_MCU_INTERFACE)
3131
#include <platform/silabs/wifi/ncp/spi_multiplex.h>
32-
#endif // SL_WIFI && !defined(SLI_SI91X_MCU_INTERFACE)
32+
#endif // defined(SL_WIFI) && SL_WIFI && !defined(SLI_SI91X_MCU_INTERFACE)
3333

3434
// LCD line define
3535
constexpr uint8_t kTempLcdInitialX = 30;

src/platform/silabs/platformAbstraction/GsdkSpam.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,15 @@ extern "C" {
8181

8282
#include "sl_component_catalog.h"
8383
#include "sl_mbedtls.h"
84-
#if SILABS_LOG_OUT_UART || (defined(ENABLE_CHIP_SHELL) && ENABLE_CHIP_SHELL) || CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI
84+
#if SILABS_LOG_OUT_UART || (defined(ENABLE_CHIP_SHELL) && ENABLE_CHIP_SHELL) || \
85+
defined(CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI) && CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI
8586
#ifdef SL_CATALOG_CLI_PRESENT
8687
#include "sl_iostream.h"
8788
#include "sl_iostream_stdio.h"
88-
#endif //
89+
#endif // SL_CATALOG_CLI_PRESENT
8990
#include "uart.h"
90-
#endif
91+
#endif // SILABS_LOG_OUT_UART || (defined(ENABLE_CHIP_SHELL) && ENABLE_CHIP_SHELL) || defined(CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI)
92+
// && CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI
9193

9294
#ifdef SL_CATALOG_SYSTEMVIEW_TRACE_PRESENT
9395
#include "SEGGER_SYSVIEW.h"
@@ -143,13 +145,15 @@ CHIP_ERROR SilabsPlatform::Init(void)
143145
SEGGER_SYSVIEW_Conf();
144146
#endif
145147

146-
#if SILABS_LOG_OUT_UART || (defined(ENABLE_CHIP_SHELL) && ENABLE_CHIP_SHELL) || CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI
148+
#if SILABS_LOG_OUT_UART || (defined(ENABLE_CHIP_SHELL) && ENABLE_CHIP_SHELL) || \
149+
defined(CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI) && CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI
147150
uartConsoleInit();
148-
#endif
151+
#endif // SILABS_LOG_OUT_UART || (defined(ENABLE_CHIP_SHELL) && ENABLE_CHIP_SHELL) || defined(CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI)
152+
// && CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI
149153

150154
#if SILABS_LOG_ENABLED
151155
silabsInitLog();
152-
#endif
156+
#endif // SILABS_LOG_ENABLED
153157
return CHIP_NO_ERROR;
154158
}
155159

third_party/silabs/efr32_sdk.gni

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ template("efr32_sdk") {
245245
"${efr32_sdk_root}/glib/platform/middleware/glib/dmd",
246246
"${efr32_sdk_root}/bluetooth_common/inc ",
247247
"${efr32_sdk_root}/bluetooth_le_host/inc",
248+
"${efr32_sdk_root}/bluetooth_le_host/config",
248249
"${efr32_sdk_root}/bluetooth_le_controller/inc",
249250
"${efr32_sdk_root}/platform_core/util/silicon_labs/silabs_core/graphics",
250251
"${efr32_sdk_root}/platform_core/util/silicon_labs/silabs_core/memory_manager",
@@ -334,7 +335,7 @@ template("efr32_sdk") {
334335
]
335336

336337
libs += [
337-
"${efr32_sdk_root}/bluetooth_le_controller/build/gcc/xg24/release/liblinklayer.a ",
338+
"${efr32_sdk_root}/bluetooth_le_controller/build/gcc/xg24/release/liblinklayer.a",
338339
"${efr32_sdk_root}/rail_library/autogen/librail_release/librail_multiprotocol_module_efr32xg24_gcc_release.a",
339340
]
340341

@@ -905,6 +906,7 @@ template("efr32_sdk") {
905906
"${efr32_sdk_root}/bluetooth_le_host/src/sl_bt_stack_init.c",
906907
"${efr32_sdk_root}/bluetooth_le_host/src/sli_bt_advertiser_config.c",
907908
"${efr32_sdk_root}/bluetooth_le_host/src/sli_bt_connection_config.c",
909+
"${efr32_sdk_root}/bluetooth_le_host/src/sli_bt_dynamic_gattdb_config.c",
908910
"${efr32_sdk_root}/bluetooth_le_host/src/sli_bt_hci_event_table.c",
909911
"${efr32_sdk_root}/bluetooth_le_host/src/sli_bt_host_adaptation.c",
910912
]

0 commit comments

Comments
 (0)