Skip to content

Commit

Permalink
Added changes for 917 commissioning
Browse files Browse the repository at this point in the history
  • Loading branch information
shgutte committed Jan 9, 2024
1 parent e047cfe commit a776980
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
#include "wfx_host_events.h"
#include "wfx_rsi.h"

#if SL_MX25CTRL_MUX
sl_status_t sl_wfx_host_spiflash_cs_assert(void);
sl_status_t sl_wfx_host_spiflash_cs_deassert(void);
#endif

#if SL_BTLCTRL_MUX
#include "btl_interface.h"
#endif // SL_BTLCTRL_MUX
Expand All @@ -65,8 +70,6 @@ SemaphoreHandle_t spi_sem_sync_hdl;

#if SL_LCDCTRL_MUX



/********************************************************
* @fn sl_wfx_host_pre_lcd_spi_transfer(void)
* @brief
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@ extern SPIDRV_Handle_t sl_spidrv_exp_handle;

#if SL_SPICTRL_MUX
sl_status_t spi_board_init(void);
static bool spi_enabled = false;
#endif // SL_SPICTRL_MUX

3 changes: 0 additions & 3 deletions examples/platform/silabs/efr32/rs911x/rsi_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@
#include "wfx_host_events.h"
#include "wfx_rsi.h"

// SLC-FIX
#include "sl_matter_wifi_config.h"

// TODO convert this file to cpp and use CodeUtils.h
#ifndef MIN
#define MIN(a, b) ((a) < (b) ? (a) : (b))
Expand Down
3 changes: 0 additions & 3 deletions examples/platform/silabs/efr32/rs911x/rsi_wlan_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@

#include "rsi_wlan_defines.h"

// SLC-FIX
#include "sl_matter_wifi_config.h"

//! Enable feature
#define RSI_ENABLE 1
//! Disable feature
Expand Down
2 changes: 0 additions & 2 deletions src/platform/silabs/efr32/wifi/wfx_host_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ typedef struct __attribute__((__packed__)) sl_wfx_mib_req_s
#include "lwip/netifapi.h"
#include "lwip/tcpip.h"

// SLC-FIX
#include "sl_matter_wifi_config.h"
/* Wi-Fi bitmask events - for the task */
#define SL_WFX_CONNECT (1 << 1)
#define SL_WFX_DISCONNECT (1 << 2)
Expand Down
2 changes: 0 additions & 2 deletions src/platform/silabs/efr32/wifi/wfx_notify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
#include <app/server/Dnssd.h>
#include <app/server/Server.h>

// SLC-FIX
#include "sl_matter_wifi_config.h"

using namespace ::chip;
using namespace ::chip::DeviceLayer;
Expand Down
8 changes: 6 additions & 2 deletions src/platform/silabs/rs911x/rsi_ble_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#include <rsi_data_types.h>
#endif

// SLC-FIX
#include "sl_matter_wifi_config.h"
/******************************************************
* * Macros
* ******************************************************/
Expand All @@ -38,6 +36,12 @@
#define RSI_FAILURE -1
#endif

#define WIFI_ENABLE_SECURITY_WPA3_TRANSITION 0

#ifndef CHIP_DEVICE_CONFIG_ENABLE_IPV4
#define CHIP_DEVICE_CONFIG_ENABLE_IPV4 0
#endif

