Lines Matching refs:btif_hh_cb
112 btif_hh_cb_t btif_hh_cb; variable
338 if (btif_hh_cb.devices[i].dev_status == BTHH_CONN_STATE_CONNECTED && in btif_hh_find_connected_dev_by_handle()
339 btif_hh_cb.devices[i].dev_handle == handle) in btif_hh_find_connected_dev_by_handle()
341 return &btif_hh_cb.devices[i]; in btif_hh_find_connected_dev_by_handle()
359 if (btif_hh_cb.devices[i].dev_status != BTHH_CONN_STATE_UNKNOWN && in btif_hh_find_dev_by_bda()
360 memcmp(&(btif_hh_cb.devices[i].bd_addr), bd_addr, BD_ADDR_LEN) == 0) in btif_hh_find_dev_by_bda()
362 return &btif_hh_cb.devices[i]; in btif_hh_find_dev_by_bda()
380 if (btif_hh_cb.devices[i].dev_status == BTHH_CONN_STATE_CONNECTED && in btif_hh_find_connected_dev_by_bda()
381 memcmp(&(btif_hh_cb.devices[i].bd_addr), bd_addr, BD_ADDR_LEN) == 0) in btif_hh_find_connected_dev_by_bda()
383 return &btif_hh_cb.devices[i]; in btif_hh_find_connected_dev_by_bda()
441 if (memcmp(&(btif_hh_cb.added_devices[i].bd_addr), &bda, BD_ADDR_LEN) == 0) { in btif_hh_add_added_dev()
448 if (btif_hh_cb.added_devices[i].bd_addr.address[0] == 0 && in btif_hh_add_added_dev()
449 btif_hh_cb.added_devices[i].bd_addr.address[1] == 0 && in btif_hh_add_added_dev()
450 btif_hh_cb.added_devices[i].bd_addr.address[2] == 0 && in btif_hh_add_added_dev()
451 btif_hh_cb.added_devices[i].bd_addr.address[3] == 0 && in btif_hh_add_added_dev()
452 btif_hh_cb.added_devices[i].bd_addr.address[4] == 0 && in btif_hh_add_added_dev()
453 btif_hh_cb.added_devices[i].bd_addr.address[5] == 0) in btif_hh_add_added_dev()
457 memcpy(&(btif_hh_cb.added_devices[i].bd_addr), &bda, BD_ADDR_LEN); in btif_hh_add_added_dev()
458 btif_hh_cb.added_devices[i].dev_handle = BTA_HH_INVALID_HANDLE; in btif_hh_add_added_dev()
459 btif_hh_cb.added_devices[i].attr_mask = attr_mask; in btif_hh_add_added_dev()
486 p_added_dev = &btif_hh_cb.added_devices[i]; in btif_hh_remove_device()
510 if (btif_hh_cb.device_num > 0) { in btif_hh_remove_device()
511 btif_hh_cb.device_num--; in btif_hh_remove_device()
602 if (dev == NULL && btif_hh_cb.device_num >= BTIF_HH_MAX_HID) { in btif_hh_connect()
610 if (memcmp(&(btif_hh_cb.added_devices[i].bd_addr), bd_addr, BD_ADDR_LEN) == 0) { in btif_hh_connect()
611 added_dev = &btif_hh_cb.added_devices[i]; in btif_hh_connect()
631 btif_hh_cb.status = BTIF_HH_DEV_CONNECTING; in btif_hh_connect()
713 btif_hh_cb.status = BTIF_HH_ENABLED; in btif_hh_upstreams_evt()
719 btif_hh_cb.status = BTIF_HH_DISABLED; in btif_hh_upstreams_evt()
725 btif_hh_cb.status = BTIF_HH_DISABLED; in btif_hh_upstreams_evt()
730 alarm_free(btif_hh_cb.devices[i].vup_timer); in btif_hh_upstreams_evt()
732 memset(&btif_hh_cb, 0, sizeof(btif_hh_cb)); in btif_hh_upstreams_evt()
734 btif_hh_cb.devices[i].dev_status = BTHH_CONN_STATE_UNKNOWN; in btif_hh_upstreams_evt()
747 btif_hh_cb.status = BTIF_HH_DEV_DISCONNECTED; in btif_hh_upstreams_evt()
757 btif_hh_cb.status = BTIF_HH_DEV_DISCONNECTED; in btif_hh_upstreams_evt()
763 btif_hh_cb.status = BTIF_HH_DEV_CONNECTED; in btif_hh_upstreams_evt()
768 … btif_hh_cb.p_curr_dev = btif_hh_find_connected_dev_by_handle(p_data->conn.handle); in btif_hh_upstreams_evt()
787 btif_hh_cb.status = BTIF_HH_DEV_DISCONNECTED; in btif_hh_upstreams_evt()
807 btif_hh_cb.status = BTIF_HH_DEV_DISCONNECTED; in btif_hh_upstreams_evt()
903 p_dev = btif_hh_cb.p_curr_dev; in btif_hh_upstreams_evt()
995 … if (memcmp(btif_hh_cb.added_devices[i].bd_addr.address, p_data->dev_info.bda, 6) == 0) { in btif_hh_upstreams_evt()
997 btif_hh_cb.added_devices[i].dev_handle = p_data->dev_info.handle; in btif_hh_upstreams_evt()
1000 memset(btif_hh_cb.added_devices[i].bd_addr.address, 0, 6); in btif_hh_upstreams_evt()
1001 btif_hh_cb.added_devices[i].dev_handle = BTA_HH_INVALID_HANDLE; in btif_hh_upstreams_evt()
1019 btif_hh_cb.status = BTIF_HH_DEV_DISCONNECTED; in btif_hh_upstreams_evt()
1190 memset(&btif_hh_cb, 0, sizeof(btif_hh_cb)); in init()
1192 btif_hh_cb.devices[i].dev_status = BTHH_CONN_STATE_UNKNOWN; in init()
1210 if(btif_hh_cb.status != BTIF_HH_DEV_CONNECTING) in connect()
1234 if (btif_hh_cb.status == BTIF_HH_DISABLED) in disconnect()
1236 BTIF_TRACE_WARNING("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status); in disconnect()
1269 if (btif_hh_cb.status == BTIF_HH_DISABLED) in virtual_unplug()
1271 BTIF_TRACE_ERROR("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status); in virtual_unplug()
1308 if (btif_hh_cb.status == BTIF_HH_DISABLED) in set_info()
1310 BTIF_TRACE_ERROR("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status); in set_info()
1353 if (btif_hh_cb.status == BTIF_HH_DISABLED) { in get_protocol()
1354 BTIF_TRACE_ERROR("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status); in get_protocol()
1390 if (btif_hh_cb.status == BTIF_HH_DISABLED) { in set_protocol()
1391 BTIF_TRACE_ERROR("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status); in set_protocol()
1433 if (btif_hh_cb.status == BTIF_HH_DISABLED) { in get_report()
1434 BTIF_TRACE_ERROR("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status); in get_report()
1477 if (btif_hh_cb.status == BTIF_HH_DISABLED) { in set_report()
1478 BTIF_TRACE_ERROR("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status); in set_report()
1539 if (btif_hh_cb.status == BTIF_HH_DISABLED) { in send_data()
1540 BTIF_TRACE_ERROR("%s: Error, HH status = %d", __FUNCTION__, btif_hh_cb.status); in send_data()
1592 if (btif_hh_cb.status == BTIF_HH_DISABLED) { in cleanup()
1593 …RACE_WARNING("%s: HH disabling or disabled already, status = %d", __FUNCTION__, btif_hh_cb.status); in cleanup()
1596 btif_hh_cb.status = BTIF_HH_DISABLING; in cleanup()
1598 p_dev = &btif_hh_cb.devices[i]; in cleanup()