Commit Graph

39 Commits

Author SHA1 Message Date
Sebastian Huber
7fd5e89c96 termios: Partially hide rtems_termios_tty
Move interrupt lock to device context and expose only this structure to
the read, write and set attributes device handler.  This makes these
device handler independent of the general Termios infrastructure
suitable for direct use in printk() support.
2014-10-07 16:35:13 +02:00
Sebastian Huber
a830cb864d termios: Separate flow control from normal handler 2014-10-07 16:27:51 +02:00
Sebastian Huber
93726e5205 termios: Add rtems_termios_set_best_baud() 2014-07-09 15:56:43 +02:00
Sebastian Huber
a0fb29fb80 termios: PR1279: Use first open status 2014-07-09 12:07:49 +02:00
Sebastian Huber
32fc6a3490 termios: PR1279: Use set attributes status 2014-07-09 12:07:49 +02:00
Sebastian Huber
ef8c00bc88 termios: PR2153: New low-level device API
Add a new low-level device API to Termios that passes the TTY structure
to the low-level device functions.  This greatly simplifies the
low-level device drivers since they are no longer forced to derive their
private data from the minor number.

It makes it possible to use the TTY low-level lock in the device driver
low-level functions which is necessary for proper SMP support.  For
example to set the attributes it is often necessary to perform a
read-modify-write operation on a control register used also by interrupt
routines.

A compatibility layer is provided to support device drivers using the
old callback functions so it is not necessary to modify existing device
drivers.
2014-07-09 11:55:00 +02:00
Chris Johns
c49985691f Change all references of rtems.com to rtems.org. 2014-03-21 08:10:47 +11:00
Sebastian Huber
f8b2eb03f7 tests/libtests: Use <rtems/test.h> 2014-03-20 09:10:26 +01:00
Daniel Ramirez
3096f5c967 libtests/termios01: Add tests for cfsetspeed() and cfmakeraw() 2014-01-09 09:21:49 -06:00
Sebastian Huber
a9127a2e65 testsuites: Include missing header files 2013-07-22 16:45:59 +02:00
Sebastian Huber
c8615dcf26 libtests/termios01: Use greedy allocation API 2012-07-17 10:52:13 +02:00
Joel Sherrill
4c86e3d8be libtmtests - Eliminate missing prototype warnings 2012-05-11 12:20:47 -05:00
Joel Sherrill
9b4422a251 Remove All CVS Id Strings Possible Using a Script
Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines
  next to each other after Id string line removed.
+ remove entire comment blocks which only exited to
  contain CVS Ids
+ If the processing left a blank line at the top of
  a file, it was removed.
2012-05-11 08:44:13 -05:00
Joel Sherrill
33a105fb69 Revert: Remove CVS Ids
See http://www.rtems.org/pipermail/rtems-devel/2012-May/001006.html
for details.
2012-05-07 11:08:48 -05:00
Ralf Corsépius
820d82ed8a Remove CVS-Ids. 2012-05-04 09:36:24 +02:00
Joel Sherrill
61250b4ce9 Remove all .cvsignore files. 2012-02-01 10:59:44 -06:00
Sebastian Huber
f55595e489 2011-12-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
* termios01/init.c: Update due to API changes.  Fixed integer types.
	Make functions static.  Added const qualifier.
2011-12-14 12:58:21 +00:00
Joel Sherrill
6f9ce8f4c6 2011-12-08 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1589/build
	* block01/Makefile.am, block02/Makefile.am, block03/Makefile.am,
	block04/Makefile.am, block05/Makefile.am, block06/Makefile.am,
	block07/Makefile.am, block08/Makefile.am, block09/Makefile.am,
	block10/Makefile.am, bspcmdline01/Makefile.am, cpuuse/Makefile.am,
	devfs01/Makefile.am, devfs02/Makefile.am, devfs03/Makefile.am,
	devfs04/Makefile.am, deviceio01/Makefile.am,
	devnullfatal01/Makefile.am, dumpbuf01/Makefile.am, ftp01/Makefile.am,
	gxx01/Makefile.am, heapwalk/Makefile.am, malloc02/Makefile.am,
	malloc03/Makefile.am, malloc04/Makefile.am, malloc05/Makefile.am,
	malloctest/Makefile.am, monitor/Makefile.am, monitor02/Makefile.am,
	mouse01/Makefile.am, putenvtest/Makefile.am, rtems++/Makefile.am,
	rtmonuse/Makefile.am, stackchk/Makefile.am, stackchk01/Makefile.am,
	stringto01/Makefile.am, tar01/Makefile.am, tar02/Makefile.am,
	tar03/Makefile.am, termios/Makefile.am, termios01/Makefile.am,
	termios02/Makefile.am, termios03/Makefile.am, termios04/Makefile.am,
	termios05/Makefile.am, termios06/Makefile.am, termios07/Makefile.am,
	termios08/Makefile.am, tztest/Makefile.am: Remove obsolete optional
	manager capability.
