This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push:
new e83b12c NimBLE host: Make LE data length set API public
e83b12c is described below
commit e83b12c03dd770dbc722a0fa21b9c5dc30069f10
Author: Prasad Alatkar <[email protected]>
AuthorDate: Tue Jan 5 20:40:48 2021 +0530
NimBLE host: Make LE data length set API public
* Add public API `ble_gap_set_data_len` to set data length in controller.
---
nimble/host/include/host/ble_gap.h | 16 ++++++++++++++++
nimble/host/src/ble_gap.c | 5 +++++
2 files changed, 21 insertions(+)
diff --git a/nimble/host/include/host/ble_gap.h
b/nimble/host/include/host/ble_gap.h
index 20f9e30..ec795f0 100644
--- a/nimble/host/include/host/ble_gap.h
+++ b/nimble/host/include/host/ble_gap.h
@@ -1802,6 +1802,22 @@ int ble_gap_update_params(uint16_t conn_handle,
const struct ble_gap_upd_params *params);
/**
+ * Configure LE Data Length in controller (OGF = 0x08, OCF = 0x0022).
+ *
+ * @param conn_handle Connection handle.
+ * @param tx_octets The preferred value of payload octets that the
Controller
+ * should use for a new connection (Range
+ * 0x001B-0x00FB).
+ * @param tx_time The preferred maximum number of microseconds that
the local Controller
+ * should use to transmit a single link layer packet
+ * (Range 0x0148-0x4290).
+ *
+ * @return 0 on success,
+ * other error code on failure.
+ */
+int ble_gap_set_data_len(uint16_t conn_handle, uint16_t tx_octets, uint16_t
tx_time);
+
+/**
* Initiates the GAP security procedure.
*
* Depending on connection role and stored security information this function
diff --git a/nimble/host/src/ble_gap.c b/nimble/host/src/ble_gap.c
index 45747ff..8e56df1 100644
--- a/nimble/host/src/ble_gap.c
+++ b/nimble/host/src/ble_gap.c
@@ -5535,6 +5535,11 @@ done:
#endif
}
+int ble_gap_set_data_len(uint16_t conn_handle, uint16_t tx_octets, uint16_t
tx_time)
+{
+ return ble_hs_hci_util_set_data_len(conn_handle, tx_octets, tx_time);
+}
+
/*****************************************************************************
* $security *
*****************************************************************************/