• Home
  • Raw
  • Download

Lines Matching refs:p_scb

52 typedef void (*tBTA_PAN_ACTION)(tBTA_PAN_SCB* p_scb, tBTA_PAN_DATA* p_data);
132 tBTA_PAN_SCB* p_scb = &bta_pan_cb.scb[0]; in bta_pan_scb_alloc() local
135 for (i = 0; i < BTA_PAN_NUM_CONN; i++, p_scb++) { in bta_pan_scb_alloc()
136 if (!p_scb->in_use) { in bta_pan_scb_alloc()
137 p_scb->in_use = true; in bta_pan_scb_alloc()
145 p_scb = NULL; in bta_pan_scb_alloc()
148 return p_scb; in bta_pan_scb_alloc()
161 static void bta_pan_sm_execute(tBTA_PAN_SCB* p_scb, uint16_t event, in bta_pan_sm_execute() argument
167 APPL_TRACE_EVENT("PAN scb=%d event=0x%x state=%d", bta_pan_scb_to_idx(p_scb), in bta_pan_sm_execute()
168 event, p_scb->state); in bta_pan_sm_execute()
171 state_table = bta_pan_st_tbl[p_scb->state]; in bta_pan_sm_execute()
176 p_scb->state = state_table[event][BTA_PAN_NEXT_STATE]; in bta_pan_sm_execute()
183 (*bta_pan_action[action])(p_scb, p_data); in bta_pan_sm_execute()
231 tBTA_PAN_SCB* p_scb; in bta_pan_api_open() local
235 p_scb = bta_pan_scb_alloc(); in bta_pan_api_open()
236 if (p_scb != NULL) { in bta_pan_api_open()
237 bta_pan_open(p_scb, p_data); in bta_pan_api_open()
254 void bta_pan_scb_dealloc(tBTA_PAN_SCB* p_scb) { in bta_pan_scb_dealloc() argument
255 APPL_TRACE_DEBUG("bta_pan_scb_dealloc %d", bta_pan_scb_to_idx(p_scb)); in bta_pan_scb_dealloc()
256 fixed_queue_free(p_scb->data_queue, NULL); in bta_pan_scb_dealloc()
257 memset(p_scb, 0, sizeof(tBTA_PAN_SCB)); in bta_pan_scb_dealloc()
270 uint8_t bta_pan_scb_to_idx(tBTA_PAN_SCB* p_scb) { in bta_pan_scb_to_idx() argument
271 return ((uint8_t)(p_scb - bta_pan_cb.scb)) + 1; in bta_pan_scb_to_idx()
285 tBTA_PAN_SCB* p_scb = &bta_pan_cb.scb[0]; in bta_pan_scb_by_handle() local
288 for (i = 0; i < BTA_PAN_NUM_CONN; i++, p_scb++) { in bta_pan_scb_by_handle()
289 if (p_scb->handle == handle) { in bta_pan_scb_by_handle()
290 return p_scb; in bta_pan_scb_by_handle()
311 tBTA_PAN_SCB* p_scb; in bta_pan_hdl_event() local
338 p_scb = bta_pan_scb_by_handle(p_msg->layer_specific); in bta_pan_hdl_event()
339 if (p_scb != NULL) { in bta_pan_hdl_event()
340 bta_pan_sm_execute(p_scb, p_msg->event, (tBTA_PAN_DATA*)p_msg); in bta_pan_hdl_event()
346 p_scb = bta_pan_scb_by_handle(p_msg->layer_specific); in bta_pan_hdl_event()
347 if (p_scb != NULL) { in bta_pan_hdl_event()
348 bta_pan_sm_execute(p_scb, p_msg->event, (tBTA_PAN_DATA*)p_msg); in bta_pan_hdl_event()