NimBLE host: Make LE data length set API public

* Add public API `ble_gap_set_data_len` to set data length in controller.
This commit is contained in:
Prasad Alatkar
2021-01-05 20:40:48 +05:30
parent d1c75df860
commit f8b53fb319
2 changed files with 21 additions and 0 deletions
+16
View File
@@ -1821,6 +1821,22 @@ int ble_gap_wl_tx_rmv(const ble_addr_t *addrs);
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.
*
+5
View File
@@ -5612,6 +5612,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 *
*****************************************************************************/