When including M5Stack.h, the following warning message is displayed.
In file included from /MY_PATH/Arduino/libraries/M5Stack/src/utility/Power.cpp:10:
/MY_PATH/Arduino/hardware/espressif/esp32/tools/sdk/esp32/include/esp32/include/rom/rtc.h:1:2: warning: #warning rom/rtc.h is deprecated, please use esp32/rom/rtc.h instead [-Wcpp]
#warning rom/rtc.h is deprecated, please use esp32/rom/rtc.h instead
^~~~~~~
When including
M5Stack.h
, the following warning message is displayed.I checked and found that the change in https://github.com/espressif/esp-idf/commit/c1599842646961d448c308aaa8b89d99ed292e4f separates the components of
rom
.The actual library code just includes
esp32/rom/rtc.h
.https://github.com/espressif/esp-idf/blob/639e7ad494d93fc82159f9fe854041bc43a96d5f/components/esp32/include/rom/rtc.h#L1-L2
So I followed the warning and used
esp32/rom/rtc.h
instead ofrom/rtc.h
.