Skip to content

Commit

Permalink
fix 9116
Browse files Browse the repository at this point in the history
  • Loading branch information
jepenven-silabs committed May 16, 2023
1 parent 69aab23 commit 2d3bdc2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 17 deletions.
5 changes: 2 additions & 3 deletions examples/platform/silabs/efr32/rs911x/hal/efx_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
#endif
#include "spidrv.h"

#include "silabs_utils.h"

#include "gpiointerrupt.h"
#include "sl_device_init_clocks.h"
#include "sl_status.h"
Expand Down Expand Up @@ -140,13 +142,10 @@ void rsi_hal_board_init(void)
xSemaphoreGive(spiTransferLock);

/* GPIO INIT of MG12 & MG24 : Reset, Wakeup, Interrupt */
SILABS_LOG("RSI_HAL: init GPIO");
sl_wfx_host_gpio_init();

/* Reset of Wifi chip */
SILABS_LOG("RSI_HAL: Reset Wifi");
sl_wfx_host_reset_chip();
SILABS_LOG("RSI_HAL: Init done");
}

/*****************************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ void rsi_gpio_irq_cb(uint8_t irqnum)
void rsi_hal_intr_config(void (*rsi_interrupt_handler)(void))
{
call_back = rsi_interrupt_handler;
SILABS_LOG("RSI:Set SPI intr CB to=%x", (uint32_t) call_back);
}

/*===================================================*/
Expand Down
2 changes: 2 additions & 0 deletions examples/platform/silabs/efr32/rs911x/rsi_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include "event_groups.h"
#include "task.h"

#include "silabs_utils.h"

#include "wfx_host_events.h"

#include "rsi_driver.h"
Expand Down
14 changes: 2 additions & 12 deletions examples/platform/silabs/efr32/rs911x/wfx_rsi_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include "em_usart.h"
#include "sl_status.h"

#include "silabs_utils.h"

#include "FreeRTOS.h"
#include "event_groups.h"
#include "task.h"
Expand Down Expand Up @@ -53,11 +55,9 @@ sl_status_t wfx_wifi_start(void)
{
if (wfx_rsi.dev_state & WFX_RSI_ST_STARTED)
{
SILABS_LOG("%s: already started.", __func__);
return SL_STATUS_OK;
}
wfx_rsi.dev_state |= WFX_RSI_ST_STARTED;
SILABS_LOG("%s: starting..", __func__);
/*
* Create the Wifi driver task
*/
Expand All @@ -66,7 +66,6 @@ sl_status_t wfx_wifi_start(void)

if (NULL == wfx_rsi.wlan_task)
{
SILABS_LOG("%s: error: failed to create task.", __func__);
return SL_STATUS_FAIL;
}
return SL_STATUS_OK;
Expand Down Expand Up @@ -95,7 +94,6 @@ bool wfx_is_sta_mode_enabled(void)
{
bool mode;
mode = !!(wfx_rsi.dev_state & WFX_RSI_ST_STA_MODE);
// SILABS_LOG("%s: %d", __func__, (mode ? "yes" : "no"));
return mode;
}

Expand Down Expand Up @@ -170,7 +168,6 @@ void wfx_clear_wifi_provision(void)
{
memset(&wfx_rsi.sec, 0, sizeof(wfx_rsi.sec));
wfx_rsi.dev_state &= ~WFX_RSI_ST_STA_PROVISIONED;
SILABS_LOG("%s: completed.", __func__);
}

/*************************************************************************
Expand Down Expand Up @@ -228,7 +225,6 @@ void wfx_setup_ip6_link_local(sl_wfx_interface_t whichif)
* TODO: Implement IPV6 setup, currently in wfx_rsi_task()
* This is hooked with MATTER code.
*/
SILABS_LOG("%s: warning: not implemented.", __func__);
}

/*********************************************************************
Expand All @@ -243,7 +239,6 @@ bool wfx_is_sta_connected(void)
{
bool status;
status = (wfx_rsi.dev_state & WFX_RSI_ST_STA_CONNECTED) ? true : false;
SILABS_LOG("%s: status: %s", __func__, (status ? "connected" : "not connected"));
return status;
}

Expand Down Expand Up @@ -272,11 +267,9 @@ wifi_mode_t wfx_get_wifi_mode()
***********************************************************************/
sl_status_t wfx_sta_discon(void)
{
SILABS_LOG("%s: started.", __func__);
int32_t status;
status = wfx_rsi_disconnect();
wfx_rsi.dev_state &= ~WFX_RSI_ST_STA_CONNECTED;
SILABS_LOG("%s: completed.", __func__);
return status;
}
#if CHIP_DEVICE_CONFIG_ENABLE_IPV4
Expand All @@ -299,7 +292,6 @@ bool wfx_have_ipv4_addr(sl_wfx_interface_t which_if)
{
status = false; /* TODO */
}
SILABS_LOG("%s: status: %d", __func__, status);
return status;
}
#endif /* CHIP_DEVICE_CONFIG_ENABLE_IPV4 */
Expand All @@ -323,7 +315,6 @@ bool wfx_have_ipv6_addr(sl_wfx_interface_t which_if)
{
status = false; /* TODO */
}
SILABS_LOG("%s: status: %d", __func__, status);
return status;
}

Expand Down Expand Up @@ -420,6 +411,5 @@ bool wfx_start_scan(char * ssid, void (*callback)(wfx_wifi_scan_result_t *))
void wfx_cancel_scan(void)
{
/* Not possible */
SILABS_LOG("%s: cannot cancel scan", __func__);
}
#endif /* SL_WFX_CONFIG_SCAN */
1 change: 0 additions & 1 deletion examples/platform/silabs/efr32/wf200/efr_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,6 @@ static void sl_wfx_spi_wakeup_irq_callback(uint8_t irqNumber)
*****************************************************************************/
void sl_wfx_host_gpio_init(void)
{
SILABS_LOG("WIFI: GPIO Init:IRQ=%d", wirq_irq_nb);
// Enable GPIO clock.
CMU_ClockEnable(cmuClock_GPIO, true);

Expand Down

0 comments on commit 2d3bdc2

Please sign in to comment.