xflash_dump.h 591 B

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