• Home
  • Raw
  • Download

Lines Matching refs:dhandle

49 static void hidh_conn_retry(uint8_t dhandle);
129 tHID_STATUS hidh_conn_disconnect(uint8_t dhandle) { in hidh_conn_disconnect() argument
130 tHID_CONN* p_hcon = &hh_cb.devices[dhandle].conn; in hidh_conn_disconnect()
139 L2CA_SetIdleTimeoutByBdAddr(hh_cb.devices[dhandle].addr, 0, in hidh_conn_disconnect()
292 uint8_t dhandle = PTR_TO_UINT(data); in hidh_process_repage_timer_timeout() local
293 hidh_try_repage(dhandle); in hidh_process_repage_timer_timeout()
305 void hidh_try_repage(uint8_t dhandle) { in hidh_try_repage() argument
308 hidh_conn_initiate(dhandle); in hidh_try_repage()
310 device = &hh_cb.devices[dhandle]; in hidh_try_repage()
313 hh_cb.callback(dhandle, device->addr, HID_HDEV_EVT_RETRYING, in hidh_try_repage()
331 uint8_t dhandle; in hidh_sec_check_complete_orig() local
335 dhandle = (PTR_TO_UINT(p_dev) - PTR_TO_UINT(&(hh_cb.devices[0]))) / in hidh_sec_check_complete_orig()
354 hidh_conn_retry(dhandle); in hidh_sec_check_complete_orig()
361 hidh_conn_disconnect(dhandle); in hidh_sec_check_complete_orig()
377 uint8_t dhandle; in hidh_l2cif_connect_cfm() local
384 dhandle = find_conn_by_cid(l2cap_cid); in hidh_l2cif_connect_cfm()
385 if (dhandle < HID_HOST_MAX_DEVICES) { in hidh_l2cif_connect_cfm()
386 p_dev = &hh_cb.devices[dhandle]; in hidh_l2cif_connect_cfm()
387 p_hcon = &hh_cb.devices[dhandle].conn; in hidh_l2cif_connect_cfm()
407 hidh_conn_disconnect(dhandle); in hidh_l2cif_connect_cfm()
410 if ((hh_cb.devices[dhandle].conn_tries <= HID_HOST_MAX_CONN_RETRY) && in hidh_l2cif_connect_cfm()
413 hidh_conn_retry(dhandle); in hidh_l2cif_connect_cfm()
418 hh_cb.callback(dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_CLOSE, in hidh_l2cif_connect_cfm()
458 uint8_t dhandle; in hidh_l2cif_config_ind() local
463 dhandle = find_conn_by_cid(l2cap_cid); in hidh_l2cif_config_ind()
464 if (dhandle < HID_HOST_MAX_DEVICES) { in hidh_l2cif_config_ind()
465 p_hcon = &hh_cb.devices[dhandle].conn; in hidh_l2cif_config_ind()
499 L2CA_ConnectReq(HID_PSM_INTERRUPT, hh_cb.devices[dhandle].addr); in hidh_l2cif_config_ind()
504 hidh_conn_disconnect(dhandle); in hidh_l2cif_config_ind()
505 hh_cb.callback(dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_CLOSE, in hidh_l2cif_config_ind()
526 hh_cb.devices[dhandle].state = HID_DEV_CONNECTED; in hidh_l2cif_config_ind()
527 hh_cb.callback(dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_OPEN, 0, in hidh_l2cif_config_ind()
543 uint8_t dhandle; in hidh_l2cif_config_cfm() local
551 dhandle = find_conn_by_cid(l2cap_cid); in hidh_l2cif_config_cfm()
552 if (dhandle < HID_HOST_MAX_DEVICES) p_hcon = &hh_cb.devices[dhandle].conn; in hidh_l2cif_config_cfm()
562 hidh_conn_disconnect(dhandle); in hidh_l2cif_config_cfm()
564 hh_cb.callback(dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_CLOSE, in hidh_l2cif_config_cfm()
579 L2CA_ConnectReq(HID_PSM_INTERRUPT, hh_cb.devices[dhandle].addr); in hidh_l2cif_config_cfm()
584 hidh_conn_disconnect(dhandle); in hidh_l2cif_config_cfm()
585 hh_cb.callback(dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_CLOSE, in hidh_l2cif_config_cfm()
606 hh_cb.devices[dhandle].state = HID_DEV_CONNECTED; in hidh_l2cif_config_cfm()
607 hh_cb.callback(dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_OPEN, 0, in hidh_l2cif_config_cfm()
623 uint8_t dhandle; in hidh_l2cif_disconnect_ind() local
629 dhandle = find_conn_by_cid(l2cap_cid); in hidh_l2cif_disconnect_ind()
630 if (dhandle < HID_HOST_MAX_DEVICES) p_hcon = &hh_cb.devices[dhandle].conn; in hidh_l2cif_disconnect_ind()
650 hh_cb.devices[dhandle].state = HID_DEV_NO_CONN; in hidh_l2cif_disconnect_ind()
658 (!(hh_cb.devices[dhandle].attr_mask & HID_RECONN_INIT)) && in hidh_l2cif_disconnect_ind()
659 (hh_cb.devices[dhandle].attr_mask & HID_NORMALLY_CONNECTABLE)) { in hidh_l2cif_disconnect_ind()
660 hh_cb.devices[dhandle].conn_tries = 0; in hidh_l2cif_disconnect_ind()
662 alarm_set_on_mloop(hh_cb.devices[dhandle].conn.process_repage_timer, in hidh_l2cif_disconnect_ind()
664 UINT_TO_PTR(dhandle)); in hidh_l2cif_disconnect_ind()
665 hh_cb.callback(dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_CLOSE, in hidh_l2cif_disconnect_ind()
686 hh_cb.callback(dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_CLOSE, in hidh_l2cif_disconnect_ind()
703 uint8_t dhandle; in hidh_l2cif_disconnect_cfm() local
707 dhandle = find_conn_by_cid(l2cap_cid); in hidh_l2cif_disconnect_cfm()
708 if (dhandle < HID_HOST_MAX_DEVICES) p_hcon = &hh_cb.devices[dhandle].conn; in hidh_l2cif_disconnect_cfm()
729 hh_cb.devices[dhandle].state = HID_DEV_NO_CONN; in hidh_l2cif_disconnect_cfm()
731 hh_cb.callback(dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_CLOSE, in hidh_l2cif_disconnect_cfm()
746 uint8_t dhandle; in hidh_l2cif_cong_ind() local
750 dhandle = find_conn_by_cid(l2cap_cid); in hidh_l2cif_cong_ind()
751 if (dhandle < HID_HOST_MAX_DEVICES) p_hcon = &hh_cb.devices[dhandle].conn; in hidh_l2cif_cong_ind()
788 uint8_t dhandle; in hidh_l2cif_data_ind() local
795 dhandle = find_conn_by_cid(l2cap_cid); in hidh_l2cif_data_ind()
796 if (dhandle < HID_HOST_MAX_DEVICES) p_hcon = &hh_cb.devices[dhandle].conn; in hidh_l2cif_data_ind()
824 hh_cb.callback(dhandle, hh_cb.devices[dhandle].addr, in hidh_l2cif_data_ind()
832 hidh_conn_disconnect(dhandle); in hidh_l2cif_data_ind()
834 hh_cb.callback(dhandle, hh_cb.devices[dhandle].addr, in hidh_l2cif_data_ind()
845 evt = (hh_cb.devices[dhandle].conn.intr_cid == l2cap_cid) in hidh_l2cif_data_ind()
848 hh_cb.callback(dhandle, hh_cb.devices[dhandle].addr, evt, rep_type, in hidh_l2cif_data_ind()
853 evt = (hh_cb.devices[dhandle].conn.intr_cid == l2cap_cid) in hidh_l2cif_data_ind()
856 hh_cb.callback(dhandle, hh_cb.devices[dhandle].addr, evt, rep_type, in hidh_l2cif_data_ind()
875 tHID_STATUS hidh_conn_snd_data(uint8_t dhandle, uint8_t trans_type, in hidh_conn_snd_data() argument
878 tHID_CONN* p_hcon = &hh_cb.devices[dhandle].conn; in hidh_conn_snd_data()
889 if (!BTM_IsAclConnectionUp(hh_cb.devices[dhandle].addr, in hidh_conn_snd_data()
997 tHID_STATUS hidh_conn_initiate(uint8_t dhandle) { in hidh_conn_initiate() argument
1001 tHID_HOST_DEV_CTB* p_dev = &hh_cb.devices[dhandle]; in hidh_conn_initiate()
1025 hh_cb.callback(dhandle, hh_cb.devices[dhandle].addr, HID_HDEV_EVT_CLOSE, in hidh_conn_initiate()
1073 static void hidh_conn_retry(uint8_t dhandle) { in hidh_conn_retry() argument
1074 tHID_HOST_DEV_CTB* p_dev = &hh_cb.devices[dhandle]; in hidh_conn_retry()
1080 hidh_process_repage_timer_timeout, UINT_TO_PTR(dhandle)); in hidh_conn_retry()
1082 hidh_try_repage(dhandle); in hidh_conn_retry()