Skip to content

Commit

Permalink
[Silabs] BLE bringup on the SiWx917 board (#24108)
Browse files Browse the repository at this point in the history
* BLE bringup on the CCP board

* Restyle the PR
  • Loading branch information
chirag-silabs authored and pull[bot] committed Dec 15, 2023
1 parent 3f21ab6 commit 5255403
Show file tree
Hide file tree
Showing 6 changed files with 183 additions and 299 deletions.
4 changes: 3 additions & 1 deletion examples/platform/silabs/SiWx917/SiWx917/rsi_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ bool hasNotifiedIPV4 = false;
#endif /* CHIP_DEVICE_CONFIG_ENABLE_IPV4 */
bool hasNotifiedWifiConnectivity = false;

extern rsi_semaphore_handle_t sl_ble_init_sem;
/*
* This file implements the interface to the RSI SAPIs
*/
Expand Down Expand Up @@ -275,7 +276,7 @@ static int32_t wfx_rsi_init(void)

/* Initialize WiSeConnect or Module features. */
WFX_RSI_LOG("%s: rsi_wireless_init", __func__);
if ((status = rsi_wireless_init(OPER_MODE_0, COEX_MODE_0)) != RSI_SUCCESS)
if ((status = rsi_wireless_init(OPER_MODE_0, RSI_OPERMODE_WLAN_BLE)) != RSI_SUCCESS)
{
WFX_RSI_LOG("%s: error: rsi_wireless_init failed with status: %02x", __func__, status);
return status;
Expand Down Expand Up @@ -331,6 +332,7 @@ static int32_t wfx_rsi_init(void)
}
#endif
wfx_rsi.dev_state |= WFX_RSI_ST_DEV_READY;
rsi_semaphore_post(&sl_ble_init_sem);
WFX_RSI_LOG("%s: RSI: OK", __func__);
return RSI_SUCCESS;
}
Expand Down
4 changes: 2 additions & 2 deletions src/platform/silabs/BLEManagerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla
void HandleTxConfirmationEvent(BLE_CONNECTION_OBJECT conId);
void HandleTXCharCCCDWrite(rsi_ble_event_write_t * evt);
void HandleSoftTimerEvent(void);
CHIP_ERROR StartAdvertising(void);
#else
void HandleConnectEvent(volatile sl_bt_msg_t * evt);
void HandleConnectionCloseEvent(volatile sl_bt_msg_t * evt);
Expand All @@ -74,7 +75,7 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla
void HandleTxConfirmationEvent(BLE_CONNECTION_OBJECT conId);
void HandleTXCharCCCDWrite(volatile sl_bt_msg_t * evt);
void HandleSoftTimerEvent(volatile sl_bt_msg_t * evt);

CHIP_ERROR StartAdvertising(void);
#endif // RS91X_BLE_ENABLE

#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING
Expand Down Expand Up @@ -180,7 +181,6 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla
CHIP_ERROR MapBLEError(int bleErr);
void DriveBLEState(void);
CHIP_ERROR ConfigureAdvertisingData(void);
CHIP_ERROR StartAdvertising(void);
CHIP_ERROR StopAdvertising(void);
#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING
CHIP_ERROR EncodeAdditionalDataTlv();
Expand Down
Loading

0 comments on commit 5255403

Please sign in to comment.