Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20c2ae29 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "BT5.3 Enhanced Connection update -- prerequisite" am: 300ebb7d

parents d78519f1 300ebb7d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -810,7 +810,8 @@ static const btgatt_server_callbacks_t sGattServerCallbacks = {
    btgatts_congestion_cb,
    btgatts_mtu_changed_cb,
    btgatts_phy_updated_cb,
    btgatts_conn_updated_cb};
    btgatts_conn_updated_cb,
};

/**
 * GATT callbacks
+2 −1
Original line number Diff line number Diff line
@@ -86,7 +86,8 @@ static tGATT_CBACK bta_gattc_cl_cback = {
    .p_enc_cmpl_cb = bta_gattc_enc_cmpl_cback,
    .p_congestion_cb = bta_gattc_cong_cback,
    .p_phy_update_cb = bta_gattc_phy_update_cback,
    .p_conn_update_cb = bta_gattc_conn_update_cback};
    .p_conn_update_cb = bta_gattc_conn_update_cback,
};

/* opcode(tGATTC_OPTYPE) order has to be comply with internal event order */
static uint16_t bta_gattc_opcode_to_int_evt[] = {
+0 −2
Original line number Diff line number Diff line
@@ -95,8 +95,6 @@ inline std::string gatt_client_event_text(const tBTA_GATTC_EVT& event) {
    CASE_RETURN_TEXT(BTA_GATTC_CONGEST_EVT);
    CASE_RETURN_TEXT(BTA_GATTC_PHY_UPDATE_EVT);
    CASE_RETURN_TEXT(BTA_GATTC_CONN_UPDATE_EVT);
    default:
      return base::StringPrintf("UNKNOWN[%hhu]", event);
  }
}
#undef CASE_RETURN_TEXT
+3 −39
Original line number Diff line number Diff line
@@ -106,46 +106,9 @@ namespace {

uint8_t rssi_request_client_if;

std::string bta_gattc_event_text(const tBTA_GATTC_EVT& event) {
  switch (event) {
    case BTA_GATTC_DEREG_EVT:
      return std::string("GATT client deregistered");
    case BTA_GATTC_OPEN_EVT:
      return std::string("GATTC open request status");
    case BTA_GATTC_CLOSE_EVT:
      return std::string("GATTC close request status");
    case BTA_GATTC_SEARCH_CMPL_EVT:
      return std::string("GATT discovery complete");
    case BTA_GATTC_SEARCH_RES_EVT:
      return std::string("GATT discovery result");
    case BTA_GATTC_SRVC_DISC_DONE_EVT:
      return std::string("GATT service discovery done");
    case BTA_GATTC_NOTIF_EVT:
      return std::string("GATT attribute notification");
    case BTA_GATTC_EXEC_EVT:
      return std::string("execute write complete");
    case BTA_GATTC_ACL_EVT:
      return std::string("ACL up");
    case BTA_GATTC_CANCEL_OPEN_EVT:
      return std::string("cancel open");
    case BTA_GATTC_SRVC_CHG_EVT:
      return std::string("service change");
    case BTA_GATTC_ENC_CMPL_CB_EVT:
      return std::string("encryption complete callback");
    case BTA_GATTC_CFG_MTU_EVT:
      return std::string("configure MTU complete");
    case BTA_GATTC_CONGEST_EVT:
      return std::string("congestion");
    case BTA_GATTC_PHY_UPDATE_EVT:
      return std::string("PHY change");
    case BTA_GATTC_CONN_UPDATE_EVT:
      return std::string("connection parameters update");
  }
}

static void btif_gattc_upstreams_evt(uint16_t event, char* p_param) {
  LOG_DEBUG("Event %s [%d]",
            bta_gattc_event_text(static_cast<tBTA_GATTC_EVT>(event)).c_str(),
            gatt_client_event_text(static_cast<tBTA_GATTC_EVT>(event)).c_str(),
            event);

  tBTA_GATTC* p_data = (tBTA_GATTC*)p_param;
@@ -709,4 +672,5 @@ const btgatt_client_interface_t btgattClientInterface = {
    btif_gattc_set_preferred_phy,
    btif_gattc_read_phy,
    btif_gattc_test_command,
    btif_gattc_get_gatt_db};
    btif_gattc_get_gatt_db,
};
+11 −9
Original line number Diff line number Diff line
@@ -158,7 +158,8 @@ static void btif_test_discovery_complete_cback(
  LOG_INFO("%s: status=%d", __func__, status);
}

static tGATT_CBACK btif_test_callbacks = {btif_test_connect_cback,
static tGATT_CBACK btif_test_callbacks = {
    btif_test_connect_cback,
    btif_test_command_complete_cback,
    btif_test_discovery_result_cback,
    btif_test_discovery_complete_cback,
@@ -166,7 +167,8 @@ static tGATT_CBACK btif_test_callbacks = {btif_test_connect_cback,
    NULL,
    NULL,
    NULL,
                                          NULL};
    NULL,
};

/*******************************************************************************
 * Implementation
Loading