Commit Graph

27 Commits

Author SHA1 Message Date
Xiang Xiao
4262b09cbf libc: Implement terminal api regardless of CONFIG_SERIAL_TERMIOS setting
since many functions aren't related to termios directly

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-29 08:11:08 -03:00
Xiang Xiao
077a28eff6 Fix termios/lib_cfspeed.c:78:5: error: large integer implicitly truncated to unsigned type
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-29 08:11:08 -03:00
Jiuzhu Dong
f2e268d1bc include/termios: left shift of 1 by 31 places cannot be represented in type 'int'
N/A

cu_main.c:172:22: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
by asan

Change-Id: I224345bddb11523db0c4a91c16617a3200fad034
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-15 09:20:55 -07:00
Alin Jerpelea
9b9be7e1f0 include: Author: Gregory Nutt: update licenses to Apache 2.0
Update files from Gregory Nutt to Apache 2.0 license.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-04 03:33:58 -08:00
dongjiuzhu
2b5be56bd0 serial/termios: support custom baud rate setting
N/A

Change-Id: I0cc00f6d0fda852533bd4a38ea6fc39e0d0059da
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-10-21 10:11:21 -07:00
ligd
57dfb98713 include: add dependence to setvbuf & isatty, undefine symbols when !CONFIG_SERIAL_TERMIOS
Change-Id: I053504fcfc90d926e6f529bfd7badedc71596313
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-09-15 10:28:21 -03:00
dongjiuzhu
03c7951cbd libc/termios: modify termios setting follow linux and posix
Change-Id: Id323b3169e74f4153fd8d132d20926b7fb8336a3
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-09-14 09:23:46 -03:00
Masayuki Ishikawa
9f682056f9 Merged in masayuki2009/nuttx.nuttx/termios_branch (pull request #655)
libs/libc/termios: Add lib_cfmakeraw.c

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: GregoryN <gnutt@nuttx.org>
2018-06-12 14:05:39 +00:00
Gregory Nutt
f3392e0a6c drivers/serial: Add a timeout to uart_tcdrain(). Even if tcflush() is used to discard buffered data, the close() can still hang if (a) hardware flow control is enabled, (b) CTS == 1, and (c) there is data stuck in the hardware Tx FIFO. tcflush() does not currently clear the MCU serial drivers' hardware Tx FIFOs. This is a workaround for that. 2018-05-27 11:39:34 -06:00
Gregory Nutt
9417bfde0e include/termios.h: Update comments; fix long lines. 2018-01-18 12:51:07 -06:00
Lorenz Meier
b0fcf3abd7 termios.h: Fix CRTSCTS define to include input and output flow 2016-12-26 07:41:44 -06:00
Sebastien Lorquet
c8c4575139 isatty() should be prototypes in unstid.h, not termios.h. 2016-08-24 10:25:09 -06:00
Gregory Nutt
19eea866e6 Standardize some header files 2015-02-16 14:29:43 -06:00
Gregory Nutt
6bbfb2b7ca Add isatty() function. From Alan Carvalho de Assis 2014-10-27 12:29:15 -06:00
Gregory Nutt
03663a7ac4 Cosmetic changes 2014-10-27 07:57:12 -06:00
Gregory Nutt
3a1324741a More trailing whilespace removal 2014-04-13 14:32:20 -06:00
Gregory Nutt
3edec35c51 Add flow control support to the STM32 serial driver; Fix some issues with UART2 and 5. From Lorenz Meier and Mike Smith 2013-06-06 14:49:14 -06:00
patacongo
3cea8822cf The termios c_speed field cannot be 'const'
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5234 42af7a65-404d-4744-a932-0658087f49c3
2012-10-20 13:14:04 +00:00
patacongo
c1a3d46a69 Add PM support for the STM32F4Discovery -- still a work in progress
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4976 42af7a65-404d-4744-a932-0658087f49c3
2012-07-25 13:35:36 +00:00
patacongo
1c7794b97d Combine cfset[o|i]speed to cfsetspeed; combine cfget[o|i]speed for cfgetspeed
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4975 42af7a65-404d-4744-a932-0658087f49c3
2012-07-24 22:56:36 +00:00
patacongo
272a475b52 Remove BOTHER
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4972 42af7a65-404d-4744-a932-0658087f49c3
2012-07-24 15:10:21 +00:00
patacongo
58864cc6e9 Baud definitions (B9600 for example) are again encoded; Now supports the BOTHER settings which allows specifying the baud via c_ispeed and c_ospeed termios fields
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4970 42af7a65-404d-4744-a932-0658087f49c3
2012-07-23 15:37:13 +00:00
patacongo
369ef8947f Loosen up termios interfaces to allow more flexible baud settings; remove AIX-like interfaces of last check-in
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4969 42af7a65-404d-4744-a932-0658087f49c3
2012-07-22 18:56:50 +00:00
patacongo
2131203d8b Use NuttX types in FreeModBus port; Add FreeModBus demo at apps/examples/modbus; Add new termios APIs
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4964 42af7a65-404d-4744-a932-0658087f49c3
2012-07-21 21:23:18 +00:00
patacongo
e154165067 Add tcsetattr and tcgetattr
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4355 42af7a65-404d-4744-a932-0658087f49c3
2012-02-01 16:17:12 +00:00
patacongo
f4c7bd94b2 Misc compilation warning cleanup
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4155 42af7a65-404d-4744-a932-0658087f49c3
2011-12-10 13:34:25 +00:00
patacongo
3af8169e0a Add termios header files; add files missed in last commit
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3739 42af7a65-404d-4744-a932-0658087f49c3
2011-07-01 22:23:54 +00:00