@@ -29,7 +29,7 @@ static inline void btc_gattc_cb_to_app(esp_gattc_cb_event_t event, esp_gatt_if_t
2929 esp_gattc_cb_t btc_gattc_cb = (esp_gattc_cb_t )btc_profile_cb_get (BTC_PID_GATTC );
3030 if (btc_gattc_cb ) {
3131 btc_gattc_cb (event , gattc_if , param );
32- }
32+ }
3333}
3434
3535void btc_gattc_arg_deep_copy (btc_msg_t * msg , void * p_dest , void * p_src )
@@ -128,7 +128,7 @@ static void btc_gattc_copy_req_data(btc_msg_t *msg, void *p_dest, void *p_src)
128128 // Allocate buffer for request data if necessary
129129 switch (msg -> act ) {
130130 case BTA_GATTC_READ_DESCR_EVT :
131- case BTA_GATTC_READ_CHAR_EVT :
131+ case BTA_GATTC_READ_CHAR_EVT :
132132 case BTA_GATTC_READ_MUTIPLE_EVT : {
133133 if (p_src_data -> read .p_value && p_src_data -> read .p_value -> p_value ) {
134134 p_dest_data -> read .p_value = (tBTA_GATT_UNFMT * )osi_malloc (sizeof (tBTA_GATT_UNFMT ) + p_src_data -> read .p_value -> len );
@@ -141,7 +141,7 @@ static void btc_gattc_copy_req_data(btc_msg_t *msg, void *p_dest, void *p_src)
141141 }
142142 }
143143 break ;
144- }
144+ }
145145 default :
146146 break ;
147147 }
@@ -152,7 +152,7 @@ static void btc_gattc_free_req_data(btc_msg_t *msg)
152152 tBTA_GATTC * arg = (tBTA_GATTC * )(msg -> arg );
153153 switch (msg -> act ) {
154154 case BTA_GATTC_READ_DESCR_EVT :
155- case BTA_GATTC_READ_CHAR_EVT :
155+ case BTA_GATTC_READ_CHAR_EVT :
156156 case BTA_GATTC_READ_MUTIPLE_EVT : {
157157 if (arg -> read .p_value ) {
158158 osi_free (arg -> read .p_value );
@@ -290,7 +290,7 @@ static void btc_gattc_search_service(btc_ble_gattc_args_t *arg)
290290 }
291291}
292292
293- esp_gatt_status_t btc_ble_gattc_get_service (uint16_t conn_id , esp_bt_uuid_t * svc_uuid ,
293+ esp_gatt_status_t btc_ble_gattc_get_service (uint16_t conn_id , esp_bt_uuid_t * svc_uuid ,
294294 esp_gattc_service_elem_t * result ,
295295 uint16_t * count , uint16_t offset )
296296{
@@ -302,7 +302,7 @@ esp_gatt_status_t btc_ble_gattc_get_service(uint16_t conn_id, esp_bt_uuid_t *svc
302302 bta_uuid = osi_malloc (sizeof (tBT_UUID ));
303303 btc_to_bta_uuid (bta_uuid , svc_uuid );
304304 }
305-
305+
306306 BTA_GATTC_GetServiceWithUUID (conn_id , bta_uuid , & db , & svc_num );
307307
308308 if ((status = btc_gattc_check_valid_param (svc_num , offset )) != ESP_GATT_OK ) {
@@ -312,7 +312,7 @@ esp_gatt_status_t btc_ble_gattc_get_service(uint16_t conn_id, esp_bt_uuid_t *svc
312312 if (bta_uuid ) {
313313 osi_free (bta_uuid );
314314 }
315- return status ;
315+ return status ;
316316 } else {
317317 btc_gattc_fill_gatt_db_conversion (* count , (uint16_t )svc_num , ESP_GATT_DB_PRIMARY_SERVICE , offset , (void * )result , db );
318318 }
@@ -370,7 +370,7 @@ esp_gatt_status_t btc_ble_gattc_get_all_descr(uint16_t conn_id,
370370 if (db ) {
371371 osi_free (db );
372372 }
373- return status ;
373+ return status ;
374374 } else {
375375 btc_gattc_fill_gatt_db_conversion (* count , (uint16_t )descr_num , ESP_GATT_DB_DESCRIPTOR , offset , (void * )result , db );
376376 }
@@ -387,7 +387,7 @@ esp_gatt_status_t btc_ble_gattc_get_char_by_uuid(uint16_t conn_id,
387387 uint16_t start_handle ,
388388 uint16_t end_handle ,
389389 esp_bt_uuid_t char_uuid ,
390- esp_gattc_char_elem_t * result ,
390+ esp_gattc_char_elem_t * result ,
391391 uint16_t * count )
392392{
393393 esp_gatt_status_t status ;
@@ -419,7 +419,7 @@ esp_gatt_status_t btc_ble_gattc_get_descr_by_uuid(uint16_t conn_id,
419419 uint16_t end_handle ,
420420 esp_bt_uuid_t char_uuid ,
421421 esp_bt_uuid_t descr_uuid ,
422- esp_gattc_descr_elem_t * result ,
422+ esp_gattc_descr_elem_t * result ,
423423 uint16_t * count )
424424{
425425 esp_gatt_status_t status ;
@@ -429,8 +429,8 @@ esp_gatt_status_t btc_ble_gattc_get_descr_by_uuid(uint16_t conn_id,
429429 tBT_UUID bta_descr_uuid = {0 };
430430 btc_to_bta_uuid (& bta_char_uuid , & char_uuid );
431431 btc_to_bta_uuid (& bta_descr_uuid , & descr_uuid );
432-
433- BTA_GATTC_GetDescrByUUID (conn_id , start_handle , end_handle ,
432+
433+ BTA_GATTC_GetDescrByUUID (conn_id , start_handle , end_handle ,
434434 bta_char_uuid , bta_descr_uuid , & db , & descr_num );
435435
436436 if ((status = btc_gattc_check_valid_param (descr_num , 0 )) != ESP_GATT_OK ) {
@@ -441,7 +441,7 @@ esp_gatt_status_t btc_ble_gattc_get_descr_by_uuid(uint16_t conn_id,
441441 } else {
442442 btc_gattc_fill_gatt_db_conversion (* count , (uint16_t )descr_num , ESP_GATT_DB_DESCRIPTOR , 0 , (void * )result , db );
443443 }
444-
444+
445445 * count = descr_num ;
446446 //don't forget to free the db buffer after used.
447447 if (db ) {
@@ -461,7 +461,7 @@ esp_gatt_status_t btc_ble_gattc_get_descr_by_char_handle(uint16_t conn_id,
461461 int descr_num = 0 ;
462462 tBT_UUID bta_descr_uuid = {0 };
463463 btc_to_bta_uuid (& bta_descr_uuid , & descr_uuid );
464-
464+
465465 BTA_GATTC_GetDescrByCharHandle (conn_id , char_handle , bta_descr_uuid , & db , & descr_num );
466466
467467 if ((status = btc_gattc_check_valid_param (descr_num , 0 )) != ESP_GATT_OK ) {
@@ -479,7 +479,7 @@ esp_gatt_status_t btc_ble_gattc_get_descr_by_char_handle(uint16_t conn_id,
479479 osi_free (db );
480480 }
481481 return ESP_GATT_OK ;
482-
482+
483483}
484484
485485esp_gatt_status_t btc_ble_gattc_get_include_service (uint16_t conn_id ,
@@ -588,7 +588,7 @@ static void btc_gattc_read_char_descr(btc_ble_gattc_args_t *arg)
588588
589589static void btc_gattc_write_char (btc_ble_gattc_args_t * arg )
590590{
591- BTA_GATTC_WriteCharValue (arg -> write_char .conn_id ,
591+ BTA_GATTC_WriteCharValue (arg -> write_char .conn_id ,
592592 arg -> write_char .handle ,
593593 arg -> write_char .write_type ,
594594 arg -> write_char .value_len ,
@@ -603,7 +603,7 @@ static void btc_gattc_write_char_descr(btc_ble_gattc_args_t *arg)
603603 descr_val .len = arg -> write_descr .value_len ;
604604 descr_val .p_value = arg -> write_descr .value ;
605605
606- BTA_GATTC_WriteCharDescr (arg -> write_descr .conn_id ,
606+ BTA_GATTC_WriteCharDescr (arg -> write_descr .conn_id ,
607607 arg -> write_descr .handle ,
608608 arg -> write_descr .write_type , & descr_val ,
609609 arg -> write_descr .auth_req );
@@ -671,7 +671,6 @@ void btc_gattc_call_handler(btc_msg_t *msg)
671671 btc_ble_gattc_args_t * arg = (btc_ble_gattc_args_t * )(msg -> arg );
672672 switch (msg -> act ) {
673673 case BTC_GATTC_ACT_APP_REGISTER :
674- LOG_ERROR ("%s()" , __func__ );
675674 btc_gattc_app_register (arg );
676675 break ;
677676 case BTC_GATTC_ACT_APP_UNREGISTER :
0 commit comments