hci: add hci_send_iso_packet_buffer

This commit is contained in:
Matthias Ringwald 2022-03-07 20:12:32 +01:00
parent 26d7634cac
commit ace087123b
2 changed files with 19 additions and 0 deletions

View File

@ -973,6 +973,20 @@ uint8_t hci_send_sco_packet_buffer(int size){
}
#endif
#ifdef ENABLE_BLE
uint8_t hci_send_iso_packet_buffer(uint16_t size){
btstack_assert(hci_stack->hci_packet_buffer_reserved);
uint8_t * packet = hci_stack->hci_packet_buffer;
// TODO: check for space on controller
// TODO: track outgoing packet sent
hci_dump_packet( HCI_ISO_DATA_PACKET, 0, packet, size);
int err = hci_stack->hci_transport->send_packet(HCI_ISO_DATA_PACKET, packet, size);
return (err == 0) ? ERROR_CODE_SUCCESS : ERROR_CODE_HARDWARE_FAILURE;
}
#endif
static void acl_handler(uint8_t *packet, uint16_t size){
// get info

View File

@ -1308,6 +1308,11 @@ bool hci_can_send_prepared_sco_packet_now(void);
*/
uint8_t hci_send_sco_packet_buffer(int size);
/**
* @brief Send ISO packet prepared in HCI packet buffer
*/
uint8_t hci_send_iso_packet_buffer(uint16_t size);
/**
* Reserves outgoing packet buffer.
* @return true on success