Skip to content

Commit

Permalink
Added changes for rs9117 NCP
Browse files Browse the repository at this point in the history
  • Loading branch information
shgutte committed Dec 21, 2023
1 parent 3cd2d8a commit b1630a5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
14 changes: 7 additions & 7 deletions examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ sl_status_t join_callback_handler(sl_wifi_event_t event, char * result, uint32_t
wfx_rsi.dev_state &= ~(WFX_RSI_ST_STA_CONNECTING);
temp_reset = (wfx_wifi_scan_ext_t *) malloc(sizeof(wfx_wifi_scan_ext_t));
memset(temp_reset, 0, sizeof(wfx_wifi_scan_ext_t));
if (CHECK_IF_EVENT_FAILED(event))
if (SL_WIFI_CHECK_IF_EVENT_FAILED(event))
{
SILABS_LOG("F: Join Event received with %u bytes payload\n", result_length);
callback_status = *(sl_status_t *) result;
Expand Down Expand Up @@ -237,7 +237,7 @@ int32_t wfx_wifi_rsi_init(void)
{
SILABS_LOG("wfx_wifi_rsi_init started");
sl_status_t status;
status = sl_wifi_init(&config, default_wifi_event_handler);
status = sl_wifi_init(&config, NULL, sl_wifi_default_event_handler);
if (status != SL_STATUS_OK)
{
SILABS_LOG("wfx_wifi_rsi_init failed %x", status);
Expand All @@ -257,7 +257,7 @@ static sl_status_t wfx_rsi_init(void)
{
sl_status_t status;

#ifndef RSI_M4_INTERFACE
#ifndef SLI_SI91X_MCU_INTERFACE
status = wfx_wifi_rsi_init();
if (status != SL_STATUS_OK)
{
Expand Down Expand Up @@ -292,7 +292,7 @@ void wfx_show_err(char * msg)

sl_status_t scan_callback_handler(sl_wifi_event_t event, sl_wifi_scan_result_t * scan_result, uint32_t result_length, void * arg)
{
if (CHECK_IF_EVENT_FAILED(event))
if (SL_WIFI_CHECK_IF_EVENT_FAILED(event))
{
callback_status = *(sl_status_t *) scan_result;
scan_results_complete = true;
Expand Down Expand Up @@ -341,7 +341,7 @@ sl_status_t scan_callback_handler(sl_wifi_event_t event, sl_wifi_scan_result_t *
}
sl_status_t show_scan_results(sl_wifi_scan_result_t * scan_result)
{
ARGS_CHECK_NULL_POINTER(scan_result);
SL_WIFI_ARGS_CHECK_NULL_POINTER(scan_result);
int x;
wfx_wifi_scan_result_t ap;
for (x = 0; x < (int) scan_result->scan_count; x++)
Expand Down Expand Up @@ -482,7 +482,7 @@ static sl_status_t wfx_rsi_do_join(void)
* And check there is a success
*/
sl_wifi_credential_t cred = { 0 };
cred.type = SL_WIFI_CRED_PSK;
cred.type = SL_WIFI_PSK_CREDENTIAL;
memcpy(cred.psk.value, &wfx_rsi.sec.passkey[0], strlen(wfx_rsi.sec.passkey));
sl_wifi_credential_id_t id = SL_NET_DEFAULT_WIFI_CLIENT_CREDENTIAL_ID;
status = sl_net_set_credential(id, SL_NET_WIFI_PSK, &wfx_rsi.sec.passkey[0], strlen(wfx_rsi.sec.passkey));
Expand Down Expand Up @@ -823,4 +823,4 @@ int32_t wfx_rsi_send_data(void * p, uint16_t len)
return status;
}

#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ extern SPIDRV_Handle_t sl_spidrv_exp_handle;

// variable to identify spi configured for expansion header
// EUSART configuration available on the SPIDRV
static bool spi_enabled = false;

#if SL_SPICTRL_MUX
sl_status_t spi_board_init(void);
Expand Down
4 changes: 3 additions & 1 deletion examples/platform/silabs/efr32/rs911x/rs9117.gni
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ rs911x_src_plat = [
"${examples_plat_dir}/rs911x/sl_wifi_if.c",
"${examples_plat_dir}/rs911x/wfx_rsi_host.c",
"${examples_plat_dir}/rs911x/hal/rsi_hal_mcu_interrupt.c",
"${examples_plat_dir}/rs911x/hal/efx_spi.c",
#"${examples_plat_dir}/rs911x/hal/efx_spi.c",
"${examples_plat_dir}/rs911x/hal/sl_si91x_ncp_utility.c",
"${examples_plat_dir}/rs911x/hal/efx32_ncp_host.c",
"${silabs_plat_efr32_wifi_dir}/wfx_notify.cpp",
]

Expand Down
11 changes: 8 additions & 3 deletions third_party/silabs/efr32_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,17 @@ template("efr32_sdk") {
"${sl_ot_efr32_root}",
]

if (silabs_family == "efr32mg24") {
_include_dirs += [
"${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG24/Include",
]
}

if (use_SiWx917) {
_include_dirs += [
"${wifi_sdk_root}/components/si91x/memory",
"${wifi_sdk_root}/components/device/silabs/si91x/wireless/inc",
"${wifi_sdk_root}/components/device/silabs/si91x/wireless/sl_net/inc",
"${wifi_sdk_root}/components/device/silabs/si91x/wireless/ahb_interface/inc",
"${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/rom_driver/inc",
"${wifi_sdk_root}/components/device/silabs/si91x/mcu/core/chip/inc",
"${wifi_sdk_root}/components/common/inc",
Expand Down Expand Up @@ -495,7 +500,6 @@ template("efr32_sdk") {
defines += [ "EFR32MG12" ]
} else if (silabs_family == "efr32mg24") {
_include_dirs += [
"${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG24/Include",
"${efr32_sdk_root}/platform/radio/rail_lib/chip/efr32/efr32xg2x",
"${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg24",
Expand Down Expand Up @@ -597,6 +601,7 @@ template("efr32_sdk") {

source_set(sdk_target_name) {
sources = [

"${efr32_sdk_root}/hardware/board/src/sl_board_control_gpio.c",
"${efr32_sdk_root}/hardware/board/src/sl_board_init.c",
"${efr32_sdk_root}/platform/CMSIS/RTOS2/Source/os_systick.c",
Expand Down Expand Up @@ -703,7 +708,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_no_static.c",
"${efr32_sdk_root}/util/third_party/mbedtls/library/psa_crypto_driver_wrappers.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

0 comments on commit b1630a5

Please sign in to comment.