You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "adamfeuer (via GitHub)" <gi...@apache.org> on 2023/03/18 00:16:41 UTC

[GitHub] [nuttx] adamfeuer opened a new pull request, #8840: make userleds work on Arduino Due

adamfeuer opened a new pull request, #8840:
URL: https://github.com/apache/nuttx/pull/8840

   ## Summary
   
   - makes the 'leds' example command work:
     - adds code to initialize the /dev/userleds device
     - adds defconfig and docs
   
   ## Impact
   
   - None for boards other than Arduino Due
   - For Arduino Due, enables the /dev/userleds device if configured with the following defines: 
   ```
   CONFIG_ARCH_HAVE_LEDS=y
   # CONFIG_ARCH_LEDS is not set
   CONFIG_USERLED=y
   CONFIG_USERLED_LOWER=y
   ```
   
   ## Testing
   
   Manual with config enabled and disabled.


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #8840: make userleds work on Arduino Due

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #8840:
URL: https://github.com/apache/nuttx/pull/8840#discussion_r1141825035


##########
boards/arm/sam34/arduino-due/README.txt:
##########
@@ -861,3 +861,9 @@ Configuration sub-directories
 
        STATUS:
        2013-7-2:  TSC is not responding.  All 0's received on SPI.
+
+  nsh-leds:

Review Comment:
   Indentation in this block is different from above



##########
boards/arm/sam34/arduino-due/src/sam_bringup.c:
##########
@@ -117,5 +125,19 @@ int sam_bringup(void)
 #endif
 
   UNUSED(ret);

Review Comment:
   Let's move `UNUSED(ret);` after `#ifdef HAVE_LEDS` block



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] adamfeuer commented on a diff in pull request #8840: make userleds work on Arduino Due

Posted by "adamfeuer (via GitHub)" <gi...@apache.org>.
adamfeuer commented on code in PR #8840:
URL: https://github.com/apache/nuttx/pull/8840#discussion_r1147906048


##########
boards/arm/sam34/arduino-due/src/sam_bringup.c:
##########
@@ -117,5 +125,19 @@ int sam_bringup(void)
 #endif
 
   UNUSED(ret);

Review Comment:
   Thanks for catching- fixed.



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 merged pull request #8840: make userleds work on Arduino Due

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #8840:
URL: https://github.com/apache/nuttx/pull/8840


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] adamfeuer commented on a diff in pull request #8840: make userleds work on Arduino Due

Posted by "adamfeuer (via GitHub)" <gi...@apache.org>.
adamfeuer commented on code in PR #8840:
URL: https://github.com/apache/nuttx/pull/8840#discussion_r1148414270


##########
boards/arm/sam34/arduino-due/src/sam_bringup.c:
##########
@@ -116,6 +124,18 @@ int sam_bringup(void)
     }
 #endif
 
-  UNUSED(ret);
+#ifdef HAVE_LEDS
+  board_userled_initialize();
+
+  /* Register the LED driver */
+
+  ret = userled_lower_initialize(LED_DRIVER_PATH);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
+      return ret;
+    }
+#endif

Review Comment:
   Fixed! :slightly_smiling_face: 



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 commented on pull request #8840: make userleds work on Arduino Due

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #8840:
URL: https://github.com/apache/nuttx/pull/8840#issuecomment-1518141306

   @adamfeuer please squash patch into one.


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #8840: make userleds work on Arduino Due

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #8840:
URL: https://github.com/apache/nuttx/pull/8840#discussion_r1147907492


##########
boards/arm/sam34/arduino-due/src/sam_bringup.c:
##########
@@ -116,6 +124,18 @@ int sam_bringup(void)
     }
 #endif
 
-  UNUSED(ret);
+#ifdef HAVE_LEDS
+  board_userled_initialize();
+
+  /* Register the LED driver */
+
+  ret = userled_lower_initialize(LED_DRIVER_PATH);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
+      return ret;
+    }
+#endif

Review Comment:
   ```suggestion
   #endif
   
     UNUSED(ret);
   ```
   



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] pkarashchenko commented on pull request #8840: make userleds work on Arduino Due

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on PR #8840:
URL: https://github.com/apache/nuttx/pull/8840#issuecomment-1483896514

   Please rework comments 1, 2 and 4, to make `UNUSED(ret);` be a part of commit 1 only and commit 4 can be dropped.


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] adamfeuer commented on pull request #8840: make userleds work on Arduino Due

Posted by "adamfeuer (via GitHub)" <gi...@apache.org>.
adamfeuer commented on PR #8840:
URL: https://github.com/apache/nuttx/pull/8840#issuecomment-1483710964

   @pkarashchenko I made the fixes, and also got the `arm05` check to pass- this is a green build now and ready to merge.
   
   Or- do you want me to rebase and squash the commits?


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #8840: make userleds work on Arduino Due

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #8840:
URL: https://github.com/apache/nuttx/pull/8840#discussion_r1148343970


##########
boards/arm/sam34/arduino-due/src/sam_bringup.c:
##########
@@ -116,6 +124,18 @@ int sam_bringup(void)
     }
 #endif
 
-  UNUSED(ret);
+#ifdef HAVE_LEDS
+  board_userled_initialize();
+
+  /* Register the LED driver */
+
+  ret = userled_lower_initialize(LED_DRIVER_PATH);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
+      return ret;
+    }
+#endif

Review Comment:
   Please fix this and we can move to merge



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org