Prusa3d Marlin fork
xflash_dump.h
1 // XFLASH dumper
2 #pragma once
3 #include "xflash_layout.h"
4 
5 enum class dump_crash_reason : uint8_t
6 {
7  manual = 0,
8  stack_error,
9  watchdog,
10  bad_isr,
11  bad_pullup_temp_isr,
12  bad_pullup_step_isr,
13 };
14 
15 #ifdef XFLASH_DUMP
16 void xfdump_reset(); // reset XFLASH dump state
17 void xfdump_dump(); // create a new SRAM memory dump
18 
19 // return true if a dump is present, save type in "reason" if provided
20 bool xfdump_check_state(dump_crash_reason* reason = NULL);
21 
22 // create a new dump containing registers and SRAM, then reset
23 void xfdump_full_dump_and_reset(dump_crash_reason crash = dump_crash_reason::manual);
24 #endif