Lines Matching refs:i
44 uint8_t i; in bta_gatts_alloc_srvc_cb() local
46 for (i = 0; i < BTA_GATTS_MAX_SRVC_NUM; i++) { in bta_gatts_alloc_srvc_cb()
47 if (!p_cb->srvc_cb[i].in_use) { in bta_gatts_alloc_srvc_cb()
48 p_cb->srvc_cb[i].in_use = true; in bta_gatts_alloc_srvc_cb()
49 p_cb->srvc_cb[i].rcb_idx = rcb_idx; in bta_gatts_alloc_srvc_cb()
50 return i; in bta_gatts_alloc_srvc_cb()
66 uint8_t i; in bta_gatts_find_app_rcb_by_app_if() local
69 for (i = 0, p_reg = bta_gatts_cb.rcb; i < BTA_GATTS_MAX_APP_NUM; in bta_gatts_find_app_rcb_by_app_if()
70 i++, p_reg++) { in bta_gatts_find_app_rcb_by_app_if()
89 uint8_t i; in bta_gatts_find_app_rcb_idx_by_app_if() local
91 for (i = 0; i < BTA_GATTS_MAX_APP_NUM; i++) { in bta_gatts_find_app_rcb_idx_by_app_if()
92 if (p_cb->rcb[i].in_use && p_cb->rcb[i].gatt_if == server_if) return i; in bta_gatts_find_app_rcb_idx_by_app_if()
107 uint8_t i; in bta_gatts_find_srvc_cb_by_srvc_id() local
109 for (i = 0; i < BTA_GATTS_MAX_SRVC_NUM; i++) { in bta_gatts_find_srvc_cb_by_srvc_id()
110 if (p_cb->srvc_cb[i].in_use && p_cb->srvc_cb[i].service_id == service_id) { in bta_gatts_find_srvc_cb_by_srvc_id()
111 VLOG(1) << __func__ << ": found service cb index=" << +i; in bta_gatts_find_srvc_cb_by_srvc_id()
112 return &p_cb->srvc_cb[i]; in bta_gatts_find_srvc_cb_by_srvc_id()
128 uint8_t i; in bta_gatts_find_srvc_cb_by_attr_id() local
130 for (i = 0; i < (BTA_GATTS_MAX_SRVC_NUM); i++) { in bta_gatts_find_srvc_cb_by_attr_id()
132 (i < (BTA_GATTS_MAX_SRVC_NUM - 1) && p_cb->srvc_cb[i].in_use && in bta_gatts_find_srvc_cb_by_attr_id()
133 p_cb->srvc_cb[i + 1].in_use && in bta_gatts_find_srvc_cb_by_attr_id()
134 attr_id >= p_cb->srvc_cb[i].service_id && in bta_gatts_find_srvc_cb_by_attr_id()
135 attr_id < p_cb->srvc_cb[i + 1].service_id) || in bta_gatts_find_srvc_cb_by_attr_id()
137 (i < (BTA_GATTS_MAX_SRVC_NUM - 1) && p_cb->srvc_cb[i].in_use && in bta_gatts_find_srvc_cb_by_attr_id()
138 !p_cb->srvc_cb[i + 1].in_use && in bta_gatts_find_srvc_cb_by_attr_id()
139 attr_id >= p_cb->srvc_cb[i].service_id) || in bta_gatts_find_srvc_cb_by_attr_id()
141 (i == (BTA_GATTS_MAX_SRVC_NUM - 1) && in bta_gatts_find_srvc_cb_by_attr_id()
142 attr_id >= p_cb->srvc_cb[i].service_id)) { in bta_gatts_find_srvc_cb_by_attr_id()
143 return &p_cb->srvc_cb[i]; in bta_gatts_find_srvc_cb_by_attr_id()