Skip to content

Commit

Permalink
Fix uart define usage
Browse files Browse the repository at this point in the history
  • Loading branch information
mkardous-silabs committed Aug 9, 2024
1 parent 01ccac7 commit 136c58e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion examples/platform/silabs/uart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "AppConfig.h"
#include "matter_shell.h"
#include <cmsis_os2.h>
#include <lib/shell/Engine.h>
// #include <lib/shell/Engine.h>
#include <platform/CHIPDeviceLayer.h>
#include <sl_cmsis_os2_common.h>

Expand Down
14 changes: 12 additions & 2 deletions src/platform/silabs/CHIPPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#pragma once

#include <app/icd/server/ICDServerConfig.h>
#include <stdint.h>

#if (SL_MATTER_GN_BUILD == 0)
Expand Down Expand Up @@ -99,7 +100,7 @@
#define CHIP_CONFIG_MAX_FABRICS 5 // 4 fabrics + 1 for rotation slack
#endif

#ifdef SL_ICD_ENABLED
#if defined(CHIP_CONFIG_ENABLE_ICD_SERVER) && CHIP_CONFIG_ENABLE_ICD_SERVER

#ifndef CHIP_CONFIG_ICD_IDLE_MODE_DURATION_SEC
#define CHIP_CONFIG_ICD_IDLE_MODE_DURATION_SEC SL_IDLE_MODE_DURATION_S
Expand All @@ -117,7 +118,16 @@
#define CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC SL_ICD_SUPPORTED_CLIENTS_PER_FABRIC
#endif // CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC

#endif // SL_ICD_ENABLED
#endif // defined(CHIP_CONFIG_ENABLE_ICD_SERVER) && CHIP_CONFIG_ENABLE_ICD_SERVER

/**
* @brief CHIP_SHELL_MAX_LINE_SIZE
*
* @brief Platform maximum line for the Matter Shell
*/
#ifndef CHIP_SHELL_MAX_LINE_SIZE
#define CHIP_SHELL_MAX_LINE_SIZE 256
#endif // CHIP_SHELL_MAX_LINE_SIZE

// ==================== FreeRTOS Configuration Overrides ====================
#ifndef CHIP_CONFIG_FREERTOS_USE_STATIC_TASK
Expand Down
14 changes: 5 additions & 9 deletions third_party/silabs/SiWx917_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ template("siwx917_sdk") {
"UDMA_ROMDRIVER_PRESENT=1",
"PLL_ROMDRIVER_PRESENT=1",
"SL_MATTER_GN_BUILD=1",
"SLI_SI91X_MCU_INTR_BASED_RX_ON_UART=1",
]

if (silabs_log_enabled && chip_logging) {
Expand All @@ -259,7 +258,10 @@ template("siwx917_sdk") {
}

if (chip_build_libshell) {
defines += [ "ENABLE_CHIP_SHELL" ]
defines += [
"ENABLE_CHIP_SHELL",
"SLI_SI91X_MCU_INTR_BASED_RX_ON_UART=1",
]
}

defines += [ "LWIP_NETIF_API=1" ]
Expand Down Expand Up @@ -301,7 +303,6 @@ template("siwx917_sdk") {

if (!disable_lcd) {
defines += [
"CONFIG_ENABLE_UART",
"SYSCALLS_WRITE",
"SPI_MULTI_SLAVE",
"SL_ULP_TIMER",
Expand All @@ -310,12 +311,7 @@ template("siwx917_sdk") {

# Enabling led interface
if (use_wstk_leds) {
defines += [
"ENABLE_WSTK_LEDS",

# TODO: remove this when it is added to the board config from wifi sdk
"SL_CATALOG_SIMPLE_LED_LED1_PRESENT",
]
defines += [ "ENABLE_WSTK_LEDS" ]
}

if (chip_enable_icd_server) {
Expand Down

0 comments on commit 136c58e

Please sign in to comment.