mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-11-21 20:50:55 +01:00
Re: Account for differences in IDF version.
This commit is contained in:
parent
c002920e37
commit
ab073737ba
1 changed files with 9 additions and 8 deletions
|
@ -508,10 +508,10 @@ int NimBLEDevice::getPower() {
|
|||
return -21;
|
||||
case ESP_PWR_LVL_N18:
|
||||
return -18;
|
||||
# endif
|
||||
# endif
|
||||
case ESP_PWR_LVL_N15:
|
||||
return -15;
|
||||
# endif
|
||||
case ESP_PWR_LVL_N12:
|
||||
return -12;
|
||||
case ESP_PWR_LVL_N9:
|
||||
|
@ -543,15 +543,16 @@ int NimBLEDevice::getPower() {
|
|||
# endif
|
||||
case ESP_PWR_LVL_P18:
|
||||
return 18;
|
||||
# if !defined(CONFIG_IDF_TARGET_ESP32H2) \
|
||||
|| (defined(CONFIG_IDF_TARGET_ESP32C6) && ESP_IDF_VERSION == ESP_IDF_VERSION_VAL(5,1,0)) \
|
||||
&& !(defined(CONFIG_IDF_TARGET_ESP32C3) && (ESP_IDF_VERSION == ESP_IDF_VERSION_VAL(5,1,5) || ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5,4,0))) \
|
||||
&& !(defined(CONFIG_IDF_TARGET_ESP32C2) && (ESP_IDF_VERSION == ESP_IDF_VERSION_VAL(5,1,0) || ESP_IDF_VERSION == ESP_IDF_VERSION_VAL(5,1,1)))
|
||||
case ESP_PWR_LVL_P21:
|
||||
return 21;
|
||||
# else
|
||||
# if defined(CONFIG_IDF_TARGET_ESP32H2) \
|
||||
|| (defined(CONFIG_IDF_TARGET_ESP32C6) && ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(5,1,0)) \
|
||||
|| (defined(CONFIG_IDF_TARGET_ESP32C2) && ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(5,2,0)) \
|
||||
|| ((defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)) \
|
||||
&& (ESP_IDF_VERSION == ESP_IDF_VERSION_VAL(5,1,5) || ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5,4,0)))
|
||||
case ESP_PWR_LVL_P20:
|
||||
return 20;
|
||||
# else
|
||||
case ESP_PWR_LVL_P21:
|
||||
return 21;
|
||||
# endif
|
||||
# endif
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue