@@ -2645,30 +2645,6 @@ void Wippersnapper::publish(const char *topic, uint8_t *payload, uint16_t bLen,
2645
2645
}
2646
2646
2647
2647
#ifdef ARDUINO_ARCH_ESP32
2648
-
2649
- #if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
2650
- #include " esp32/rom/rtc.h"
2651
- #elif CONFIG_IDF_TARGET_ESP32S2
2652
- #include " esp32s2/rom/rtc.h"
2653
- #elif CONFIG_IDF_TARGET_ESP32C2
2654
- #include " esp32c2/rom/rtc.h"
2655
- #elif CONFIG_IDF_TARGET_ESP32C3
2656
- #include " esp32c3/rom/rtc.h"
2657
- #elif CONFIG_IDF_TARGET_ESP32S3
2658
- #include " esp32s3/rom/rtc.h"
2659
- #elif CONFIG_IDF_TARGET_ESP32C6
2660
- #include " esp32c6/rom/rtc.h"
2661
- #elif CONFIG_IDF_TARGET_ESP32H2
2662
- #include " esp32h2/rom/rtc.h"
2663
- #else
2664
- #error Target CONFIG_IDF_TARGET is not supported
2665
- #endif
2666
-
2667
- void get_and_print_reset_reason_for_cpu (int cpuCore) {
2668
- print_reset_reason (rtc_get_reset_reason (cpuCore));
2669
- }
2670
-
2671
-
2672
2648
/* *************************************************************/
2673
2649
/* !
2674
2650
@brief Prints string reset reason of ESP32
@@ -2730,8 +2706,38 @@ void print_reset_reason(int reason) {
2730
2706
WS_DEBUG_PRINTLN (" NO_MEAN" );
2731
2707
}
2732
2708
}
2709
+
2710
+ #if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
2711
+ #include " esp32/rom/rtc.h"
2712
+ #elif CONFIG_IDF_TARGET_ESP32S2
2713
+ #include " esp32s2/rom/rtc.h"
2714
+ #elif CONFIG_IDF_TARGET_ESP32C2
2715
+ #include " esp32c2/rom/rtc.h"
2716
+ #elif CONFIG_IDF_TARGET_ESP32C3
2717
+ #include " esp32c3/rom/rtc.h"
2718
+ #elif CONFIG_IDF_TARGET_ESP32S3
2719
+ #include " esp32s3/rom/rtc.h"
2720
+ #elif CONFIG_IDF_TARGET_ESP32C6
2721
+ #include " esp32c6/rom/rtc.h"
2722
+ #elif CONFIG_IDF_TARGET_ESP32H2
2723
+ #include " esp32h2/rom/rtc.h"
2724
+ #else
2725
+ #error Target CONFIG_IDF_TARGET is not supported
2733
2726
#endif
2734
2727
2728
+ /* *************************************************************************/
2729
+ /* !
2730
+ @brief Prints the reason why the ESP32 CPU was reset.
2731
+ @param cpuCore
2732
+ The core number to print the reset reason for.
2733
+ */
2734
+ /* *************************************************************************/
2735
+ void get_and_print_reset_reason_for_cpu (int cpuCore) {
2736
+ print_reset_reason (rtc_get_reset_reason (cpuCore));
2737
+ }
2738
+
2739
+ #endif // ARDUINO_ARCH_ESP32
2740
+
2735
2741
/* *************************************************************************/
2736
2742
/* !
2737
2743
@brief Prints information about the WS device to the serial monitor.
0 commit comments