Home | History | Annotate | Download | only in gatt

Lines Matching defs:p_tcb

48 void gatt_send_prepare_write(tGATT_TCB  *p_tcb, tGATT_CLCB *p_clcb);
116 st = attp_send_cl_msg(p_clcb->p_tcb, p_clcb->clcb_idx, op_code, &cl_req);
138 tGATT_TCB *p_tcb = p_clcb->p_tcb;
207 rt = attp_send_cl_msg(p_tcb, p_clcb->clcb_idx, op_code, &msg);
226 tGATT_TCB *p_tcb = p_clcb->p_tcb;
237 rt = gatt_send_write_msg(p_tcb,
247 if (p_attr->len <= (p_tcb->payload_size - GATT_HDR_SIZE))
251 rt = gatt_send_write_msg(p_tcb,
261 gatt_send_prepare_write(p_tcb, p_clcb);
266 gatt_send_prepare_write(p_tcb, p_clcb);
297 void gatt_send_queue_write_cancel (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, tGATT_EXEC_FLAG flag)
303 rt = attp_send_cl_msg(p_tcb, p_clcb->clcb_idx, GATT_REQ_EXEC_WRITE, (tGATT_CL_MSG *)&flag);
319 BOOLEAN gatt_check_write_long_terminate(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, tGATT_VALUE *p_rsp_value)
348 gatt_send_queue_write_cancel (p_tcb, p_clcb, flag);
362 void gatt_send_prepare_write(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb)
372 if (to_send > (p_tcb->payload_size - GATT_WRITE_LONG_HDR_SIZE)) /* 2 = UINT16 offset bytes */
373 to_send = p_tcb->payload_size - GATT_WRITE_LONG_HDR_SIZE;
385 rt = gatt_send_write_msg(p_tcb,
413 void gatt_process_find_type_value_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT16 len, UINT8 *p_data)
418 UNUSED(p_tcb);
458 void gatt_process_read_info_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
464 UNUSED(p_tcb);
517 void gatt_proc_disc_error_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 opcode,
522 UNUSED(p_tcb);
557 void gatt_process_error_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
574 gatt_proc_disc_error_rsp(p_tcb, p_clcb, opcode, handle, reason);
585 gatt_send_queue_write_cancel(p_tcb, p_clcb, GATT_PREP_WRITE_CANCEL);
610 void gatt_process_prep_write_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
642 if (!gatt_check_write_long_terminate(p_tcb, p_clcb, &value))
643 gatt_send_prepare_write(p_tcb, p_clcb);
658 void gatt_process_notification(tGATT_TCB *p_tcb, UINT8 op_code,
684 attp_send_cl_msg(p_tcb, 0, GATT_HANDLE_VALUE_CONF, NULL);
690 if (p_tcb->ind_count)
697 GATT_TRACE_ERROR("gatt_process_notification rcv Ind. but ind_count=%d (will reset ind_count)", p_tcb->ind_count);
699 p_tcb->ind_count = 0;
709 p_tcb->ind_count++;
715 if (p_tcb->ind_count > 0)
716 gatt_start_ind_ack_timer(p_tcb);
718 attp_send_cl_msg(p_tcb, 0, GATT_HANDLE_VALUE_CONF, NULL);
721 encrypt_status = gatt_get_link_encrypt_status(p_tcb);
726 conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, p_reg->gatt_if);
744 void gatt_process_read_by_type_rsp (tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
765 if ((value_len > (p_tcb->payload_size - 2)) || (value_len > (len-1)) )
770 op_code, value_len, (p_tcb->payload_size - 2), (len-1));
861 if ( p_clcb->counter == (p_clcb->p_tcb->payload_size -4))
946 void gatt_process_read_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT8 op_code,
980 if (len == (p_tcb->payload_size - 1) && /* full packet for read or read blob rsp */
1050 void gatt_process_mtu_rsp(tGATT_TCB *p_tcb, tGATT_CLCB *p_clcb, UINT16 len, UINT8 *p_data)
1064 if (mtu < p_tcb->payload_size && mtu >= GATT_DEF_BLE_MTU_SIZE)
1065 p_tcb->payload_size = mtu;
1099 BOOLEAN gatt_cl_send_next_cmd_inq(tGATT_TCB *p_tcb)
1101 tGATT_CMD_Q *p_cmd = &p_tcb->cl_cmd_q[p_tcb->pending_cl_req];
1108 p_tcb->pending_cl_req != p_tcb->next_slot_inq &&
1111 att_ret = attp_send_msg_to_l2cap(p_tcb, p_cmd->p_cmd);
1126 p_clcb = gatt_cmd_dequeue(p_tcb, &rsp_code);
1132 p_cmd = &p_tcb->cl_cmd_q[p_tcb->pending_cl_req];
1142 p_tcb->pending_cl_req ++;
1143 p_cmd = &p_tcb->cl_cmd_q[p_tcb->pending_cl_req];
1161 void gatt_client_handle_server_rsp (tGATT_TCB *p_tcb, UINT8 op_code,
1169 p_clcb = gatt_cmd_dequeue(p_tcb, &rsp_code);
1188 if (len >= p_tcb->payload_size)
1190 GATT_TRACE_ERROR("invalid response/indicate pkt size: %d, PDU size: %d", len + 1, p_tcb->payload_size);
1200 gatt_process_error_rsp(p_tcb, p_clcb, op_code, len, p_data);
1204 gatt_process_mtu_rsp(p_tcb, p_clcb, len ,p_data);
1208 gatt_process_read_info_rsp(p_tcb, p_clcb, op_code, len, p_data);
1213 gatt_process_read_by_type_rsp(p_tcb, p_clcb, op_code, len, p_data);
1219 gatt_process_read_rsp(p_tcb, p_clcb, op_code, len, p_data);
1223 gatt_process_find_type_value_rsp(p_tcb, p_clcb, len, p_data);
1231 gatt_process_prep_write_rsp(p_tcb, p_clcb, op_code, len, p_data);
1240 gatt_process_notification(p_tcb, op_code, len, p_data);
1251 gatt_cl_send_next_cmd_inq(p_tcb);