nsh over usb works with readline/cle now.

In face, isconsole in current implementation is more like a very tiny `line 
driver` inside the serial driver.

________________________________
发件人: Gregory Nutt <spudan...@gmail.com>
发送时间: 2023年3月10日 23:09:12
收件人: dev@nuttx.apache.org
主题: [External Mail]Re: [Breaking change] Echo character by serial driver

[外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给mi...@xiaomi.com进行反馈

>>> Isn't the default setting of ECHO disabled?  My understanding is the
>>> ECHO is always /disabled /unless it is specifically /enabled /in the
>>> TERMIOS settings.
>>>
>> No, it depends on isconsole:
>> https://github.com/apache/nuttx/blob/master/drivers/serial/serial.c#L1303-L1308
>> https://github.com/apache/nuttx/blob/master/drivers/serial/serial.c#L1821-L1840
>> https://github.com/apache/nuttx/blob/master/drivers/serial/serial.c#L339-L344
>> All terminal special handling(\r\n<->\n, ECHO CRTL+C) is activated if
>> isconsole equals true.
>> And all serial ports designed for shell set isconsole=true statically.

It would be a good thing to eliminate isconsole.  Any tty device should
be capable of being a console.

Has anyone tests the USB serial drivers?  Does the console still work
over USB?

> The first and last deal with CR-LF expansion as I mentioned.  The
> second is a little different.  This is 1) enabling signal handling to
> support Ctrl-C behavior and enabling CR-LF expansion.   Oddly, it also
> enables echo.  Those, of course, never did anything in the past:
> CR-FL expansion was controlled by the isonsole flag and t/*here was no
> implementation of ECHO before 68384e9db42*/.  So, yes, you are right
> about some of that.

Those "odd behaviors", including select ECHO where added by Huanq Qi in
3e41bd8b359 and 68384e9db42 and never existed in the original code.   It
is part of the disastrous implementation of ECHO and never should have
been there at all.

As I said originally, isconsole was only added as a kludge to get CR-LF.


#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
 This e-mail and its attachments contain confidential information from XIAOMI, 
which is intended only for the person or entity whose address is listed above. 
Any use of the information contained herein in any way (including, but not 
limited to, total or partial disclosure, reproduction, or dissemination) by 
persons other than the intended recipient(s) is prohibited. If you receive this 
e-mail in error, please notify the sender by phone or email immediately and 
delete it!******/#

Reply via email to