2011-12-08 21:38:12 +00:00
Ralf Corsepius
e8899de3fa 2011-06-20 Ralf Corsépius <ralf.corsepius@rtems.org>
* devfs04/Makefile.am, deviceio01/Makefile.am,
	monitor02/Makefile.am, stackchk01/Makefile.am,
	stringto01/Makefile.am, tar01/Makefile.am,
	tar02/Makefile.am, termios01/Makefile.am,
	termios03/Makefile.am, termios04/Makefile.am
	tztest/Makefile.am: Add missing files.
2011-06-20 08:53:03 +00:00
Ralf Corsepius
7d3f9c646a Add HAVE_CONFIG_H. 2011-02-22 07:37:03 +00:00
Joel Sherrill
d539f2b807 2010-08-10 Bharath Suri <bharath.s.jois@gmail.com>
PR 1661/testing
	* termios01/init.c, termios01/termios01.scn: Added a test case to
	hit a case in rtems_termios_read.
2010-08-10 22:31:49 +00:00
Joel Sherrill
a263ce5cbf 2010-08-10 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1664/testing
	* termios01/init.c: Use INT_MAX instead of hard-coded number for error
	case to avoid warning on 16-bit targets.
2010-08-10 14:45:22 +00:00
Joel Sherrill
2e54cdc4d8 2010-08-09 Bharath Suri <bharath.s.jois@gmail.com>
PR 1661/testing
	* termios01/init.c, termios01/termios_testdriver.c,
	termios01/termios01.scn: Changes to improve coverage of
	rtems_termios_open routine.
2010-08-09 14:36:47 +00:00
Joel Sherrill
8cd0bb0f00 2010-07-14 Joel Sherrill <joel.sherrill@oarcorp.com>
* termios01/init.c, termios01/termios01.scn: Fully exercise tcsetattr.
2010-07-14 15:59:37 +00:00
Joel Sherrill
ef08dc1f8a 2010-06-23 Joel Sherrill <joel.sherrilL@OARcorp.com>
* block01/Makefile.am, block02/Makefile.am, block03/Makefile.am,
	block04/Makefile.am, block05/Makefile.am, block06/Makefile.am,
	block07/Makefile.am, block08/Makefile.am, block09/Makefile.am,
	block10/Makefile.am, bspcmdline01/Makefile.am, cpuuse/Makefile.am,
	heapwalk/Makefile.am, malloctest/Makefile.am, monitor/Makefile.am,
	monitor02/Makefile.am, putenvtest/Makefile.am, rtems++/Makefile.am,
	rtmonuse/Makefile.am, stackchk/Makefile.am, stackchk01/Makefile.am,
	stringto01/Makefile.am, termios/Makefile.am, termios01/Makefile.am,
	termios02/Makefile.am: Revert.
2010-06-23 23:26:08 +00:00
Joel Sherrill
24a5a1452f 2010-06-23 Joel Sherrill <joel.sherrilL@OARcorp.com>
* termios01/termios01.scn: Fix bug so existing test code for
	rtems_termios_baud_to_index() is executed.
