From 0ea2847f670798a860846cdb167a18dc730d7b33 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Fri, 7 Jul 2017 16:38:07 +0200 Subject: [PATCH] hci: add command templates for LE Data Length commands --- src/hci_cmd.c | 34 ++++++++++++++++++++++++++++++++++ src/hci_cmd.h | 5 +++++ 2 files changed, 39 insertions(+) diff --git a/src/hci_cmd.c b/src/hci_cmd.c index 16f43ef9d..961972259 100644 --- a/src/hci_cmd.c +++ b/src/hci_cmd.c @@ -1076,6 +1076,33 @@ OPCODE(OGF_LE_CONTROLLER, 0x1f), "1" // return: status, number of packets (8) }; +/** + * @param con_handle + * @param tx_octets + * @param tx_time + */ +const hci_cmd_t hci_le_set_data_length = { +OPCODE(OGF_LE_CONTROLLER, 0x22), "H22" +// return: status, connection handle +}; + + +/** + */ +const hci_cmd_t hci_le_read_suggested_default_data_length = { +OPCODE(OGF_LE_CONTROLLER, 0x23), "" +// return: status, suggested max tx octets, suggested max tx time +}; + +/** + * @param suggested_max_tx_octets + * @param suggested_max_tx_time + */ +const hci_cmd_t hci_le_write_suggested_default_data_length = { +OPCODE(OGF_LE_CONTROLLER, 0x24), "" +// return: status +}; + /** */ const hci_cmd_t hci_le_read_local_p256_public_key = { @@ -1093,6 +1120,13 @@ OPCODE(OGF_LE_CONTROLLER, 0x26), "QQ" }; #endif +/** + */ +const hci_cmd_t hci_le_read_maximum_data_length = { +OPCODE(OGF_LE_CONTROLLER, 0x2F), "" +// return: status, supported max tx octets, supported max tx time, supported max rx octets, supported max rx time +}; + #endif // Broadcom / Cypress specific HCI commands diff --git a/src/hci_cmd.h b/src/hci_cmd.h index 13f9f22f5..ea1bb91d3 100644 --- a/src/hci_cmd.h +++ b/src/hci_cmd.h @@ -171,7 +171,10 @@ extern const hci_cmd_t hci_le_read_advertising_channel_tx_power; extern const hci_cmd_t hci_le_read_buffer_size ; extern const hci_cmd_t hci_le_read_channel_map; extern const hci_cmd_t hci_le_read_local_p256_public_key; +extern const hci_cmd_t hci_le_read_local_p256_public_key; +extern const hci_cmd_t hci_le_read_maximum_data_length; extern const hci_cmd_t hci_le_read_remote_used_features; +extern const hci_cmd_t hci_le_read_suggested_default_data_length; extern const hci_cmd_t hci_le_read_supported_features; extern const hci_cmd_t hci_le_read_supported_states; extern const hci_cmd_t hci_le_read_white_list_size; @@ -180,6 +183,7 @@ extern const hci_cmd_t hci_le_remove_device_from_white_list; extern const hci_cmd_t hci_le_set_advertise_enable; extern const hci_cmd_t hci_le_set_advertising_data; extern const hci_cmd_t hci_le_set_advertising_parameters; +extern const hci_cmd_t hci_le_set_data_length; extern const hci_cmd_t hci_le_set_event_mask; extern const hci_cmd_t hci_le_set_host_channel_classification; extern const hci_cmd_t hci_le_set_random_address; @@ -189,6 +193,7 @@ extern const hci_cmd_t hci_le_set_scan_response_data; extern const hci_cmd_t hci_le_start_encryption; extern const hci_cmd_t hci_le_test_end; extern const hci_cmd_t hci_le_transmitter_test; +extern const hci_cmd_t hci_le_write_suggested_default_data_length; // Broadcom / Cypress specific HCI commands extern const hci_cmd_t hci_bcm_write_sco_pcm_int;