xiaoxiang781216 commented on code in PR #7554:
URL: https://github.com/apache/incubator-nuttx/pull/7554#discussion_r1016761456


##########
drivers/segger/console_rtt.c:
##########
@@ -0,0 +1,127 @@
+/****************************************************************************
+ * drivers/segger/console_rtt.c

Review Comment:
   > Maybe you want to unify all RTT channels into one device registration 
interface.
   > 
   
   Yes.
   
   > But channel 0 has some special features, it can be used without any 
initialization, and other channels need to be configured (corresponding to the 
semantics of open) I plan to use channel 0 as a console and create a new 
/dev/ttyRTTn device for other channels
   > 
   > So I think it would be better to separate the two, what do you think?
   > 
   > 
[https://wiki.segger.com/RTT#TELNET_channel_of_J-Link_software](https://wiki.segger.com/RTT#TELNET_channel_of_J-Link_software:~:text=RTT%20Channel%200%20is%20somewhat%20special%3A)
   
   you can add new api:
   ```
   rtt_serial_register(FAR const char *path, int index);
   ```
   and let's` rtt_console_register` call `rtt_serial_register("/dev/console", 
0)`
   the code in `rtt_serial_register` can call open/close when index isn't equal 
to zero.



-- 
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-unsubscr...@nuttx.apache.org

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

Reply via email to