ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
coredump.h
Go to the documentation of this file.
1#pragma once
3
5
7inline constexpr const char *CRASH_LOG_TAG = "zephyr_coredump";
8
10bool coredump_pending();
14void print_coredump();
18void stop_coredump();
19
20class Coredump : public Component {
21 public:
22 void setup() override;
23 void loop() override;
24 void dump_config() override;
25
26 protected:
27 friend bool coredump_pending();
28 friend void print_coredump();
29 friend void stop_coredump();
31 void start_print_();
32 void stop_print_();
33 void finish_(int err);
34
38 int verify_{0}; // result of verifying the stored dump, 1 when it is good
39 bool stored_{false};
40 bool printing_{false};
41};
42
43} // namespace esphome::zephyr_coredump
friend void print_coredump()
A log reader is present: serial at boot, USB CDC when the port opens, an API or MQTT client subscribi...
Definition coredump.cpp:37
void start_print_()
Start printing after a short delay, one line per loop so the USB CDC transmit buffer and the main loo...
Definition coredump.cpp:67
friend bool coredump_pending()
Whether a dump from before this boot is waiting to be printed.
Definition coredump.cpp:35
friend void stop_coredump()
The reader went away (the USB port was closed); the print stops and the dump stays for the next one.
Definition coredump.cpp:43
bool coredump_pending()
Whether a dump from before this boot is waiting to be printed.
Definition coredump.cpp:35
void print_coredump()
A log reader is present: serial at boot, USB CDC when the port opens, an API or MQTT client subscribi...
Definition coredump.cpp:37
constexpr const char * CRASH_LOG_TAG
The tag the dump is logged under, so a client can check the level in force for it.
Definition coredump.h:7
void stop_coredump()
The reader went away (the USB port was closed); the print stops and the dump stays for the next one.
Definition coredump.cpp:43
static void uint32_t