2010-06-23 23:25:45 +00:00
Joel Sherrill
ab59de4542 2010-06-23 Joel Sherrill <joel.sherrilL@OARcorp.com>
* block01/Makefile.am, block02/Makefile.am, block03/Makefile.am,
	block04/Makefile.am, block05/Makefile.am, block06/Makefile.am,
	block07/Makefile.am, block08/Makefile.am, block09/Makefile.am,
	block10/Makefile.am, bspcmdline01/Makefile.am, cpuuse/Makefile.am,
	heapwalk/Makefile.am, malloctest/Makefile.am, monitor/Makefile.am,
	monitor02/Makefile.am, putenvtest/Makefile.am, rtems++/Makefile.am,
	rtmonuse/Makefile.am, stackchk/Makefile.am, stackchk01/Makefile.am,
	stringto01/Makefile.am, termios/Makefile.am, termios01/Makefile.am,
	termios01/init.c, termios02/Makefile.am: Fix bug so existing test
	code for rtems_termios_baud_to_index() is executed.
2010-06-23 23:24:11 +00:00
Joel Sherrill
9f5f6f533c 2010-06-07 Joel Sherrill <joel.sherrill@oarcorp.com>
* termios01/init.c, termios01/termios01.scn, termios02/init.c,
	termios02/termios02.scn: Add tests for cfigetspeed(), cfogetspeed(),
	cfisetspeed(), cfosetspeed(), ctermid(), tcflow(), tcflush(),
	tcsendbreak(), tcsetpgrp(), and tcgetpgrp(). Some of these methods
	are minimal implementations so the tests will have to grow as the
	methods grow.
2010-06-07 18:33:09 +00:00
Joel Sherrill
e8e3848188 2009-12-10 Joel Sherrill <joel.sherrill@oarcorp.com>
* termios01/init.c: Increase number of termios ports by 1.
2009-12-11 02:12:57 +00:00
Ralf Corsepius
ea9a626e3a Reflect changes to rtems_termios_callbacks->write. 2009-12-10 14:26:32 +00:00
Joel Sherrill
500fcd5c88 2009-12-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* block01/init.c, block02/init.c, block03/init.c, block04/init.c,
	block05/init.c, block07/init.c, bspcmdline01/init.c,
	stringto01/init.c, stringto01/stringto_test_template.h,
	termios01/init.c, termios01/termios_testdriver.c, termios02/init.c:
	Use rtems_test_assert() consistently instead of system assert().
	rtems_test_assert() is designed to integrate into the RTEMS test
	suite infrastructure.
2009-12-08 17:52:49 +00:00
Ralf Corsepius
b1274bd94c Whitespace removal. 2009-11-30 03:33:25 +00:00
Ralf Corsepius
14664255e8 Fix parity_table_Entry type.
Correct parity_table initialization.
Add PRIdrtems_termios_baud_t.
Use PRIdrtems_termios_baud_t to print rtems_termios_baud_t's.
2009-10-27 11:43:29 +00:00
Ralf Corsepius
9066bf2085 Eliminate unused vars. 2009-10-26 07:58:21 +00:00
Ralf Corsepius
4184a9c76b Include <rtems/termiostypes.h. 2009-10-26 07:48:06 +00:00
Joel Sherrill
dda7c828a0 2009-10-01 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, termios01/termios_testdriver.c: Do not use
	CONSOLE_USE_INTERRUPTS. That is in use by BSPs and we should not use
	it.
	* termios02/.cvsignore, termios02/Makefile.am, termios02/init.c,
	termios02/termios02.doc, termios02/termios02.scn: New files.
	termios02 is a test for tcdrain().
2009-10-01 23:52:36 +00:00
Ralf Corsepius
009dfd082d Reflect changes to termios. 2009-10-01 12:14:01 +00:00
Joel Sherrill
e958d79b33 2009-08-15 Joel Sherrill <joel.sherrill@oarcorp.com>
* termios01/init.c, termios01/termios01.scn: Add a few error paths to
	complete coverage of termios_XXX_to_YYY() methods.
2009-08-15 22:29:38 +00:00
Joel Sherrill
4d5b156c2c 2009-08-15 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Add new test to exercise tcgetattr and
	tcsetattr. Does a variety of baud, parity, stop bits, and bits per
	character with the assistance of a special test driver which prints
	the requests.
	* termios01/.cvsignore, termios01/Makefile.am, termios01/init.c,
	termios01/termios01.doc, termios01/termios01.scn,
	termios01/termios_testdriver.c, termios01/termios_testdriver.h: New files.
2009-08-15 17:54:48 +00:00