gustavonihei commented on a change in pull request #5904:
URL: https://github.com/apache/incubator-nuttx/pull/5904#discussion_r837707596
##########
File path: include/sys/boardctl.h
##########
@@ -403,6 +410,39 @@ struct boardioc_boot_info_s
};
#endif
+#ifdef CONFIG_BOARDCTL_RESET_CAUSE
+/* Describes the reason of last reset */
+
+enum boardioc_reset_cause_e
+{
+ BOARDIOC_RESETCAUSE_NONE = 0,
+ BOARDIOC_RESETCAUSE_SYS_CHIPPOR, /* chip power on */
+ BOARDIOC_RESETCAUSE_SYS_RWDT, /* RTC watchdog system reset */
+ BOARDIOC_RESETCAUSE_SYS_BOR, /* brown-out system reset */
+ BOARDIOC_RESETCAUSE_CORE_SOFT, /* software core reset */
+ BOARDIOC_RESETCAUSE_CORE_DPSP, /* deep-sleep core reset */
+ BOARDIOC_RESETCAUSE_CORE_MWDT, /* main watchdog core reset */
+ BOARDIOC_RESETCAUSE_CORE_RWDT, /* RTC watchdog core reset */
+ BOARDIOC_RESETCAUSE_CPU_MWDT, /* main watchdog cpu reset */
+ BOARDIOC_RESETCAUSE_CPU_SOFT, /* software cpu reset */
+ BOARDIOC_RESETCAUSE_CPU_RWDT /* RTC watchdog cpu reset */
+};
+
+enum boardioc_softreset_subreason_e
+{
+ BOARDIOC_SOFTRESETCAUSE_USER_REBOOT = 0,
+ BOARDIOC_SOFTRESETCAUSE_PANIC,
+ BOARDIOC_SOFTRESETCAUSE_ASSERT
+};
+
+struct boardioc_reset_cause_s
+{
+ enum boardioc_reset_cause_e cause; /* The reason of last reset */
+ uint32_t flag; /* watchdog number when watchdog reset,
+ or soft-reset subreason */
Review comment:
```suggestion
uint32_t flag; /* watchdog number when watchdog reset,
* or soft-reset subreason */
```
NxStyle expects that asterisk
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]