Merge branch 'bugfix/fix_ble_adv_tx_power_map' into 'master'

Fix ble adv tx power map

Closes IDFGH-8299

See merge request espressif/esp-idf!20225
This commit is contained in:
Chen Jian Hua 2022-09-23 16:03:12 +08:00
commit 76834a767f
2 changed files with 13 additions and 1 deletions

View File

@ -1197,15 +1197,27 @@
#endif
#ifndef BTM_BLE_ADV_TX_POWER
#ifdef CONFIG_IDF_TARGET_ESP32
#define BTM_BLE_ADV_TX_POWER {-12, -9, -6, -3, 0, 3, 6, 9}
#else
#define BTM_BLE_ADV_TX_POWER {-24, -21, -18, -15, -12, -9, -6, -3, 0, 3, 6, 9, 12, 15, 18, 21}
#endif
#endif
#ifndef BTM_TX_POWER
#ifdef CONFIG_IDF_TARGET_ESP32
#define BTM_TX_POWER {-12, -9, -6, -3, 0, 3, 6, 9}
#else
#define BTM_TX_POWER {-24, -21, -18, -15, -12, -9, -6, -3, 0, 3, 6, 9, 12, 15, 18, 21}
#endif
#endif
#ifndef BTM_TX_POWER_LEVEL_MAX
#ifdef CONFIG_IDF_TARGET_ESP32
#define BTM_TX_POWER_LEVEL_MAX 7
#else
#define BTM_TX_POWER_LEVEL_MAX 15
#endif
#endif

View File

@ -385,7 +385,7 @@ typedef UINT8 tBTM_BLE_AD_TYPE;
/* adv tx power level */
#define BTM_BLE_ADV_TX_POWER_MIN 0 /* minimum tx power */
#define BTM_BLE_ADV_TX_POWER_MAX 7 /* maximum tx power */
#define BTM_BLE_ADV_TX_POWER_MAX BTM_TX_POWER_LEVEL_MAX /* maximum tx power */
typedef UINT8 tBTM_BLE_ADV_TX_POWER;
/* adv tx power in dBm */