xflash_dump.h 574 B

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