@@ -115,11 +115,11 @@ const uint8_t ShortUUID_CHIPoBLEService[] = { 0xF6, 0xFF };
115
115
116
116
BLEManagerImpl BLEManagerImpl::sInstance ;
117
117
118
- void BLEManagerImpl::ProcessEvent (BleEvent_t inEvent)
118
+ void BLEManagerImpl::ProcessEvent (SilabsBleWrapper:: BleEvent_t inEvent)
119
119
{
120
120
switch (inEvent.eventType )
121
121
{
122
- case RSI_BLE_CONN_EVENT: {
122
+ case SilabsBleWrapper::BleEventType_e:: RSI_BLE_CONN_EVENT: {
123
123
BLEMgrImpl ().HandleConnectEvent ((inEvent.eventData ));
124
124
// Requests the connection parameters change with the remote device
125
125
rsi_ble_conn_params_update (inEvent.eventData ->resp_enh_conn .dev_addr , BLE_MIN_CONNECTION_INTERVAL_MS,
@@ -131,17 +131,17 @@ void BLEManagerImpl::ProcessEvent(BleEvent_t inEvent)
131
131
ble_measurement_hndl = inEvent.eventData ->rsi_ble_measurement_hndl ;
132
132
}
133
133
break ;
134
- case RSI_BLE_DISCONN_EVENT: {
134
+ case SilabsBleWrapper::BleEventType_e:: RSI_BLE_DISCONN_EVENT: {
135
135
// event invokes when disconnection was completed
136
136
BLEMgrImpl ().HandleConnectionCloseEvent (inEvent.eventData );
137
137
}
138
138
break ;
139
- case RSI_BLE_MTU_EVENT: {
139
+ case SilabsBleWrapper::BleEventType_e:: RSI_BLE_MTU_EVENT: {
140
140
// event invokes when write/notification events received
141
141
BLEMgrImpl ().UpdateMtu (inEvent.eventData );
142
142
}
143
143
break ;
144
- case RSI_BLE_EVENT_GATT_RD: {
144
+ case SilabsBleWrapper::BleEventType_e:: RSI_BLE_EVENT_GATT_RD: {
145
145
#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING
146
146
if (inEvent.eventData ->rsi_ble_read_req ->type == 0 )
147
147
{
@@ -150,12 +150,12 @@ void BLEManagerImpl::ProcessEvent(BleEvent_t inEvent)
150
150
#endif // CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING
151
151
}
152
152
break ;
153
- case RSI_BLE_GATT_WRITE_EVENT: {
153
+ case SilabsBleWrapper::BleEventType_e:: RSI_BLE_GATT_WRITE_EVENT: {
154
154
// event invokes when write/notification events received
155
155
BLEMgrImpl ().HandleWriteEvent (inEvent.eventData );
156
156
}
157
157
break ;
158
- case RSI_BLE_GATT_INDICATION_CONFIRMATION: {
158
+ case SilabsBleWrapper::BleEventType_e:: RSI_BLE_GATT_INDICATION_CONFIRMATION: {
159
159
BLEMgrImpl ().HandleTxConfirmationEvent (1 );
160
160
}
161
161
break ;
@@ -164,7 +164,7 @@ void BLEManagerImpl::ProcessEvent(BleEvent_t inEvent)
164
164
}
165
165
}
166
166
167
- void BLEManagerImpl::BlePostEvent (BleEvent_t * event)
167
+ void BLEManagerImpl::BlePostEvent (SilabsBleWrapper:: BleEvent_t * event)
168
168
{
169
169
sl_status_t status = osMessageQueuePut (sInstance .sBleEventQueue , event, 0 , 0 );
170
170
if (status != osOK)
@@ -177,7 +177,7 @@ void BLEManagerImpl::BlePostEvent(BleEvent_t * event)
177
177
void BLEManagerImpl::sl_ble_event_handling_task (void * args)
178
178
{
179
179
sl_status_t status;
180
- BleEvent_t bleEvent;
180
+ SilabsBleWrapper:: BleEvent_t bleEvent;
181
181
182
182
// ! This semaphore is waiting for wifi module initialization.
183
183
osSemaphoreAcquire (sl_rs_ble_init_sem, osWaitForever);
@@ -210,16 +210,16 @@ void BLEManagerImpl::sl_ble_init()
210
210
randomAddrBLE[(RSI_BLE_ADDR_LENGTH - 1 )] |= 0xC0 ;
211
211
212
212
// registering the GAP callback functions
213
- rsi_ble_gap_register_callbacks (NULL , NULL , rsi_ble_on_disconnect_event, NULL , NULL , NULL , rsi_ble_on_enhance_conn_status_event,
213
+ rsi_ble_gap_register_callbacks (NULL , NULL , SilabsBleWrapper:: rsi_ble_on_disconnect_event, NULL , NULL , NULL , SilabsBleWrapper:: rsi_ble_on_enhance_conn_status_event,
214
214
NULL , NULL , NULL );
215
215
216
216
// registering the GATT call back functions
217
- rsi_ble_gatt_register_callbacks (NULL , NULL , NULL , NULL , NULL , NULL , NULL , rsi_ble_on_gatt_write_event, NULL , NULL ,
218
- rsi_ble_on_read_req_event, rsi_ble_on_mtu_event, NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL ,
219
- NULL , rsi_ble_on_event_indication_confirmation, NULL );
217
+ rsi_ble_gatt_register_callbacks (NULL , NULL , NULL , NULL , NULL , NULL , NULL , SilabsBleWrapper:: rsi_ble_on_gatt_write_event, NULL , NULL ,
218
+ SilabsBleWrapper:: rsi_ble_on_read_req_event, SilabsBleWrapper:: rsi_ble_on_mtu_event, NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL ,
219
+ NULL , SilabsBleWrapper:: rsi_ble_on_event_indication_confirmation, NULL );
220
220
221
221
// Exchange of GATT info with BLE stack
222
- rsi_ble_add_matter_service ();
222
+ SilabsBleWrapper:: rsi_ble_add_matter_service ();
223
223
rsi_ble_set_random_address_with_value (randomAddrBLE);
224
224
225
225
sInstance .sBleEventQueue = osMessageQueueNew (WFX_QUEUE_SIZE, sizeof (WfxEvent_t), NULL );
@@ -733,7 +733,7 @@ CHIP_ERROR BLEManagerImpl::StopAdvertising(void)
733
733
return err;
734
734
}
735
735
736
- void BLEManagerImpl::UpdateMtu (sl_wfx_msg_t * evt)
736
+ void BLEManagerImpl::UpdateMtu (SilabsBleWrapper:: sl_wfx_msg_t * evt)
737
737
{
738
738
CHIPoBLEConState * bleConnState = GetConnectionState (evt->connectionHandle );
739
739
if (bleConnState != NULL )
@@ -762,14 +762,14 @@ void BLEManagerImpl::HandleBootEvent(void)
762
762
PlatformMgr ().ScheduleWork (DriveBLEState, 0 );
763
763
}
764
764
765
- void BLEManagerImpl::HandleConnectEvent (sl_wfx_msg_t * evt)
765
+ void BLEManagerImpl::HandleConnectEvent (SilabsBleWrapper:: sl_wfx_msg_t * evt)
766
766
{
767
767
AddConnection (evt->connectionHandle , evt->bondingHandle );
768
768
PlatformMgr ().ScheduleWork (DriveBLEState, 0 );
769
769
}
770
770
771
771
// TODO:: Implementation need to be done.
772
- void BLEManagerImpl::HandleConnectionCloseEvent (sl_wfx_msg_t * evt)
772
+ void BLEManagerImpl::HandleConnectionCloseEvent (SilabsBleWrapper:: sl_wfx_msg_t * evt)
773
773
{
774
774
uint8_t connHandle = 1 ;
775
775
@@ -803,7 +803,7 @@ void BLEManagerImpl::HandleConnectionCloseEvent(sl_wfx_msg_t * evt)
803
803
}
804
804
}
805
805
806
- void BLEManagerImpl::HandleWriteEvent (sl_wfx_msg_t * evt)
806
+ void BLEManagerImpl::HandleWriteEvent (SilabsBleWrapper:: sl_wfx_msg_t * evt)
807
807
{
808
808
ChipLogProgress (DeviceLayer, " Char Write Req, packet type %d" , evt->rsi_ble_write .pkt_type );
809
809
@@ -818,7 +818,7 @@ void BLEManagerImpl::HandleWriteEvent(sl_wfx_msg_t * evt)
818
818
}
819
819
820
820
// TODO:: Need to implement this
821
- void BLEManagerImpl::HandleTXCharCCCDWrite (sl_wfx_msg_t * evt)
821
+ void BLEManagerImpl::HandleTXCharCCCDWrite (SilabsBleWrapper:: sl_wfx_msg_t * evt)
822
822
{
823
823
CHIP_ERROR err = CHIP_NO_ERROR;
824
824
bool isIndicationEnabled = false ;
@@ -863,7 +863,7 @@ void BLEManagerImpl::HandleTXCharCCCDWrite(sl_wfx_msg_t * evt)
863
863
}
864
864
}
865
865
866
- void BLEManagerImpl::HandleRXCharWrite (sl_wfx_msg_t * evt)
866
+ void BLEManagerImpl::HandleRXCharWrite (SilabsBleWrapper:: sl_wfx_msg_t * evt)
867
867
{
868
868
uint8_t conId = 1 ;
869
869
CHIP_ERROR err = CHIP_NO_ERROR;
@@ -996,7 +996,7 @@ CHIP_ERROR BLEManagerImpl::EncodeAdditionalDataTlv()
996
996
return err;
997
997
}
998
998
999
- void BLEManagerImpl::HandleC3ReadRequest (sl_wfx_msg_t * evt)
999
+ void BLEManagerImpl::HandleC3ReadRequest (SilabsBleWrapper:: sl_wfx_msg_t * evt)
1000
1000
{
1001
1001
sl_status_t ret = rsi_ble_gatt_read_response (evt->rsi_ble_read_req .dev_addr , GATT_READ_RESP, evt->rsi_ble_read_req .handle ,
1002
1002
GATT_READ_ZERO_OFFSET, sInstance .c3AdditionalDataBufferHandle ->DataLength (),
0 commit comments