userial_read_thread(userial.c)
- 从串口读取数据
- utils_enqueue将数据缓存到userial_cb.rx_q
hci_h4_receive_msg(hci_h4.c,也可能是hci_h5.c或者hci_mct.c)
- 调用userial_read读取串口信息
- bt_hc_cbacks->data_ind将消息发送出去
- bt_hc_cbacks 对应 hc_callbacks(bte_main.c)
- data_ind(bte_main.c)
- GKI_send_msg (BTU_TASK, BTU_HCI_RCV_MBOX, transac);
- data_ind(bte_main.c)
- bt_hc_cbacks 对应 hc_callbacks(bte_main.c)
userial_read(userial.c)
- 将userial_cb.rx_q中的消息读出放入到p_buffer中
btu_task(btu_task.c)
- while循环
- p_msg = (BT_HDR *) GKI_read_mbox (BTU_HCI_RCV_MBOX)
- switch (p_msg->event & BT_EVT_MASK)
- l2c_rcv_acl_data(BT_EVT_TO_BTU_HCI_ACL)
- l2c_link_segments_xmitted(BT_EVT_TO_BTU_L2C_SEG_XMIT)
- btm_route_sco_data(BT_EVT_TO_BTU_HCI_SCO)
- btu_hcif_process_event(BT_EVT_TO_BTU_HCI_EVT)
- case HCI_BLE_EVENT
- btu_ble_ll_conn_complete_evt
- btm_ble_conn_complete
- l2c_link_hci_disc_comp
- pL2CA_FixedConn_Cb(gatt_le_connect_cback)
- l2c_link_hci_disc_comp
- btm_ble_conn_complete
- btu_ble_ll_conn_complete_evt
- case HCI_BLE_EVENT
- btu_hcif_send_cmd(BT_EVT_TO_BTU_HCI_CMD)
- obx_sr_proc_evt(BT_EVT_TO_OBX_SR_MSG
bta_gattc_sm_execute
- bta_gattc_action(错误状态下会调到bta_gattc_open_fail)
bta_gattc_open_fail(bta_gattc_act.c)
- bta_gattc_send_open_cback(BTA_GATT_ERROR)
GKI_read_mbox(gki_buffer.c)
- 从gki_cb.com.OSTaskQFirst[task_id][mbox]读取
GKI_send_msg
- 将消息放入p_cb->OSTaskQFirst[task_id][mbox]