Home | History | Annotate | Download | only in srvc

Lines Matching defs:p_inst

51     tBA_INST    *p_inst = &battery_cb.battery_inst[0];
53 for (;i < BA_MAX_INT_NUM; i ++, p_inst++)
55 if (handle == p_inst->ba_level_hdl ||
56 handle == p_inst->clt_cfg_hdl ||
57 handle == p_inst->rpt_ref_hdl ||
58 handle == p_inst->pres_fmt_hdl )
75 tBA_INST *p_inst = &battery_cb.battery_inst[0];
80 for (i = 0; i < BA_MAX_INT_NUM; i ++, p_inst ++)
83 if (handle == p_inst->clt_cfg_hdl)
88 if (p_inst->p_cback)
90 p_inst->pending_clcb_idx = clcb_idx;
91 p_inst->pending_evt = BA_WRITE_CLT_CFG_REQ;
92 p_inst->pending_handle = handle;
96 (* p_inst->p_cback)(p_inst->app_id, BA_WRITE_CLT_CFG_REQ, &cfg);
115 tBA_INST *p_inst = &battery_cb.battery_inst[0];
120 for (i = 0; i < BA_MAX_INT_NUM; i ++, p_inst ++)
123 if (handle == p_inst->ba_level_hdl ||
124 handle == p_inst->clt_cfg_hdl ||
125 handle == p_inst->rpt_ref_hdl ||
126 handle == p_inst->pres_fmt_hdl)
131 if (p_inst->p_cback)
133 if (handle == p_inst->ba_level_hdl) p_inst->pending_evt = BA_READ_LEVEL_REQ;
134 if (handle == p_inst->clt_cfg_hdl) p_inst->pending_evt = BA_READ_CLT_CFG_REQ;
135 if (handle == p_inst->pres_fmt_hdl) p_inst->pending_evt = BA_READ_PRE_FMT_REQ;
136 if (handle == p_inst->rpt_ref_hdl) p_inst->pending_evt = BA_READ_RPT_REF_REQ ;
138 p_inst->pending_clcb_idx = clcb_idx;
139 p_inst->pending_handle = handle;
142 (* p_inst->p_cback)(p_inst->app_id, p_inst->pending_evt, NULL);
203 tBA_INST *p_inst;
212 p_inst = &battery_cb.battery_inst[battery_cb.inst_id];
228 p_inst->app_id = app_id;
229 p_inst->p_cback = p_reg_info->p_cback;
238 if ((p_inst->ba_level_hdl = GATTS_AddCharacteristic(srvc_hdl,
251 p_inst->clt_cfg_hdl = GATTS_AddCharDescriptor(srvc_hdl,
254 if (p_inst->clt_cfg_hdl == 0)
263 if ( (p_inst->pres_fmt_hdl = GATTS_AddCharDescriptor(srvc_hdl,
276 if ( (p_inst->rpt_ref_hdl = GATTS_AddCharDescriptor(srvc_hdl,
309 tBA_INST *p_inst = &battery_cb.battery_inst[0];
316 if (p_inst->app_id == app_id && p_inst->ba_level_hdl != 0)
326 if (p_inst->pending_evt == event)
331 rsp.attr_value.handle = p_inst->pending_handle;
335 srvc_sr_rsp(p_inst->pending_clcb_idx, st, &rsp);
339 rsp.attr_value.handle = p_inst->pending_handle;
343 srvc_sr_rsp(p_inst->pending_clcb_idx, st, &rsp);
347 srvc_sr_rsp(p_inst->pending_clcb_idx, st, NULL);
351 rsp.attr_value.handle = p_inst->pending_handle;
356 srvc_sr_rsp(p_inst->pending_clcb_idx, st, &rsp);
362 p_inst->pending_clcb_idx = 0;
363 p_inst->pending_evt = 0;
364 p_inst->pending_handle = 0;
377 tBA_INST *p_inst = &battery_cb.battery_inst[0];
382 if (p_inst->app_id == app_id && p_inst->ba_level_hdl != 0)
387 if (i == BA_MAX_INT_NUM || p_inst->clt_cfg_hdl == 0)
390 srvc_sr_notify(remote_bda, p_inst->ba_level_hdl, 1, &battery_level);