Skip to content

Commit 2ea44c6

Browse files
committed
Doxgen + reorder methods
1 parent 1d6fb07 commit 2ea44c6

File tree

1 file changed

+30
-24
lines changed

1 file changed

+30
-24
lines changed

src/Wippersnapper.cpp

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2645,30 +2645,6 @@ void Wippersnapper::publish(const char *topic, uint8_t *payload, uint16_t bLen,
26452645
}
26462646

26472647
#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-
26722648
/**************************************************************/
26732649
/*!
26742650
@brief Prints string reset reason of ESP32
@@ -2730,8 +2706,38 @@ void print_reset_reason(int reason) {
27302706
WS_DEBUG_PRINTLN("NO_MEAN");
27312707
}
27322708
}
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
27332726
#endif
27342727

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+
27352741
/**************************************************************************/
27362742
/*!
27372743
@brief Prints information about the WS device to the serial monitor.

0 commit comments

Comments
 (0)