mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-11-22 05:00:55 +01:00
Re-enable data length extension newer IDF versions.
This commit is contained in:
parent
ea6e2101e3
commit
830c4cc39e
2 changed files with 4 additions and 2 deletions
|
@ -464,7 +464,8 @@ void NimBLEClient::updateConnParams(uint16_t minInterval, uint16_t maxInterval,
|
||||||
* @param [in] tx_octets The preferred number of payload octets to use (Range 0x001B-0x00FB).
|
* @param [in] tx_octets The preferred number of payload octets to use (Range 0x001B-0x00FB).
|
||||||
*/
|
*/
|
||||||
void NimBLEClient::setDataLen(uint16_t tx_octets) {
|
void NimBLEClient::setDataLen(uint16_t tx_octets) {
|
||||||
#ifdef CONFIG_NIMBLE_CPP_IDF // not yet available in IDF, Sept 9 2021
|
#if defined(CONFIG_NIMBLE_CPP_IDF) && defined(ESP_IDF_VERSION) && \
|
||||||
|
ESP_IDF_VERSION <= ESP_IDF_VERSION_VAL(4,3,2)
|
||||||
return;
|
return;
|
||||||
#else
|
#else
|
||||||
uint16_t tx_time = (tx_octets + 14) * 8;
|
uint16_t tx_time = (tx_octets + 14) * 8;
|
||||||
|
|
|
@ -785,7 +785,8 @@ void NimBLEServer::updateConnParams(uint16_t conn_handle,
|
||||||
* @param [in] tx_octets The preferred number of payload octets to use (Range 0x001B-0x00FB).
|
* @param [in] tx_octets The preferred number of payload octets to use (Range 0x001B-0x00FB).
|
||||||
*/
|
*/
|
||||||
void NimBLEServer::setDataLen(uint16_t conn_handle, uint16_t tx_octets) {
|
void NimBLEServer::setDataLen(uint16_t conn_handle, uint16_t tx_octets) {
|
||||||
#ifdef CONFIG_NIMBLE_CPP_IDF // not yet available in IDF, Sept 9 2021
|
#if defined(CONFIG_NIMBLE_CPP_IDF) && defined(ESP_IDF_VERSION) && \
|
||||||
|
ESP_IDF_VERSION <= ESP_IDF_VERSION_VAL(4,3,2)
|
||||||
return;
|
return;
|
||||||
#else
|
#else
|
||||||
uint16_t tx_time = (tx_octets + 14) * 8;
|
uint16_t tx_time = (tx_octets + 14) * 8;
|
||||||
|
|
Loading…
Reference in a new issue