hci.c (5daaa52e388abb3cc207ac4644a68ed8bd1323f4) hci.c (8f4649e3ba0a9d21085f42b688929492b3ab33b7)
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

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

810}
811#endif
812
813// used for internal checks in l2cap.c
814bool hci_is_packet_buffer_reserved(void){
815 return hci_stack->hci_packet_buffer_reserved;
816}
817
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

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

810}
811#endif
812
813// used for internal checks in l2cap.c
814bool hci_is_packet_buffer_reserved(void){
815 return hci_stack->hci_packet_buffer_reserved;
816}
817
818// reserves outgoing packet buffer.
819// @return 1 if successful
820bool hci_reserve_packet_buffer(void){
818void hci_reserve_packet_buffer(void){
821 btstack_assert(hci_stack->hci_packet_buffer_reserved == false);
822 hci_stack->hci_packet_buffer_reserved = true;
819 btstack_assert(hci_stack->hci_packet_buffer_reserved == false);
820 hci_stack->hci_packet_buffer_reserved = true;
823 return true;
824}
825
826void hci_release_packet_buffer(void){
827 btstack_assert(hci_stack->hci_packet_buffer_reserved);
828 hci_stack->hci_packet_buffer_reserved = false;
829 hci_emit_transport_packet_sent();
830}
831

--- 9954 unchanged lines hidden ---
821}
822
823void hci_release_packet_buffer(void){
824 btstack_assert(hci_stack->hci_packet_buffer_reserved);
825 hci_stack->hci_packet_buffer_reserved = false;
826 hci_emit_transport_packet_sent();
827}
828

--- 9954 unchanged lines hidden ---