You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following compilation error occurs when using the latest framework-arduinoespressif32 (idf-release/v4.2 branch) and PlatformIO.
This is because driver/adc.h does not include soc/adc_channel.h in EPS-IDF v4.2.
.pio\libdeps\m5paper-test\M5EPD\src\M5EPD.cpp: In member function'voidM5EPD::BatteryADCBegin()':.pio\libdeps\m5paper-test\M5EPD\src\M5EPD.cpp:6:25: error: 'ADC1_GPIO35_CHANNEL' was not declared in this scope #define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL ^~~~~~~~~~~~~~~~~~~.pio\libdeps\m5paper-test\M5EPD\src\M5EPD.cpp:90:31: note: in expansion of macro 'BAT_ADC_CHANNEL' adc1_config_channel_atten(BAT_ADC_CHANNEL, ADC_ATTEN_DB_11); ^~~~~~~~~~~~~~~.pio\libdeps\m5paper-test\M5EPD\src\M5EPD.cpp:6:25: note: suggested alternative: 'ADC1_CHANNEL_7' #define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL ^~~~~~~~~~~~~~~~~~~.pio\libdeps\m5paper-test\M5EPD\src\M5EPD.cpp:90:31: note: in expansion of macro 'BAT_ADC_CHANNEL' adc1_config_channel_atten(BAT_ADC_CHANNEL, ADC_ATTEN_DB_11); ^~~~~~~~~~~~~~~.pio\libdeps\m5paper-test\M5EPD\src\M5EPD.cpp: In member function 'uint32_t M5EPD::getBatteryRaw()':.pio\libdeps\m5paper-test\M5EPD\src\M5EPD.cpp:6:25: error: 'ADC1_GPIO35_CHANNEL' was not declared in this scope #define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL ^~~~~~~~~~~~~~~~~~~.pio\libdeps\m5paper-test\M5EPD\src\M5EPD.cpp:100:25: note: in expansion of macro 'BAT_ADC_CHANNEL' return adc1_get_raw(BAT_ADC_CHANNEL); ^~~~~~~~~~~~~~~.pio\libdeps\m5paper-test\M5EPD\src\M5EPD.cpp:6:25: note: suggested alternative: 'ADC1_CHANNEL_7' #define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL ^~~~~~~~~~~~~~~~~~~.pio\libdeps\m5paper-test\M5EPD\src\M5EPD.cpp:100:25: note: in expansion of macro 'BAT_ADC_CHANNEL' return adc1_get_raw(BAT_ADC_CHANNEL); ^~~~~~~~~~~~~~~.pio\libdeps\m5paper-test\M5EPD\src\M5EPD.cpp: In member function 'uint32_t M5EPD::getBatteryVoltage()':.pio\libdeps\m5paper-test\M5EPD\src\M5EPD.cpp:6:25: error: 'ADC1_GPIO35_CHANNEL' was not declared in this scope #define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL ^~~~~~~~~~~~~~~~~~~.pio\libdeps\m5paper-test\M5EPD\src\M5EPD.cpp:111:39: note: in expansion of macro 'BAT_ADC_CHANNEL' adc_raw_value += adc1_get_raw(BAT_ADC_CHANNEL); ^~~~~~~~~~~~~~~.pio\libdeps\m5paper-test\M5EPD\src\M5EPD.cpp:6:25: note: suggested alternative: 'ADC1_CHANNEL_7' #define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL ^~~~~~~~~~~~~~~~~~~.pio\libdeps\m5paper-test\M5EPD\src\M5EPD.cpp:111:39: note: in expansion of macro 'BAT_ADC_CHANNEL' adc_raw_value += adc1_get_raw(BAT_ADC_CHANNEL); ^~~~~~~~~~~~~~~*** [.pio\build\m5paper-test\lib22e\M5EPD\M5EPD.cpp.o] Error 1
Following compilation error occurs when using the latest framework-arduinoespressif32 (idf-release/v4.2 branch) and PlatformIO.
This is because
driver/adc.h
does not includesoc/adc_channel.h
in EPS-IDF v4.2.See
driver/adc.h
in v3.3 and v4.2.I'll create a PR to fix this issue.
Error
Code example
platformio.ini
src/main.cpp
Build log for
pio run
Environment
The text was updated successfully, but these errors were encountered: