Lines Matching refs:i
65 uint8_t i; in bta_gatts_alloc_srvc_cb() local
67 for (i = 0; i < BTA_GATTS_MAX_SRVC_NUM; i++) { in bta_gatts_alloc_srvc_cb()
68 if (!p_cb->srvc_cb[i].in_use) { in bta_gatts_alloc_srvc_cb()
69 p_cb->srvc_cb[i].in_use = true; in bta_gatts_alloc_srvc_cb()
70 p_cb->srvc_cb[i].rcb_idx = rcb_idx; in bta_gatts_alloc_srvc_cb()
71 return i; in bta_gatts_alloc_srvc_cb()
87 uint8_t i; in bta_gatts_find_app_rcb_by_app_if() local
90 for (i = 0, p_reg = bta_gatts_cb.rcb; i < BTA_GATTS_MAX_APP_NUM; in bta_gatts_find_app_rcb_by_app_if()
91 i++, p_reg++) { in bta_gatts_find_app_rcb_by_app_if()
110 uint8_t i; in bta_gatts_find_app_rcb_idx_by_app_if() local
112 for (i = 0; i < BTA_GATTS_MAX_APP_NUM; i++) { in bta_gatts_find_app_rcb_idx_by_app_if()
113 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()
128 uint8_t i; in bta_gatts_find_srvc_cb_by_srvc_id() local
131 for (i = 0; i < BTA_GATTS_MAX_SRVC_NUM; i++) { in bta_gatts_find_srvc_cb_by_srvc_id()
132 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()
134 "bta_gatts_find_srvc_cb_by_srvc_id found service cb index =%d", i); in bta_gatts_find_srvc_cb_by_srvc_id()
135 return &p_cb->srvc_cb[i]; in bta_gatts_find_srvc_cb_by_srvc_id()
151 uint8_t i; in bta_gatts_find_srvc_cb_by_attr_id() local
153 for (i = 0; i < (BTA_GATTS_MAX_SRVC_NUM); i++) { in bta_gatts_find_srvc_cb_by_attr_id()
155 (i < (BTA_GATTS_MAX_SRVC_NUM - 1) && p_cb->srvc_cb[i].in_use && in bta_gatts_find_srvc_cb_by_attr_id()
156 p_cb->srvc_cb[i + 1].in_use && in bta_gatts_find_srvc_cb_by_attr_id()
157 attr_id >= p_cb->srvc_cb[i].service_id && in bta_gatts_find_srvc_cb_by_attr_id()
158 attr_id < p_cb->srvc_cb[i + 1].service_id) || in bta_gatts_find_srvc_cb_by_attr_id()
160 (i < (BTA_GATTS_MAX_SRVC_NUM - 1) && p_cb->srvc_cb[i].in_use && in bta_gatts_find_srvc_cb_by_attr_id()
161 !p_cb->srvc_cb[i + 1].in_use && in bta_gatts_find_srvc_cb_by_attr_id()
162 attr_id >= p_cb->srvc_cb[i].service_id) || in bta_gatts_find_srvc_cb_by_attr_id()
164 (i == (BTA_GATTS_MAX_SRVC_NUM - 1) && in bta_gatts_find_srvc_cb_by_attr_id()
165 attr_id >= p_cb->srvc_cb[i].service_id)) { in bta_gatts_find_srvc_cb_by_attr_id()
166 return &p_cb->srvc_cb[i]; in bta_gatts_find_srvc_cb_by_attr_id()