hci.c (14045fdb85787da21ccc801a05c6d14629ed2d30) hci.c (cf439c632333e81dd9333cf3a18727f91b7a01bf)
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

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

9641 little_endian_store_16(event, pos, cig->cis_con_handles[i]);
9642 pos += 2;
9643 }
9644 hci_emit_event(event, pos, 0);
9645}
9646
9647static void hci_emit_cis_created(uint8_t status, uint8_t cig_id, uint8_t cis_id, hci_con_handle_t cis_con_handle,
9648 hci_con_handle_t acl_con_handle) {
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

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

9641 little_endian_store_16(event, pos, cig->cis_con_handles[i]);
9642 pos += 2;
9643 }
9644 hci_emit_event(event, pos, 0);
9645}
9646
9647static void hci_emit_cis_created(uint8_t status, uint8_t cig_id, uint8_t cis_id, hci_con_handle_t cis_con_handle,
9648 hci_con_handle_t acl_con_handle) {
9649 uint8_t event [7];
9649 uint8_t event [10];
9650 uint16_t pos = 0;
9651 event[pos++] = HCI_EVENT_META_GAP;
9650 uint16_t pos = 0;
9651 event[pos++] = HCI_EVENT_META_GAP;
9652 event[pos++] = 5;
9652 event[pos++] = 8;
9653 event[pos++] = GAP_SUBEVENT_CIS_CREATED;
9654 event[pos++] = status;
9655 event[pos++] = cig_id;
9653 event[pos++] = GAP_SUBEVENT_CIS_CREATED;
9654 event[pos++] = status;
9655 event[pos++] = cig_id;
9656 event[pos++] = cis_id;
9656 little_endian_store_16(event, pos, cis_con_handle);
9657 pos += 2;
9657 little_endian_store_16(event, pos, cis_con_handle);
9658 pos += 2;
9659 little_endian_store_16(event, pos, acl_con_handle);
9660 pos += 2;
9658 hci_emit_event(event, pos, 0);
9659}
9660
9661// emits GAP_SUBEVENT_CIS_CREATED after calling hci_iso_finalize
9662static void hci_cis_handle_created(hci_iso_stream_t * iso_stream, uint8_t status){
9663 // cache data before finalizing struct
9664 uint8_t cig_id = iso_stream->group_id;
9665 uint8_t cis_id = iso_stream->stream_id;

--- 515 unchanged lines hidden ---
9661 hci_emit_event(event, pos, 0);
9662}
9663
9664// emits GAP_SUBEVENT_CIS_CREATED after calling hci_iso_finalize
9665static void hci_cis_handle_created(hci_iso_stream_t * iso_stream, uint8_t status){
9666 // cache data before finalizing struct
9667 uint8_t cig_id = iso_stream->group_id;
9668 uint8_t cis_id = iso_stream->stream_id;

--- 515 unchanged lines hidden ---