Skip to content

Commit

Permalink
Wi-fi: C to C++.
Browse files Browse the repository at this point in the history
  • Loading branch information
rcasallas-silabs committed Mar 26, 2024
1 parent 628cd88 commit 14d9cee
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/platform/silabs/SiWx917/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static_library("SiWx917") {
"../../SingletonConfigurationManager.cpp",
"../rs911x/BLEManagerImpl.cpp",
"../rs911x/rsi_ble_config.h",
"../rs911x/wfx_sl_ble_init.c",
"../rs911x/wfx_sl_ble_init.cpp",
"../rs911x/wfx_sl_ble_init.h",
"PlatformManagerImpl.cpp",
]
Expand Down
2 changes: 1 addition & 1 deletion src/platform/silabs/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static_library("efr32") {
sources += [
"../rs911x/BLEManagerImpl.cpp",
"../rs911x/rsi_ble_config.h",
"../rs911x/wfx_sl_ble_init.c",
"../rs911x/wfx_sl_ble_init.cpp",
"../rs911x/wfx_sl_ble_init.h",
]
} else {
Expand Down
1 change: 0 additions & 1 deletion src/platform/silabs/efr32/wifi/wfx_host_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ int32_t wfx_rsi_send_data(void * p, uint16_t len);
#ifdef WF200_WIFI
void wfx_bus_start(void);
sl_status_t get_all_counters(void);
void sl_wfx_host_gpio_init(void);
sl_status_t sl_wfx_host_process_event(sl_wfx_generic_message_t * event_payload);
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "silabs_utils.h"
extern "C" {
#include "wfx_sl_ble_init.h"
#include "ble_config.h"
#include "cmsis_os2.h"
#include "silabs_utils.h"
}
// Global Variables
rsi_ble_t att_list;
sl_wfx_msg_t event_msg;
Expand Down Expand Up @@ -374,10 +376,13 @@ uint32_t rsi_ble_add_matter_service(void)

static const uuid_t custom_characteristic_RX = { .size = RSI_BLE_CUSTOM_CHARACTERISTIC_RX_SIZE,
.reserved = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_RESERVED },
.val.val128.data1 = RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_1,
.val.val128.data2 = RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_2,
.val.val128.data3 = RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_3,
.val.val128.data4 = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_4 } };
.val = {
.val128 = {
RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_1,
RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_2,
RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_3,
RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_4
} } };

rsi_ble_resp_add_serv_t new_serv_resp = { 0 };
rsi_ble_add_service(custom_service, &new_serv_resp);
Expand All @@ -396,10 +401,13 @@ uint32_t rsi_ble_add_matter_service(void)

static const uuid_t custom_characteristic_TX = { .size = RSI_BLE_CUSTOM_CHARACTERISTIC_TX_SIZE,
.reserved = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_RESERVED },
.val.val128.data1 = RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_1,
.val.val128.data2 = RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_2,
.val.val128.data3 = RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_3,
.val.val128.data4 = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_4 } };
.val = {
.val128 = {
RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_1,
RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_2,
RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_3,
RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_4
} } };

// Adding custom characteristic declaration to the custom service
rsi_ble_add_char_serv_att(
Expand Down

0 comments on commit 14d9cee

Please sign in to comment.