You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "raiden00pl (via GitHub)" <gi...@apache.org> on 2023/02/07 12:22:58 UTC

[GitHub] [nuttx-apps] raiden00pl opened a new pull request, #1549: examples/nxscope: add support for CDCACM dev

raiden00pl opened a new pull request, #1549:
URL: https://github.com/apache/nuttx-apps/pull/1549

   ## Summary
   
   - logging/nxscope/nxscope_iser.c: wait for device if CONFIG_SERIAL_REMOVALBE=y
   - examples/nxscope: add support for CDCACM dev
   
   ## Impact
   
   ## Testing
   stm32f4discovery
   


-- 
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-apps] xiaoxiang781216 merged pull request #1549: examples/nxscope: add support for CDCACM dev

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


-- 
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-apps] xiaoxiang781216 commented on a diff in pull request #1549: examples/nxscope: add support for CDCACM dev

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1549:
URL: https://github.com/apache/nuttx-apps/pull/1549#discussion_r1098612789


##########
logging/nxscope/nxscope_iser.c:
##########
@@ -177,13 +177,35 @@ int nxscope_ser_init(FAR struct nxscope_intf_s *intf,
       flags |= O_NONBLOCK;
     }
 
+#ifdef CONFIG_SERIAL_REMOVABLE
+  do
+    {
+      /* Try to open the console */
+
+      priv->fd = open(priv->cfg->path, flags);
+      if (priv->fd < 0)
+        {
+          /* ENOTCONN means that the USB device is not yet connected.
+           * Anything else is bad.
+           */
+
+          DEBUGASSERT(errno == ENOTCONN);

Review Comment:
   should we return fail for other errno



-- 
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-apps] raiden00pl commented on a diff in pull request #1549: examples/nxscope: add support for CDCACM dev

Posted by "raiden00pl (via GitHub)" <gi...@apache.org>.
raiden00pl commented on code in PR #1549:
URL: https://github.com/apache/nuttx-apps/pull/1549#discussion_r1098649240


##########
logging/nxscope/nxscope_iser.c:
##########
@@ -199,13 +202,13 @@ int nxscope_ser_init(FAR struct nxscope_intf_s *intf,
   while (priv->fd < 0);
 #else
   priv->fd = open(priv->cfg->path, flags);
+#endif
   if (priv->fd < 0)
     {
-      _err("ERROR: failed to open %s\n", priv->cfg->path);
+      _err("ERROR: failed to open %s %d\n", priv->cfg->path, errno);

Review Comment:
   Ouch, fixup to wrong commit. 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-apps] xiaoxiang781216 commented on a diff in pull request #1549: examples/nxscope: add support for CDCACM dev

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1549:
URL: https://github.com/apache/nuttx-apps/pull/1549#discussion_r1098614399


##########
logging/nxscope/nxscope_iser.c:
##########
@@ -199,13 +202,13 @@ int nxscope_ser_init(FAR struct nxscope_intf_s *intf,
   while (priv->fd < 0);
 #else
   priv->fd = open(priv->cfg->path, flags);
+#endif
   if (priv->fd < 0)
     {
-      _err("ERROR: failed to open %s\n", priv->cfg->path);
+      _err("ERROR: failed to open %s %d\n", priv->cfg->path, errno);

Review Comment:
   to the first patch too



-- 
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-apps] xiaoxiang781216 commented on a diff in pull request #1549: examples/nxscope: add support for CDCACM dev

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1549:
URL: https://github.com/apache/nuttx-apps/pull/1549#discussion_r1098614099


##########
logging/nxscope/nxscope_iser.c:
##########
@@ -189,7 +189,10 @@ int nxscope_ser_init(FAR struct nxscope_intf_s *intf,
            * Anything else is bad.
            */
 
-          DEBUGASSERT(errno == ENOTCONN);
+          if (errno != ENOTCONN)

Review Comment:
   move to the first patch



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