Lines Matching refs:p_ccb
43 tAVCT_CCB* p_ccb = &avct_cb.ccb[0]; in avct_ccb_alloc() local
46 for (i = 0; i < AVCT_NUM_CONN; i++, p_ccb++) { in avct_ccb_alloc()
47 if (!p_ccb->allocated) { in avct_ccb_alloc()
48 p_ccb->allocated = AVCT_ALOC_LCB; in avct_ccb_alloc()
49 memcpy(&p_ccb->cc, p_cc, sizeof(tAVCT_CC)); in avct_ccb_alloc()
57 p_ccb = NULL; in avct_ccb_alloc()
60 return p_ccb; in avct_ccb_alloc()
74 void avct_ccb_dealloc(tAVCT_CCB* p_ccb, uint8_t event, uint16_t result, in avct_ccb_dealloc() argument
76 tAVCT_CTRL_CBACK* p_cback = p_ccb->cc.p_ctrl_cback; in avct_ccb_dealloc()
78 AVCT_TRACE_DEBUG("avct_ccb_dealloc %d", avct_ccb_to_idx(p_ccb)); in avct_ccb_dealloc()
80 if (p_ccb->p_bcb == NULL) { in avct_ccb_dealloc()
81 memset(p_ccb, 0, sizeof(tAVCT_CCB)); in avct_ccb_dealloc()
85 avct_bcb_event(p_ccb->p_bcb, AVCT_LCB_UL_UNBIND_EVT, in avct_ccb_dealloc()
86 (tAVCT_LCB_EVT*)&p_ccb); in avct_ccb_dealloc()
87 p_ccb->p_lcb = NULL; in avct_ccb_dealloc()
91 (*p_cback)(avct_ccb_to_idx(p_ccb), event, result, bd_addr); in avct_ccb_dealloc()
105 uint8_t avct_ccb_to_idx(tAVCT_CCB* p_ccb) { in avct_ccb_to_idx() argument
107 return (uint8_t)(p_ccb - avct_cb.ccb); in avct_ccb_to_idx()
121 tAVCT_CCB* p_ccb; in avct_ccb_by_idx() local
125 p_ccb = &avct_cb.ccb[idx]; in avct_ccb_by_idx()
128 if (!p_ccb->allocated) { in avct_ccb_by_idx()
129 p_ccb = NULL; in avct_ccb_by_idx()
133 p_ccb = NULL; in avct_ccb_by_idx()
136 return p_ccb; in avct_ccb_by_idx()