#define RSI_BLE_CONN_EVENT (0x01)
#define RSI_BLE_DISCONN_EVENT (0x02)
#define RSI_BLE_GATT_WRITE_EVENT (0x03)
Expand Down
36 changes: 23 additions & 13 deletions third_party/silabs/efr32_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ template("efr32_sdk") {
# Treat these includes as system includes, so warnings in them are not fatal.
_include_dirs = [
"${efr32_sdk_root}",
"${examples_plat_dir}",
"${efr32_sdk_root}/util/plugin/security_manager/",
"${efr32_sdk_root}/hardware/kit/common/bsp",
"${efr32_sdk_root}/hardware/board/inc",
Expand Down Expand Up @@ -235,7 +236,9 @@ template("efr32_sdk") {
"${wifi_sdk_root}/components/service/network_manager/inc",
]
}

if (use_rs9116 || use_SiWx917) {
_include_dirs += [ "${chip_root}/src/platform/silabs/rs911x" ]
}
if (silabs_family != "mgm24") {
_include_dirs += [
"${efr32_sdk_root}/platform/radio/rail_lib/hal",
Expand All @@ -249,7 +252,6 @@ template("efr32_sdk") {
} else {
_include_dirs += [ "${wifi_sdk_root}/components/device/silabs/si91x/wireless/ble/inc" ]
}
_include_dirs += [ "${chip_root}/src/platform/silabs/rs911x" ]
}

# Note that we're setting the mbedTLS and PSA configuration files through a
Expand Down Expand Up @@ -311,6 +313,8 @@ template("efr32_sdk") {
"RSI_BLE_ENABLE=1",
"BLE_ENABLE=1",
"RSI_LITTLE_ENDIAN=1",
"SLI_SI91X_ENABLE_BLE=1",
"SL_SI91X_ENABLE_LITTLE_ENDIAN=1",
]
}

Expand Down Expand Up @@ -342,6 +346,10 @@ template("efr32_sdk") {
"EXP_BOARD=1",
"CHIP_917",
"SLI_SI917=1",
"SL_WFX_CONFIG_SCAN=1",
"SL_POWER_MANAGER_LOWEST_EM_ALLOWED=1",
"SL_POWER_MANAGER_CONFIG_VOLTAGE_SCALING_FAST_WAKEUP=1",
"SL_PSA_KEY_USER_SLOT_COUNT=21",
"CHIP_9117",
"SL_WIFI_COMPONENT_INCLUDED",
]
Expand All @@ -350,6 +358,8 @@ template("efr32_sdk") {
"SL_HEAP_SIZE=24576",
"WF200_WIFI=1",
"SL_WIFI=1",
"CHIP_DEVICE_CONFIG_ENABLE_IPV4=1",
"WIFI_ENABLE_SECURITY_WPA3_TRANSITION=1",
"SL_WFX_USE_SPI",
"SL_WFX_DEBUG_MASK=0x0003",
]
Expand Down Expand Up @@ -642,7 +652,7 @@ template("efr32_sdk") {
"${efr32_sdk_root}/platform/emlib/src/em_timer.c",
"${efr32_sdk_root}/platform/peripheral/src/peripheral_sysrtc.c",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/pa_conversions_efr32.c",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_power_manager_init/sl_rail_util_power_manager_init.c",
# "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_power_manager_init/sl_rail_util_power_manager_init.c",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_pti/sl_rail_util_pti.c",
"${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/crypto_ecp.c",
"${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/error.c",
Expand All @@ -666,10 +676,10 @@ template("efr32_sdk") {
"${efr32_sdk_root}/platform/service/iostream/src/sl_iostream.c",
"${efr32_sdk_root}/platform/service/iostream/src/sl_iostream_rtt.c",
"${efr32_sdk_root}/platform/service/mpu/src/sl_mpu.c",
"${efr32_sdk_root}/platform/service/power_manager/src/sl_power_manager.c",
"${efr32_sdk_root}/platform/service/power_manager/src/sl_power_manager_debug.c",
"${efr32_sdk_root}/platform/service/power_manager/src/sl_power_manager_hal_s0_s1.c",
"${efr32_sdk_root}/platform/service/power_manager/src/sl_power_manager_hal_s2.c",
# "${efr32_sdk_root}/platform/service/power_manager/src/sl_power_manager.c",
# "${efr32_sdk_root}/platform/service/power_manager/src/sl_power_manager_debug.c",
# "${efr32_sdk_root}/platform/service/power_manager/src/sl_power_manager_hal_s0_s1.c",
# "${efr32_sdk_root}/platform/service/power_manager/src/sl_power_manager_hal_s2.c",
"${efr32_sdk_root}/platform/service/sleeptimer/src/sl_sleeptimer.c",
"${efr32_sdk_root}/platform/service/sleeptimer/src/sl_sleeptimer_hal_rtcc.c",
"${efr32_sdk_root}/platform/service/system/src/sl_system_init.c",
Expand All @@ -682,7 +692,7 @@ template("efr32_sdk") {
"${efr32_sdk_root}/util/third_party/freertos/kernel/croutine.c",
"${efr32_sdk_root}/util/third_party/freertos/kernel/event_groups.c",
"${efr32_sdk_root}/util/third_party/freertos/kernel/list.c",
"${efr32_sdk_root}/util/third_party/freertos/kernel/portable/SiliconLabs/tick_power_manager.c",
# "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/SiliconLabs/tick_power_manager.c",
"${efr32_sdk_root}/util/third_party/freertos/kernel/queue.c",
"${efr32_sdk_root}/util/third_party/freertos/kernel/stream_buffer.c",
"${efr32_sdk_root}/util/third_party/freertos/kernel/tasks.c",
Expand Down Expand Up @@ -719,7 +729,7 @@ template("efr32_sdk") {
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_aead.c",
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_cipher.c",
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_client.c",
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_driver_wrappers.c",
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_driver_wrappers_no_static.c",
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_ecp.c",
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_hash.c",
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_mac.c",
Expand Down Expand Up @@ -747,7 +757,7 @@ template("efr32_sdk") {
"${efr32_sdk_root}/util/third_party/mbedtls/library/x509write_crt.c",
"${efr32_sdk_root}/util/third_party/mbedtls/library/x509write_csr.c",
"${silabs_gen_folder}/autogen/gatt_db.c",
"${silabs_gen_folder}/autogen/sl_bluetooth.c",
# "${silabs_gen_folder}/autogen/sl_bluetooth.c",
"${silabs_gen_folder}/autogen/sl_board_default_init.c",
"${silabs_gen_folder}/autogen/sl_device_init_clocks.c",
"${silabs_gen_folder}/autogen/sl_event_handler.c",
Expand Down Expand Up @@ -827,7 +837,7 @@ template("efr32_sdk") {
if (defined(invoker.chip_enable_wifi) && invoker.chip_enable_wifi) {
sources += [
"${efr32_sdk_root}/platform/emdrv/spidrv/src/spidrv.c",
"${silabs_gen_folder}/autogen/sl_spidrv_init.c",
# "${silabs_gen_folder}/autogen/sl_spidrv_init.c",
]
}

Expand Down Expand Up @@ -856,7 +866,7 @@ template("efr32_sdk") {
"${efr32_sdk_root}/platform/emlib/src/em_eusart.c",
"${efr32_sdk_root}/platform/emlib/src/em_leuart.c",
"${efr32_sdk_root}/platform/emlib/src/em_usart.c",
"${silabs_gen_folder}/autogen/sl_uartdrv_init.c",
# "${silabs_gen_folder}/autogen/sl_uartdrv_init.c",
]

if (use_external_flash) {
Expand Down Expand Up @@ -970,7 +980,7 @@ template("efr32_sdk") {
"${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dpll_s2.c",
"${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_emu_s2.c",
"${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfxo_s2.c",
"${efr32_sdk_root}/platform/service/hfxo_manager/src/sl_hfxo_manager_hal_s2.c",
# "${efr32_sdk_root}/platform/service/hfxo_manager/src/sl_hfxo_manager_hal_s2.c",
"${efr32_sdk_root}/platform/service/sleeptimer/src/sl_sleeptimer_hal_sysrtc.c",
"${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure/port.c",
"${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c",
Expand Down

0 comments on commit a776980

Please sign in to comment.