diff options
author | root <root@lamia.panaceas.james.local> | 2015-07-21 08:33:53 +0100 |
---|---|---|
committer | root <root@lamia.panaceas.james.local> | 2015-07-21 08:33:53 +0100 |
commit | 0a8e1c08e10d53f58d9e67d5bca09b8ae6a16c39 (patch) | |
tree | 1a78099f912d094c7793e15ff9de75d1fc9d1253 /polycom_xmit/reset.c | |
download | polycom-0a8e1c08e10d53f58d9e67d5bca09b8ae6a16c39.tar.gz polycom-0a8e1c08e10d53f58d9e67d5bca09b8ae6a16c39.tar.bz2 polycom-0a8e1c08e10d53f58d9e67d5bca09b8ae6a16c39.zip |
fish
Diffstat (limited to 'polycom_xmit/reset.c')
-rw-r--r-- | polycom_xmit/reset.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/polycom_xmit/reset.c b/polycom_xmit/reset.c new file mode 100644 index 0000000..0068d07 --- /dev/null +++ b/polycom_xmit/reset.c @@ -0,0 +1,20 @@ +#include "project.h" +void ICACHE_FLASH_ATTR +reset_init (void) +{ + struct rst_info *rtc_info = system_get_rst_info (); + os_printf ("reset reason: %x\n", rtc_info->reason); + if (rtc_info->reason == REASON_WDT_RST + || rtc_info->reason == REASON_EXCEPTION_RST + || rtc_info->reason == REASON_SOFT_WDT_RST) + { + if (rtc_info->reason == REASON_EXCEPTION_RST) + { + os_printf ("Fatal exception (%d):\n", rtc_info->exccause); + } + os_printf + ("epc1=0x%08x, epc2=0x%08x, epc3=0x%08x, excvaddr=0x%08x, depc=0x%08x\n", + rtc_info->epc1, rtc_info->epc2, rtc_info->epc3, rtc_info->excvaddr, + rtc_info->depc); + } +} |