gustavonihei commented on a change in pull request #4822:
URL: https://github.com/apache/incubator-nuttx/pull/4822#discussion_r748636159



##########
File path: boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_reset.c
##########
@@ -55,6 +58,23 @@
 
 int board_reset(int status)
 {
+#ifdef CONFIG_BOARD_ASSERT_RESET_VALUE
+  syslog(LOG_INFO, "reboot status=%d\n", status);
+
+  switch (status)
+    {
+      case EXIT_SUCCESS:
+        up_shutdown_handler();
+        break;
+      case CONFIG_BOARD_ASSERT_RESET_VALUE:
+        break;
+      default:
+        break;
+    }
+#else
+  up_shutdown_handler();
+#endif

Review comment:
       ```suggestion
     syslog(LOG_INFO, "reboot status=%d\n", status);
   
     switch (status)
       {
         case EXIT_SUCCESS:
           up_shutdown_handler();
           break;
         case CONFIG_BOARD_ASSERT_RESET_VALUE:
           break;
         default:
           break;
       }
   #endif
   ```
   `BOARD_ASSERT_RESET_VALUE` depends on `BOARDCTL_RESET`, so the `#else` 
clause will never really happen and can be removed.




-- 
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]


Reply via email to