Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Silabs] Move Wi-Fi interface files to the final structure #36644

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/platform/silabs/display/demo-ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "sl_memlcd.h"
#include <app/icd/server/ICDServerConfig.h>
#if SL_WIFI && !SLI_SI91X_MCU_INTERFACE
#include <platform/silabs/wifi/wf200/platform/spi_multiplex.h>
#include <platform/silabs/wifi/ncp/spi_multiplex.h>
#endif // SL_WIFI && !SLI_SI91X_MCU_INTERFACE
#include <string.h>

Expand Down
2 changes: 1 addition & 1 deletion src/platform/silabs/efr32/OTAImageProcessorImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <platform/silabs/SilabsConfig.h>

#if SL_WIFI
#include <platform/silabs/wifi/wf200/platform/spi_multiplex.h>
#include <platform/silabs/wifi/ncp/spi_multiplex.h>
#endif // SL_WIFI

extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion src/platform/silabs/wifi/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if (chip_enable_wifi && !wifi_soc) {
if (use_rs9116) {
import("${silabs_platform_dir}/wifi/rs911x/rs911x.gni")
} else if (use_SiWx917) {
import("${silabs_platform_dir}/wifi/rs911x/rs9117.gni")
import("${silabs_platform_dir}/wifi/SiWx/ncp/rs9117.gni")
}
if (use_wf200) {
import("${silabs_platform_dir}/wifi/wf200/wf200.gni")
Expand Down
2 changes: 1 addition & 1 deletion src/platform/silabs/wifi/SiWx/WifiInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ extern "C" {

#if (EXP_BOARD)
#include "rsi_bt_common_apis.h"
#include <platform/silabs/wifi/rs911x/platform/sl_board_configuration.h>
#include <platform/silabs/wifi/SiWx/ncp/sl_board_configuration.h>
#endif

#if CHIP_CONFIG_ENABLE_ICD_SERVER && SLI_SI91X_MCU_INTERFACE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
#include "em_gpio.h"
#include "em_usart.h"
#include "gpiointerrupt.h"
#include "sl_board_configuration_SiWx917.h"
#include "sl_constants.h"
#include "sl_rsi_utility.h"
#include "sl_si91x_host_interface.h"
#include "sl_si91x_ncp_utility.h"
#include "sl_si91x_status.h"
#include "sl_status.h"
#include "sl_wifi_constants.h"
#include <platform/silabs/wifi/wf200/platform/spi_multiplex.h>
#include <platform/silabs/wifi/SiWx/ncp/sl_board_configuration.h>
#include <platform/silabs/wifi/ncp/spi_multiplex.h>
#include <stdbool.h>
#include <string.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,14 @@ import("${silabs_sdk_build_root}/efr32_sdk.gni")

rs911x_src_plat = [
"${chip_root}/src/platform/silabs/wifi/SiWx/WifiInterface.cpp",
"${chip_root}/src/platform/silabs/wifi/rs911x/platform/rsi_hal_mcu_interrupt.c",
"${chip_root}/src/platform/silabs/wifi/rs911x/platform/sl_si91x_ncp_utility.c",
"${chip_root}/src/platform/silabs/wifi/rs911x/platform/sl_board_configuration.h",
"${chip_root}/src/platform/silabs/wifi/SiWx/ncp/sl_si91x_ncp_utility.c",
"${chip_root}/src/platform/silabs/wifi/SiWx/ncp/sl_board_configuration.h",
"${chip_root}/src/platform/silabs/wifi/wiseconnect-abstraction/WiseconnectInterfaceAbstraction.cpp",
"${chip_root}/src/platform/silabs/wifi/wiseconnect-abstraction/WiseconnectInterfaceAbstraction.h",

# TODO: We shouldn't need a file form the WF200 for the SiWx917 NCP builds
"${chip_root}/src/platform/silabs/wifi/wf200/platform/spi_multiplex.h",
"${chip_root}/src/platform/silabs/wifi/ncp/spi_multiplex.h",

# TODO : We should be using the file from the Wiseconnect SDK and not our copy of it.
"${chip_root}/src/platform/silabs/wifi/rs911x/platform/efx32_ncp_host.c",
"${chip_root}/src/platform/silabs/wifi/SiWx/ncp/efx32_ncp_host.c",
]

rs9117_inc_plat = [ "${wifi_sdk_root}/components/si91x/ble/inc" ]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
*
* Copyright (c) 2024 Project CHIP Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

#ifdef SL_UART
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
* limitations under the License.
*/

/**
* Includes
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,16 @@
* devices such as External Flash and LCD.
* That can be extended to other families as well.
*/
#ifndef SL_SI91X_NCP_UTILITY_H
#define SL_SI91X_NCP_UTILITY_H

#pragma once

#include "FreeRTOS.h"
#include "em_usart.h"
#include "semphr.h"
#include "silabs_utils.h"
#include "sl_status.h"

// TODO: This is a WF200 specific include. It is not clear why we need this in the 917 NCP files.
#include <platform/silabs/wifi/wf200/platform/spi_multiplex.h>

#if defined(CHIP_9117)
#include "em_usart.h"
#include "sl_board_configuration_SiWx917.h"
#include "sl_spidrv_exp_config.h"

#endif // CHIP_9117
#include "sl_status.h"
#include <platform/silabs/wifi/SiWx/ncp/sl_board_configuration.h>
#include <platform/silabs/wifi/ncp/spi_multiplex.h>

#define USART_INITSYNC_BAUDRATE 12500000

Expand All @@ -48,4 +40,3 @@ sl_status_t spi_board_init(void);

extern uint32_t rx_ldma_channel;
extern uint32_t tx_ldma_channel;
#endif // SL_SI91X_NCP_UTILITY_H
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "sl_status.h"
#include "spidrv.h"
#include "task.h"
#include <platform/silabs/wifi/wf200/platform/spi_multiplex.h>
#include <platform/silabs/wifi/ncp/spi_multiplex.h>

#ifdef SL_BOARD_NAME
#include "sl_board_control.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
* limitations under the License.
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "FreeRTOS.h"
#include "dmadrv.h"
#include "em_chip.h"
#include "em_cmu.h"
Expand All @@ -27,25 +24,16 @@
#include "em_gpio.h"
#include "em_ldma.h"
#include "em_usart.h"
#include "event_groups.h"
#include "gpiointerrupt.h"
#include "rsi_board_configuration.h"
#include "rsi_driver.h"
#include "sl_device_init_clocks.h"
#include "sl_status.h"

#include "FreeRTOS.h"
#include "event_groups.h"
#include "task.h"

#if (SLI_SI91X_MCU_INTERFACE | EXP_BOARD)
#include "sl_board_configuration.h"

#include "sl_rsi_utility.h"
#include "sl_si91x_host_interface.h"

void gpio_interrupt(uint8_t interrupt_number);
#else
#include "rsi_board_configuration.h"
#include "rsi_driver.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef void (*UserIntCallBack_t)(void);
UserIntCallBack_t call_back, gpio_callback;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
* limitations under the License.
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "FreeRTOS.h"
#include "dmadrv.h"
#include "em_chip.h"
#include "em_cmu.h"
Expand All @@ -27,16 +24,17 @@
#include "em_gpio.h"
#include "em_ldma.h"
#include "em_usart.h"
#include "event_groups.h"
#include "gpiointerrupt.h"
#include "rsi_board_configuration.h"
#include "rsi_driver.h"
#include "sl_device_init_clocks.h"
#include "sl_status.h"

#include "FreeRTOS.h"
#include "event_groups.h"
#include "task.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "rsi_board_configuration.h"
#include "rsi_driver.h"
/*===========================================================*/
/**
* @fn void rsi_hal_config_gpio(uint8_t gpio_number,uint8_t mode,uint8_t value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,9 @@

//! To set Extended custom feature select bit map
#if WIFI_ENABLE_SECURITY_WPA3_TRANSITION
#ifdef CHIP_9117
mkardous-silabs marked this conversation as resolved.
Show resolved Hide resolved
#define RSI_EXT_CUSTOM_FEATURE_BIT_MAP \
(EXT_FEAT_448K_M4SS_256K | EXT_FEAT_LOW_POWER_MODE | EXT_FEAT_XTAL_CLK_ENABLE | EXT_FEAT_IEEE_80211W)
#else /* !CHIP_9117 */
#define RSI_EXT_CUSTOM_FEATURE_BIT_MAP (EXT_FEAT_384K_MODE | EXT_FEAT_IEEE_80211W)
#endif /* CHIP_9117 */
#else /* !WIFI_ENABLE_SECURITY_WPA3_TRANSITION */
#ifdef CHIP_9117
#define RSI_EXT_CUSTOM_FEATURE_BIT_MAP (EXT_FEAT_448K_M4SS_256K | EXT_FEAT_LOW_POWER_MODE | EXT_FEAT_XTAL_CLK_ENABLE)
#else /* !CHIP_9117 */
#else /* !WIFI_ENABLE_SECURITY_WPA3_TRANSITION */
#define RSI_EXT_CUSTOM_FEATURE_BIT_MAP EXT_FEAT_384K_MODE
#endif /* CHIP_9117 */
#endif /* WIFI_ENABLE_SECURITY_WPA3_TRANSITION */

//! To set Extended TCPIP feature select bit map
Expand Down
12 changes: 6 additions & 6 deletions src/platform/silabs/wifi/rs911x/rs911x.gni
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import("${silabs_sdk_build_root}/efr32_sdk.gni")

rs911x_src_plat = [
"${chip_root}/src/platform/silabs/wifi/rs911x/WifiInterface.cpp",
"${chip_root}/src/platform/silabs/wifi/rs911x/platform/rsi_hal_mcu_interrupt.c",
"${chip_root}/src/platform/silabs/wifi/rs911x/platform/rsi_hal_mcu_ioports.c",
"${chip_root}/src/platform/silabs/wifi/rs911x/platform/rsi_hal_mcu_timer.c",
"${chip_root}/src/platform/silabs/wifi/rs911x/platform/efx_spi.c",
"${chip_root}/src/platform/silabs/wifi/rs911x/platform/rsi_board_configuration.h",
"${chip_root}/src/platform/silabs/wifi/rs911x/platform/rsi_hal.h",
"${chip_root}/src/platform/silabs/wifi/rs911x/ncp/rsi_hal_mcu_interrupt.c",
"${chip_root}/src/platform/silabs/wifi/rs911x/ncp/rsi_hal_mcu_ioports.c",
"${chip_root}/src/platform/silabs/wifi/rs911x/ncp/rsi_hal_mcu_timer.c",
"${chip_root}/src/platform/silabs/wifi/rs911x/ncp/efx_spi.c",
"${chip_root}/src/platform/silabs/wifi/rs911x/ncp/rsi_board_configuration.h",
"${chip_root}/src/platform/silabs/wifi/rs911x/ncp/rsi_hal.h",
"${chip_root}/src/platform/silabs/wifi/wiseconnect-abstraction/WiseconnectInterfaceAbstraction.cpp",
]

Expand Down
6 changes: 3 additions & 3 deletions src/platform/silabs/wifi/wf200/WifiInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
#include <platform/silabs/wifi/WifiInterfaceAbstraction.h>
#include <platform/silabs/wifi/lwip-support/dhcp_client.h>
#include <platform/silabs/wifi/lwip-support/ethernetif.h>
#include <platform/silabs/wifi/wf200/platform/sl_wfx_board.h>
#include <platform/silabs/wifi/wf200/platform/sl_wfx_host.h>
#include <platform/silabs/wifi/wf200/platform/sl_wfx_task.h>
#include <platform/silabs/wifi/wf200/ncp/sl_wfx_board.h>
#include <platform/silabs/wifi/wf200/ncp/sl_wfx_host.h>
#include <platform/silabs/wifi/wf200/ncp/sl_wfx_task.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "sl_wfx_host_api.h"
#include "sl_wfx_task.h"
#include "spidrv.h"
#include <platform/silabs/wifi/wf200/platform/spi_multiplex.h>
#include <platform/silabs/wifi/ncp/spi_multiplex.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down
16 changes: 8 additions & 8 deletions src/platform/silabs/wifi/wf200/wf200.gni
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import("${silabs_sdk_build_root}/efr32_sdk.gni")

wf200_plat_src = [
"${chip_root}/src/platform/silabs/wifi/wf200/WifiInterface.cpp",
"${chip_root}/src/platform/silabs/wifi/wf200/platform/sl_wfx_task.c",
"${chip_root}/src/platform/silabs/wifi/wf200/platform/wf200_init.c",
"${chip_root}/src/platform/silabs/wifi/wf200/platform/efr_spi.c",
"${chip_root}/src/platform/silabs/wifi/wf200/platform/sl_wfx_board.h",
"${chip_root}/src/platform/silabs/wifi/wf200/platform/sl_wfx_host.h",
"${chip_root}/src/platform/silabs/wifi/wf200/platform/sl_wfx_task.h",
"${chip_root}/src/platform/silabs/wifi/wf200/platform/sl_custom_board.h",
"${chip_root}/src/platform/silabs/wifi/wf200/platform/spi_multiplex.h",
"${chip_root}/src/platform/silabs/wifi/wf200/ncp/sl_wfx_task.c",
"${chip_root}/src/platform/silabs/wifi/wf200/ncp/wf200_init.c",
"${chip_root}/src/platform/silabs/wifi/wf200/ncp/efr_spi.c",
"${chip_root}/src/platform/silabs/wifi/wf200/ncp/sl_wfx_board.h",
"${chip_root}/src/platform/silabs/wifi/wf200/ncp/sl_wfx_host.h",
"${chip_root}/src/platform/silabs/wifi/wf200/ncp/sl_wfx_task.h",
"${chip_root}/src/platform/silabs/wifi/wf200/ncp/sl_custom_board.h",
"${chip_root}/src/platform/silabs/wifi/ncp/spi_multiplex.h",
]
5 changes: 1 addition & 4 deletions third_party/silabs/efr32_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,7 @@ template("efr32_sdk") {

if (use_rs9116) {
# TODO: we should create a seperate directory for headers that are necessary for the underlying sdks
_include_dirs += [
"${chip_root}/src/platform/silabs/wifi/rs911x/platform",
"${chip_root}/src/platform/silabs/wifi/rs911x",
]
_include_dirs += [ "${chip_root}/src/platform/silabs/wifi/rs911x/ncp" ]
}

if (use_rs9116 || use_SiWx917) {
Expand Down
Loading