hid_host.c (d1b426c456eb73e94195c6173afaae613468854f) hid_host.c (113d01ce21aa6cd2cd43087aa324436aeb97cc9c)
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 342 unchanged lines hidden (view full) ---

351 connection->hid_cid = hid_host_get_next_cid();
352 connection->control_cid = 0;
353 connection->control_psm = 0;
354 connection->interrupt_cid = 0;
355 connection->interrupt_psm = 0;
356 connection->con_handle = HCI_CON_HANDLE_INVALID;
357
358 (void)memcpy(connection->remote_addr, remote_addr, 6);
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 342 unchanged lines hidden (view full) ---

351 connection->hid_cid = hid_host_get_next_cid();
352 connection->control_cid = 0;
353 connection->control_psm = 0;
354 connection->interrupt_cid = 0;
355 connection->interrupt_psm = 0;
356 connection->con_handle = HCI_CON_HANDLE_INVALID;
357
358 (void)memcpy(connection->remote_addr, remote_addr, 6);
359 btstack_linked_list_add(&hid_host_connections, (btstack_linked_item_t *) connection);
359 btstack_linked_list_add_tail(&hid_host_connections, (btstack_linked_item_t *) connection);
360 return connection;
361}
362
363static hid_host_connection_t * hid_host_get_connection_for_bd_addr(bd_addr_t addr){
364 btstack_linked_list_iterator_t it;
365 btstack_linked_list_iterator_init(&it, &hid_host_connections);
366 while (btstack_linked_list_iterator_has_next(&it)){
367 hid_host_connection_t * connection = (hid_host_connection_t *)btstack_linked_list_iterator_next(&it);

--- 1074 unchanged lines hidden ---
360 return connection;
361}
362
363static hid_host_connection_t * hid_host_get_connection_for_bd_addr(bd_addr_t addr){
364 btstack_linked_list_iterator_t it;
365 btstack_linked_list_iterator_init(&it, &hid_host_connections);
366 while (btstack_linked_list_iterator_has_next(&it)){
367 hid_host_connection_t * connection = (hid_host_connection_t *)btstack_linked_list_iterator_next(&it);

--- 1074 unchanged lines hidden ---