From de7a7b41b74dafadb445557a6ea362015d8d60a1 Mon Sep 17 00:00:00 2001 From: Roshan Bangar Date: Mon, 27 Feb 2023 11:18:57 +0530 Subject: [PATCH] NimBLE : Correct macro usage --- .../bt/host/nimble/esp-hci/src/esp_nimble_hci.c | 2 +- components/bt/host/nimble/nimble | 2 +- .../bt/host/nimble/port/include/esp_nimble_cfg.h | 11 +++++++++-- components/bt/include/esp32c2/include/esp_bt_cfg.h | 2 +- components/bt/include/esp32c6/include/esp_bt_cfg.h | 2 +- components/bt/include/esp32h2/include/esp_bt_cfg.h | 2 +- components/bt/include/esp32h4/include/esp_bt_cfg.h | 2 +- 7 files changed, 15 insertions(+), 8 deletions(-) diff --git a/components/bt/host/nimble/esp-hci/src/esp_nimble_hci.c b/components/bt/host/nimble/esp-hci/src/esp_nimble_hci.c index 1cb06db49d..40b8a65364 100644 --- a/components/bt/host/nimble/esp-hci/src/esp_nimble_hci.c +++ b/components/bt/host/nimble/esp-hci/src/esp_nimble_hci.c @@ -148,7 +148,7 @@ static void ble_hci_rx_acl(uint8_t *data, uint16_t len) } do { - m = ble_transport_alloc_acl_from_hs(); + m = ble_transport_alloc_acl_from_ll(); if (!m) { ESP_LOGD(TAG,"Failed to allocate buffer, retrying \n"); diff --git a/components/bt/host/nimble/nimble b/components/bt/host/nimble/nimble index 46591d402d..2c3ca76948 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit 46591d402d5a321707caa40d9b033a7109838283 +Subproject commit 2c3ca76948c71c32fce2a25698c58323d83b3c19 diff --git a/components/bt/host/nimble/port/include/esp_nimble_cfg.h b/components/bt/host/nimble/port/include/esp_nimble_cfg.h index a62654339c..f4bf25cc57 100644 --- a/components/bt/host/nimble/port/include/esp_nimble_cfg.h +++ b/components/bt/host/nimble/port/include/esp_nimble_cfg.h @@ -77,6 +77,13 @@ /*** nimble */ #if CONFIG_BT_NIMBLE_ENABLED +#ifndef MYNEWT_VAL_BLE_TRANSPORT_HS__native +#define MYNEWT_VAL_BLE_TRANSPORT_HS__native (1) +#endif + +#ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__native +#define MYNEWT_VAL_BLE_TRANSPORT_LL__native (0) +#endif #ifndef CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT #define BLE_50_FEATURE_SUPPORT (0) @@ -836,7 +843,7 @@ /* Value copied from BLE_TRANSPORT_ACL_COUNT */ #ifndef MYNEWT_VAL_BLE_TRANSPORT_ACL_FROM_LL_COUNT -#define MYNEWT_VAL_BLE_TRANSPORT_ACL_FROM_LL_COUNT (0) +#define MYNEWT_VAL_BLE_TRANSPORT_ACL_FROM_LL_COUNT CONFIG_BT_NIMBLE_ACL_BUF_COUNT #endif #ifndef MYNEWT_VAL_BLE_TRANSPORT_ACL_SIZE @@ -1597,7 +1604,7 @@ #endif #ifndef MYNEWT_VAL_BLE_TRANSPORT_ACL_FROM_HS_COUNT -#define MYNEWT_VAL_BLE_TRANSPORT_ACL_FROM_HS_COUNT CONFIG_BT_NIMBLE_ACL_BUF_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_ACL_FROM_HS_COUNT (0) #endif diff --git a/components/bt/include/esp32c2/include/esp_bt_cfg.h b/components/bt/include/esp32c2/include/esp_bt_cfg.h index 305a535a38..814ec9d4e5 100644 --- a/components/bt/include/esp32c2/include/esp_bt_cfg.h +++ b/components/bt/include/esp32c2/include/esp_bt_cfg.h @@ -33,7 +33,7 @@ extern "C" { #define DEFAULT_BT_LE_MAX_PERIODIC_SYNCS MYNEWT_VAL(BLE_MAX_PERIODIC_SYNCS) #define DEFAULT_BT_LE_MAX_CONNECTIONS MYNEWT_VAL(BLE_MAX_CONNECTIONS) #define DEFAULT_BT_LE_ACL_BUF_SIZE MYNEWT_VAL(BLE_TRANSPORT_ACL_SIZE) - #define DEFAULT_BT_LE_ACL_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_ACL_FROM_HS_COUNT) + #define DEFAULT_BT_LE_ACL_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_ACL_FROM_LL_COUNT) #define DEFAULT_BT_LE_HCI_EVT_BUF_SIZE MYNEWT_VAL(BLE_TRANSPORT_EVT_SIZE) #define DEFAULT_BT_LE_EXT_ADV_MAX_SIZE MYNEWT_VAL(BLE_EXT_ADV_MAX_SIZE) #define DEFAULT_BT_LE_MAX_EXT_ADV_INSTANCES MYNEWT_VAL(BLE_MULTI_ADV_INSTANCES) diff --git a/components/bt/include/esp32c6/include/esp_bt_cfg.h b/components/bt/include/esp32c6/include/esp_bt_cfg.h index 329128be98..64567bccaf 100644 --- a/components/bt/include/esp32c6/include/esp_bt_cfg.h +++ b/components/bt/include/esp32c6/include/esp_bt_cfg.h @@ -32,7 +32,7 @@ extern "C" { #define DEFAULT_BT_LE_MAX_PERIODIC_SYNCS MYNEWT_VAL(BLE_MAX_PERIODIC_SYNCS) #define DEFAULT_BT_LE_MAX_CONNECTIONS MYNEWT_VAL(BLE_MAX_CONNECTIONS) #define DEFAULT_BT_LE_ACL_BUF_SIZE MYNEWT_VAL(BLE_TRANSPORT_ACL_SIZE) - #define DEFAULT_BT_LE_ACL_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_ACL_FROM_HS_COUNT) + #define DEFAULT_BT_LE_ACL_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_ACL_FROM_LL_COUNT) #define DEFAULT_BT_LE_HCI_EVT_BUF_SIZE MYNEWT_VAL(BLE_TRANSPORT_EVT_SIZE) #define DEFAULT_BT_LE_EXT_ADV_MAX_SIZE MYNEWT_VAL(BLE_EXT_ADV_MAX_SIZE) #define DEFAULT_BT_LE_MAX_EXT_ADV_INSTANCES MYNEWT_VAL(BLE_MULTI_ADV_INSTANCES) diff --git a/components/bt/include/esp32h2/include/esp_bt_cfg.h b/components/bt/include/esp32h2/include/esp_bt_cfg.h index d9037f7bd5..ab2734aa40 100644 --- a/components/bt/include/esp32h2/include/esp_bt_cfg.h +++ b/components/bt/include/esp32h2/include/esp_bt_cfg.h @@ -32,7 +32,7 @@ extern "C" { #define DEFAULT_BT_LE_MAX_PERIODIC_SYNCS MYNEWT_VAL(BLE_MAX_PERIODIC_SYNCS) #define DEFAULT_BT_LE_MAX_CONNECTIONS MYNEWT_VAL(BLE_MAX_CONNECTIONS) #define DEFAULT_BT_LE_ACL_BUF_SIZE MYNEWT_VAL(BLE_TRANSPORT_ACL_SIZE) - #define DEFAULT_BT_LE_ACL_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_ACL_FROM_HS_COUNT) + #define DEFAULT_BT_LE_ACL_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_ACL_FROM_LL_COUNT) #define DEFAULT_BT_LE_HCI_EVT_BUF_SIZE MYNEWT_VAL(BLE_TRANSPORT_EVT_SIZE) #define DEFAULT_BT_LE_EXT_ADV_MAX_SIZE MYNEWT_VAL(BLE_EXT_ADV_MAX_SIZE) #define DEFAULT_BT_LE_MAX_EXT_ADV_INSTANCES MYNEWT_VAL(BLE_MULTI_ADV_INSTANCES) diff --git a/components/bt/include/esp32h4/include/esp_bt_cfg.h b/components/bt/include/esp32h4/include/esp_bt_cfg.h index 2891c27b4f..28d1854d83 100644 --- a/components/bt/include/esp32h4/include/esp_bt_cfg.h +++ b/components/bt/include/esp32h4/include/esp_bt_cfg.h @@ -34,7 +34,7 @@ extern "C" { #define DEFAULT_BT_LE_MAX_PERIODIC_SYNCS MYNEWT_VAL(BLE_MAX_PERIODIC_SYNCS) #define DEFAULT_BT_LE_MAX_CONNECTIONS MYNEWT_VAL(BLE_MAX_CONNECTIONS) #define DEFAULT_BT_LE_ACL_BUF_SIZE MYNEWT_VAL(BLE_TRANSPORT_ACL_SIZE) - #define DEFAULT_BT_LE_ACL_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_ACL_FROM_HS_COUNT) + #define DEFAULT_BT_LE_ACL_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_ACL_FROM_LL_COUNT) #define DEFAULT_BT_LE_HCI_EVT_BUF_SIZE MYNEWT_VAL(BLE_TRANSPORT_EVT_SIZE) #define DEFAULT_BT_LE_EXT_ADV_MAX_SIZE MYNEWT_VAL(BLE_EXT_ADV_MAX_SIZE) #define DEFAULT_BT_LE_MAX_EXT_ADV_INSTANCES MYNEWT_VAL(BLE_MULTI_ADV_INSTANCES)