fix ble adv tx power map

This commit is contained in:
chenjianhua
2022-09-19 11:23:05 +08:00
parent 7a324e2984
commit b904278330
2 changed files with 13 additions and 1 deletions

View File

@ -1165,15 +1165,27 @@
#endif
#ifndef BTM_BLE_ADV_TX_POWER
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S3)
#define BTM_BLE_ADV_TX_POWER {-12, -9, -6, -3, 0, 3, 6, 9}
#else
#define BTM_BLE_ADV_TX_POWER {-27, -21, -18, -15, -12, -9, -6, -3, 0, 3, 6, 9, 12, 15, 18}
#endif
#endif
#ifndef BTM_TX_POWER
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S3)
#define BTM_TX_POWER {-12, -9, -6, -3, 0, 3, 6, 9}
#else
#define BTM_TX_POWER {-27, -24, -21, -18, -15, -12, -9, -6, -3, 0, 3, 6, 9, 12, 15, 18}
#endif
#endif
#ifndef BTM_TX_POWER_LEVEL_MAX
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S3)
#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 */