<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2010-06-28)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-06-28 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Add new test to exercise termios RX and TX
interrupt driven IO support.
* termios04/.cvsignore, termios04/Makefile.am, termios04/init.c,
termios04/termios04.doc, termios04/termios04.scn,
termios04/termios_testdriver_intr.c,
termios04/termios_testdriver_intr.h: New files.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/ChangeLog.diff?r1=text&tr1=1.190&r2=text&tr2=1.191&diff_format=h">M</a></td><td width='1%'>1.191</td><td width='100%'>testsuites/libtests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/Makefile.am.diff?r1=text&tr1=1.29&r2=text&tr2=1.30&diff_format=h">M</a></td><td width='1%'>1.30</td><td width='100%'>testsuites/libtests/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/configure.ac.diff?r1=text&tr1=1.36&r2=text&tr2=1.37&diff_format=h">M</a></td><td width='1%'>1.37</td><td width='100%'>testsuites/libtests/configure.ac</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/termios04/.cvsignore?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/termios04/.cvsignore</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/termios04/Makefile.am?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/termios04/Makefile.am</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/termios04/init.c?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/termios04/init.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/termios04/termios04.doc?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/termios04/termios04.doc</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/termios04/termios04.scn?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/termios04/termios04.scn</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/termios04/termios_testdriver_intr.h?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/termios04/termios_testdriver_intr.h</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/termios04/termios_testdriver_intr.c?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/libtests/termios04/termios_testdriver_intr.c</font></td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/libtests/ChangeLog:1.190 rtems/testsuites/libtests/ChangeLog:1.191
--- rtems/testsuites/libtests/ChangeLog:1.190 Mon Jun 28 08:42:25 2010
+++ rtems/testsuites/libtests/ChangeLog Mon Jun 28 09:23:19 2010
</font><font color='#997700'>@@ -1,5 +1,14 @@
</font> 2010-06-28 Joel Sherrill <joel.sherrill@oarcorp.com>
<font color='#000088'>+ * Makefile.am, configure.ac: Add new test to exercise termios RX and TX
+ interrupt driven IO support.
+ * termios04/.cvsignore, termios04/Makefile.am, termios04/init.c,
+ termios04/termios04.doc, termios04/termios04.scn,
+ termios04/termios_testdriver_intr.c,
+ termios04/termios_testdriver_intr.h: New files.
+
+2010-06-28 Joel Sherrill <joel.sherrill@oarcorp.com>
+
</font> * termios03/init.c, termios03/termios03.doc, termios03/termios03.scn,
termios03/termios_testdriver_polled.c,
termios03/termios_testdriver_polled.h: Add more test cases.
<font color='#006600'>diff -u rtems/testsuites/libtests/Makefile.am:1.29 rtems/testsuites/libtests/Makefile.am:1.30
--- rtems/testsuites/libtests/Makefile.am:1.29 Fri Jun 25 11:52:24 2010
+++ rtems/testsuites/libtests/Makefile.am Mon Jun 28 09:23:19 2010
</font><font color='#997700'>@@ -8,7 +8,7 @@
</font>
SUBDIRS += bspcmdline01 cpuuse malloctest malloc02 malloc03 heapwalk \
putenvtest monitor monitor02 rtmonuse stackchk stackchk01 \
<font color='#880000'>- termios termios01 termios02 termios03 \
</font><font color='#000088'>+ termios termios01 termios02 termios03 termios04 \
</font> rtems++ tztest block01 block02 block03 block04 block05 block06 block07 \
block08 block09 block10 stringto01
<font color='#006600'>diff -u rtems/testsuites/libtests/configure.ac:1.36 rtems/testsuites/libtests/configure.ac:1.37
--- rtems/testsuites/libtests/configure.ac:1.36 Fri Jun 25 11:52:24 2010
+++ rtems/testsuites/libtests/configure.ac Mon Jun 28 09:23:19 2010
</font><font color='#997700'>@@ -61,6 +61,7 @@
</font> termios01/Makefile
termios02/Makefile
termios03/Makefile
<font color='#000088'>+termios04/Makefile
</font> tztest/Makefile
POSIX/Makefile
])
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/termios04/.cvsignore:1.1
--- /dev/null Mon Jun 28 10:15:05 2010
+++ rtems/testsuites/libtests/termios04/.cvsignore Mon Jun 28 09:23:19 2010
</font><font color='#997700'>@@ -0,0 +1,2 @@
</font><font color='#000088'>+Makefile
+Makefile.in
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/termios04/Makefile.am:1.1
--- /dev/null Mon Jun 28 10:15:05 2010
+++ rtems/testsuites/libtests/termios04/Makefile.am Mon Jun 28 09:23:19 2010
</font><font color='#997700'>@@ -0,0 +1,26 @@
</font><font color='#000088'>+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = termios04
+termios04_SOURCES = init.c termios_testdriver_intr.c
+
+dist_rtems_tests_DATA = termios04.scn
+dist_rtems_tests_DATA += termios04.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(termios04_OBJECTS) $(termios04_LDADD)
+LINK_LIBS = $(termios04_LDLIBS)
+
+termios04$(EXEEXT): $(termios04_OBJECTS) $(termios04_DEPENDENCIES)
+ @rm -f termios04$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/termios04/init.c:1.1
--- /dev/null Mon Jun 28 10:15:06 2010
+++ rtems/testsuites/libtests/termios04/init.c Mon Jun 28 09:23:19 2010
</font><font color='#997700'>@@ -0,0 +1,147 @@
</font><font color='#000088'>+/*
+ * COPYRIGHT (c) 1989-2010.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#include <tmacros.h>
+#include "test_support.h"
+#include "termios_testdriver_intr.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <termios.h>
+#include <rtems/dumpbuf.h>
+
+void write_helper(
+ int fd,
+ const char *c
+)
+{
+ size_t len;
+ int rc;
+<span style="background-color: #FF0000"> </span>
+ len = strlen( c );
+ printf( "Writing: %s", c );
+
+ rc = write( fd, c, len );
+ rtems_test_assert( rc == len );
+
+ termios_test_driver_dump_tx("Transmitted");
+}
+
+uint8_t read_helper_buffer[256];
+
+void read_helper(
+ int fd,
+ const char *expected
+)
+{
+ int rc;
+ size_t len;
+
+ len = strlen( expected );
+
+ termios_test_driver_set_rx( expected, len );
+ printf( "\nReading (expected):\n" );
+ rtems_print_buffer( (unsigned char *)expected, len-1 );
+
+ rc = read( fd, read_helper_buffer, sizeof(read_helper_buffer) );
+ rtems_test_assert( rc != -1 );
+
+ printf( "Read %d bytes from read(2)\n", rc );
+ rtems_print_buffer( read_helper_buffer, rc );
+
+ termios_test_driver_dump_tx("As Read");
+}
+
+int Test_fd;
+
+void open_it(void)
+{
+ /* open the file */
+ puts( "open(" TERMIOS_TEST_DRIVER_DEVICE_NAME ") - OK " );
+ Test_fd = open( TERMIOS_TEST_DRIVER_DEVICE_NAME, O_RDWR );
+ rtems_test_assert( Test_fd != -1 );
+}
+
+void close_it(void)
+{
+ int rc;
+
+ puts( "close(" TERMIOS_TEST_DRIVER_DEVICE_NAME ") - OK " );
+ rc = close( Test_fd );
+ rtems_test_assert( rc == 0 );
+}
+
+void change_iflag( const char *desc, int mask, int new )
+{
+ int rc;
+ struct termios attr;
+
+ printf( "Changing c_iflag to: %s\n", desc );
+ rc = tcgetattr( Test_fd, &attr );
+ rtems_test_assert( rc == 0 );
+
+ attr.c_iflag &= ~mask;
+ attr.c_iflag |= new;
+
+ rc = tcsetattr( Test_fd, TCSANOW, &attr );
+ rtems_test_assert( rc == 0 );
+}
+
+const char ExpectedOutput_1[] = "This is interrupt driven test output.\n";
+const char ExpectedInput_1[] = "Blocking interrupt driven read.\n";
+const char ExpectedInput_2[] = "Non-Blocking interrupt driven read.\n";
+
+rtems_task Init(
+ rtems_task_argument argument
+)
+{
+ puts( "\n\n*** TEST TERMIOS04 ***" );
+
+ open_it();
+
+ /* some basic cases */
+ write_helper( Test_fd, ExpectedOutput_1 );
+ read_helper( Test_fd, ExpectedInput_1 );
+ termios_test_driver_set_rx_enqueue_now( true );
+ read_helper( Test_fd, ExpectedInput_2 );
+
+ close_it();
+
+ puts( "*** END OF TEST TERMIOS04 ***" );
+
+ rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_EXTRA_DRIVERS \
+ TERMIOS_TEST_DRIVER_TABLE_ENTRY
+
+/* include an extra slot for registering the termios one dynamically */
+#define CONFIGURE_MAXIMUM_DRIVERS 3
+
+/* one for the console and one for the test port */
+#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 3
+
+/* we need to be able to open the test device */
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 4
+#define CONFIGURE_MAXIMUM_TASKS 1
+#define CONFIGURE_MAXIMUM_TIMERS 2
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+/* end of file */
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/termios04/termios04.doc:1.1
--- /dev/null Mon Jun 28 10:15:06 2010
+++ rtems/testsuites/libtests/termios04/termios04.doc Mon Jun 28 09:23:19 2010
</font><font color='#997700'>@@ -0,0 +1,23 @@
</font><font color='#000088'>+#
+# $Id$
+#
+# COPYRIGHT (c) 1989-2010.
+# On-Line Applications Research Corporation (OAR).
+#
+# The license and distribution terms for this file may be
+# found in the file LICENSE in this distribution or at
+# http://www.rtems.com/license/LICENSE.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name: termios04
+
+directives:
+
+ + various termios code fragments supporting interrupt driven transmit
+ and receive support
+
+concepts:
+
++ termios interrupt driven transmit and receive support
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/termios04/termios04.scn:1.1
--- /dev/null Mon Jun 28 10:15:06 2010
+++ rtems/testsuites/libtests/termios04/termios04.scn Mon Jun 28 09:23:19 2010
</font><font color='#997700'>@@ -0,0 +1,33 @@
</font><font color='#000088'>+*** TEST TERMIOS04 ***
+open(/dev/test) - OK<span style="background-color: #FF0000"> </span>
+Writing: This is interrupt driven test output.
+Transmitted 39 characters
+54 68 69 73 20 69 73 20 69 6e 74 65 72 72 75 70 |This is interrup|
+74 20 64 72 69 76 65 6e 20 74 65 73 74 20 6f 75 |t driven test ou|
+74 70 75 74 2e 0d 0a |tput... |
+
+Reading (expected):
+42 6c 6f 63 6b 69 6e 67 20 69 6e 74 65 72 72 75 |Blocking interru|
+70 74 20 64 72 69 76 65 6e 20 72 65 61 64 2e |pt driven read. |
+Read 32 bytes from read(2)
+42 6c 6f 63 6b 69 6e 67 20 69 6e 74 65 72 72 75 |Blocking interru|
+70 74 20 64 72 69 76 65 6e 20 72 65 61 64 2e 0a |pt driven read..|
+As Read 33 characters
+42 6c 6f 63 6b 69 6e 67 20 69 6e 74 65 72 72 75 |Blocking interru|
+70 74 20 64 72 69 76 65 6e 20 72 65 61 64 2e 0d |pt driven read..|
+0a |. |
+
+Reading (expected):
+4e 6f 6e 2d 42 6c 6f 63 6b 69 6e 67 20 69 6e 74 |Non-Blocking int|
+65 72 72 75 70 74 20 64 72 69 76 65 6e 20 72 65 |errupt driven re|
+61 64 2e |ad. |
+Read 36 bytes from read(2)
+4e 6f 6e 2d 42 6c 6f 63 6b 69 6e 67 20 69 6e 74 |Non-Blocking int|
+65 72 72 75 70 74 20 64 72 69 76 65 6e 20 72 65 |errupt driven re|
+61 64 2e 0a |ad.. |
+As Read 37 characters
+4e 6f 6e 2d 42 6c 6f 63 6b 69 6e 67 20 69 6e 74 |Non-Blocking int|
+65 72 72 75 70 74 20 64 72 69 76 65 6e 20 72 65 |errupt driven re|
+61 64 2e 0d 0a |ad... |
+close(/dev/test) - OK<span style="background-color: #FF0000"> </span>
+*** END OF TEST TERMIOS04 ***
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/termios04/termios_testdriver_intr.h:1.1
--- /dev/null Mon Jun 28 10:15:06 2010
+++ rtems/testsuites/libtests/termios04/termios_testdriver_intr.h Mon Jun 28 09:23:19 2010
</font><font color='#997700'>@@ -0,0 +1,168 @@
</font><font color='#000088'>+/**
+ * @file termios_testdriver.h
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2009.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#ifndef _TERMIOS_TESTDRIVER_H
+#define _TERMIOS_TESTDRIVER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void termios_test_driver_set_rx(
+ const void *p,
+ size_t len
+);
+
+void termios_test_driver_set_rx_enqueue_now(
+ bool value
+);
+
+void termios_test_driver_dump_tx(const char *c);
+
+/**
+ * This macro defines the standard name for the Termios Test device
+ * that is available to applications.
+ */
+#define TERMIOS_TEST_DRIVER_DEVICE_NAME "/dev/test"
+
+/**
+ * This macro defines the standard device driver table entry for
+ * a Termios Test device driver.
+ */
+#define TERMIOS_TEST_DRIVER_TABLE_ENTRY \
+ { termios_test_driver_initialize, termios_test_driver_open, \
+ termios_test_driver_close, termios_test_driver_read, \
+ termios_test_driver_write, termios_test_driver_control }
+
+/**
+ * @brief Console Initialization Entry Point
+ *
+ * This method initializes the Termios Test device driver.
+ *
+ * @param[in] major is the device driver major number
+ * @param[in] minor is the device driver minor number
+ * @param[in] arg is the parameters to this call
+ *
+ * @return This method returns RTEMS_SUCCESSFUL when
+ * the device driver is successfully initialized.
+ */
+rtems_device_driver termios_test_driver_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+/**
+ * @brief Console Open Entry Point
+ *
+ * This method opens a specific device supported by the
+ * Termios Test device driver.
+ *
+ * @param[in] major is the device driver major number
+ * @param[in] minor is the device driver minor number
+ * @param[in] arg is the parameters to this call
+ *
+ * @return This method returns RTEMS_SUCCESSFUL when
+ * the device driver is successfully opened.
+ */
+rtems_device_driver termios_test_driver_open(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+/**
+ * @brief Console Close Entry Point
+ *
+ * This method closes a specific device supported by the
+ * Termios Test device driver.
+ *
+ * @param[in] major is the device driver major number
+ * @param[in] minor is the device driver minor number
+ * @param[in] arg is the parameters to this call
+ *
+ * @return This method returns RTEMS_SUCCESSFUL when
+ * the device is successfully closed.
+ */
+rtems_device_driver termios_test_driver_close(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+/**
+ * @brief Console Read Entry Point
+ *
+ * This method reads from a specific device supported by the
+ * Termios Test device driver.
+ *
+ * @param[in] major is the device driver major number
+ * @param[in] minor is the device driver minor number
+ * @param[in] arg is the parameters to this call
+ *
+ * @return This method returns RTEMS_SUCCESSFUL when
+ * the device is successfully read from.
+ */
+rtems_device_driver termios_test_driver_read(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+/**
+ * @brief Console Write Entry Point
+ *
+ * This method writes to a specific device supported by the
+ * Termios Test device driver.
+ *
+ * @param[in] major is the device driver major number
+ * @param[in] minor is the device driver minor number
+ * @param[in] arg is the parameters to this call
+ *
+ * @return This method returns RTEMS_SUCCESSFUL when
+ * the device is successfully written.
+ */
+rtems_device_driver termios_test_driver_write(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+/**
+ * @brief Console IO Control Entry Point
+ *
+ * This method performs an IO Control operation on a
+ * specific device supported by the Termios Test device driver.
+ *
+ * @param[in] major is the device driver major number
+ * @param[in] minor is the device driver minor number
+ * @param[in] arg is the parameters to this call
+ *
+ * @return This method returns RTEMS_SUCCESSFUL when
+ * the device driver IO control operation is
+ * successfully performed.
+ */
+rtems_device_driver termios_test_driver_control(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/termios04/termios_testdriver_intr.c:1.1
--- /dev/null Mon Jun 28 10:15:06 2010
+++ rtems/testsuites/libtests/termios04/termios_testdriver_intr.c Mon Jun 28 09:23:19 2010
</font><font color='#997700'>@@ -0,0 +1,201 @@
</font><font color='#000088'>+/*
+ * This file contains a test fixture termios device driver
+ *
+ * COPYRIGHT (c) 1989-2010.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#include "tmacros.h"
+#include <rtems/libio.h>
+#include <stdlib.h>
+#include <termios.h>
+#include <rtems/termiostypes.h>
+#include <rtems/dumpbuf.h>
+#include "termios_testdriver_intr.h"
+
+rtems_id Timer;
+
+#define TX_MAX 1024
+uint8_t Tx_Buffer[TX_MAX];
+int Tx_Index = 0;
+struct rtems_termios_tty *Ttyp;
+
+void termios_test_driver_dump_tx(const char *c)
+{
+ printf( "%s %d characters\n", c, Tx_Index );
+ rtems_print_buffer( Tx_Buffer, Tx_Index );
+ Tx_Index = 0;
+}
+<span style="background-color: #FF0000"> </span>
+const uint8_t *Rx_Buffer;
+int Rx_Index = 0;
+int Rx_Length = 0;
+bool Rx_FirstTime = true;
+bool Rx_EnqueueNow = false;
+
+rtems_timer_service_routine Rx_ISR(
+ rtems_id ignored_id,
+ void *ignored_address
+)
+{
+ uint8_t ch;
+
+ if ( Rx_Index >= Rx_Length )
+ return;
+
+ ch = Rx_Buffer[ Rx_Index++ ];
+ rtems_termios_enqueue_raw_characters (Ttyp, (char *)&ch, 1);
+
+ (void) rtems_timer_fire_after( Timer, 10, Rx_ISR, NULL );
+}
+
+void termios_test_driver_set_rx_enqueue_now(
+ bool value
+)
+{
+ Rx_EnqueueNow = value;
+}
+
+void termios_test_driver_set_rx(
+ const void *p,
+ size_t len
+)
+{
+ Rx_Buffer = p;
+ Rx_Length = len;
+ Rx_Index = 0;
+
+ if ( Rx_EnqueueNow == false) {
+ (void) rtems_timer_fire_after( Timer, 10, Rx_ISR, NULL );
+ return;
+ }
+
+ do {
+ uint8_t ch;
+ ch = Rx_Buffer[ Rx_Index++ ];
+ rtems_termios_enqueue_raw_characters (Ttyp, (char *)&ch, 1);
+ } while (Rx_Index < Rx_Length );
+}
+
+ssize_t termios_test_driver_write_helper(
+ int port,
+ const char *buf,
+ size_t len
+)
+{
+ size_t i;
+
+ for (i=0 ; i<len ; i++ )
+ Tx_Buffer[Tx_Index++] = (uint8_t) buf[i];
+
+ return len;
+}
+
+/*
+ * Set Attributes Handler
+ */
+int termios_test_driver_set_attributes(
+ int minor,
+ const struct termios *t
+)
+{
+ return 0;
+}
+
+/*
+ * Test Device Driver Entry Points
+ */
+rtems_device_driver termios_test_driver_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+)
+{
+ rtems_status_code status;
+
+ rtems_termios_initialize();
+
+ /*
+ * Register Device Names
+ */
+ (void) rtems_io_register_name( TERMIOS_TEST_DRIVER_DEVICE_NAME, major, 0 );
+
+ status = rtems_timer_create( rtems_build_name('T', 'M', '0', '1'), &Timer );
+ if ( status )
+ rtems_fatal_error_occurred(1);;
+
+ return RTEMS_SUCCESSFUL;
+}
+
+rtems_device_driver termios_test_driver_open(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void * arg
+)
+{
+ rtems_status_code sc;
+ rtems_libio_open_close_args_t *args = arg;
+ static const rtems_termios_callbacks Callbacks = {
+ NULL, /* firstOpen */
+ NULL, /* lastClose */
+ NULL, /* pollRead */
+ termios_test_driver_write_helper, /* write */
+ termios_test_driver_set_attributes, /* setAttributes */
+ NULL, /* stopRemoteTx */
+ NULL, /* startRemoteTx */
+ 0 /* outputUsesInterrupts */
+ };
+
+ if ( minor > 2 ) {
+ puts( "ERROR - Termios_testdriver - only 1 minor supported" );
+ rtems_test_exit(0);
+ }
+
+ sc = rtems_termios_open (major, minor, arg, &Callbacks);
+
+ Ttyp = args->iop->data1; /* Keep cookie returned by termios_open */
+
+ return RTEMS_SUCCESSFUL;
+}
+
+rtems_device_driver termios_test_driver_close(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void * arg
+)
+{
+ return rtems_termios_close (arg);
+}
+
+rtems_device_driver termios_test_driver_read(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void * arg
+)
+{
+ return rtems_termios_read (arg);
+}
+
+rtems_device_driver termios_test_driver_write(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void * arg
+)
+{
+ return rtems_termios_write (arg);
+}
+
+rtems_device_driver termios_test_driver_control(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void * arg
+)
+{
+ return rtems_termios_ioctl (arg);
+}
</font></pre>
<p> </p>
<a name='cs2'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-06-28 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1591/bsps
* preinstall.am: Regenerate.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/sparc64/niagara/ChangeLog.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>c/src/lib/libbsp/sparc64/niagara/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/sparc64/niagara/preinstall.am.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>c/src/lib/libbsp/sparc64/niagara/preinstall.am</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/sparc64/niagara/ChangeLog:1.2 rtems/c/src/lib/libbsp/sparc64/niagara/ChangeLog:1.3
--- rtems/c/src/lib/libbsp/sparc64/niagara/ChangeLog:1.2 Thu Jun 17 13:54:45 2010
+++ rtems/c/src/lib/libbsp/sparc64/niagara/ChangeLog Mon Jun 28 09:25:29 2010
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2010-06-28 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ PR 1591/bsps
+ * preinstall.am: Regenerate.
+
</font> 2010-06-17 Joel Sherrill <joel.sherrill@oarcorp.com>
* .cvsignore, include/.cvsignore: New files.
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/sparc64/niagara/preinstall.am:1.1 rtems/c/src/lib/libbsp/sparc64/niagara/preinstall.am:1.2
--- rtems/c/src/lib/libbsp/sparc64/niagara/preinstall.am:1.1 Thu Jun 17 11:20:34 2010
+++ rtems/c/src/lib/libbsp/sparc64/niagara/preinstall.am Mon Jun 28 09:25:29 2010
</font><font color='#997700'>@@ -110,14 +110,6 @@
</font> $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT)
TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT)
<font color='#880000'>-$(PROJECT_LIB)/asm.$(OBJEXT): asm.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_LIB)/asm.$(OBJEXT)
-TMPINSTALL_FILES += $(PROJECT_LIB)/asm.$(OBJEXT)
-
-$(PROJECT_LIB)/bspinit.$(OBJEXT): bspinit.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_LIB)/bspinit.$(OBJEXT)
-TMPINSTALL_FILES += $(PROJECT_LIB)/bspinit.$(OBJEXT)
-
</font> $(PROJECT_LIB)/linkcmds: ../shared/startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
</pre>
<p> </p>
<a name='cs3'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-06-28 Joel Sherrill <joel.sherrill@oarcorp.com>
* sp69/Makefile.am: Really needs spin.c
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/ChangeLog.diff?r1=text&tr1=1.387&r2=text&tr2=1.388&diff_format=h">M</a></td><td width='1%'>1.388</td><td width='100%'>testsuites/sptests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/sptests/sp69/Makefile.am.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>testsuites/sptests/sp69/Makefile.am</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/sptests/ChangeLog:1.387 rtems/testsuites/sptests/ChangeLog:1.388
--- rtems/testsuites/sptests/ChangeLog:1.387 Mon Jun 28 09:03:44 2010
+++ rtems/testsuites/sptests/ChangeLog Mon Jun 28 09:28:40 2010
</font><font color='#997700'>@@ -1,3 +1,7 @@
</font><font color='#000088'>+2010-06-28 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * sp69/Makefile.am: Really needs spin.c
+
</font> 2010-06-26 Bharath Suri <bharath.s.jois@gmail.com>
PR 1592/testing
<font color='#006600'>diff -u rtems/testsuites/sptests/sp69/Makefile.am:1.2 rtems/testsuites/sptests/sp69/Makefile.am:1.3
--- rtems/testsuites/sptests/sp69/Makefile.am:1.2 Mon Jun 28 08:51:04 2010
+++ rtems/testsuites/sptests/sp69/Makefile.am Mon Jun 28 09:28:40 2010
</font><font color='#997700'>@@ -5,7 +5,7 @@
</font> MANAGERS = all
rtems_tests_PROGRAMS = sp69
<font color='#880000'>-sp69_SOURCES = init.c
</font><font color='#000088'>+sp69_SOURCES = init.c ../../support/src/spin.c
</font>
dist_rtems_tests_DATA = sp69.scn
dist_rtems_tests_DATA += sp69.doc
</pre>
<p> </p>
<a name='cs4'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-06-28 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/dumpbuf/dumpbuf.c, libmisc/dumpbuf/dumpbuf.h: Add const.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2464&r2=text&tr2=1.2465&diff_format=h">M</a></td><td width='1%'>1.2465</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/dumpbuf/dumpbuf.h.diff?r1=text&tr1=1.5&r2=text&tr2=1.6&diff_format=h">M</a></td><td width='1%'>1.6</td><td width='100%'>cpukit/libmisc/dumpbuf/dumpbuf.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/dumpbuf/dumpbuf.c.diff?r1=text&tr1=1.7&r2=text&tr2=1.8&diff_format=h">M</a></td><td width='1%'>1.8</td><td width='100%'>cpukit/libmisc/dumpbuf/dumpbuf.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2464 rtems/cpukit/ChangeLog:1.2465
--- rtems/cpukit/ChangeLog:1.2464 Fri Jun 25 09:23:47 2010
+++ rtems/cpukit/ChangeLog Mon Jun 28 09:33:33 2010
</font><font color='#997700'>@@ -1,3 +1,7 @@
</font><font color='#000088'>+2010-06-28 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libmisc/dumpbuf/dumpbuf.c, libmisc/dumpbuf/dumpbuf.h: Add const.
+
</font> 2010-06-25 Jennifer Averett <Jennifer.Averett@OARcorp.com
* libcsupport/include/rtems/libio.h, libfs/Makefile.am: Added default
<font color='#006600'>diff -u rtems/cpukit/libmisc/dumpbuf/dumpbuf.h:1.5 rtems/cpukit/libmisc/dumpbuf/dumpbuf.h:1.6
--- rtems/cpukit/libmisc/dumpbuf/dumpbuf.h:1.5 Sun Nov 29 05:57:23 2009
+++ rtems/cpukit/libmisc/dumpbuf/dumpbuf.h Mon Jun 28 09:33:34 2010
</font><font color='#997700'>@@ -27,8 +27,8 @@
</font> * @param[in] length is the length of the buffer
*/
void rtems_print_buffer(
<font color='#880000'>- unsigned char *buffer,
- int length
</font><font color='#000088'>+ const unsigned char *buffer,
+ int length
</font> );
#ifdef __cplusplus
<font color='#006600'>diff -u rtems/cpukit/libmisc/dumpbuf/dumpbuf.c:1.7 rtems/cpukit/libmisc/dumpbuf/dumpbuf.c:1.8
--- rtems/cpukit/libmisc/dumpbuf/dumpbuf.c:1.7 Mon Sep 17 09:28:41 2007
+++ rtems/cpukit/libmisc/dumpbuf/dumpbuf.c Mon Jun 28 09:33:34 2010
</font><font color='#997700'>@@ -24,13 +24,13 @@
</font> */
static inline void Dump_Line(
<font color='#880000'>- unsigned char *buffer,
- int length
</font><font color='#000088'>+ const unsigned char *buffer,
+ int length
</font> );
void rtems_print_buffer(
<font color='#880000'>- unsigned char *buffer,
- int length
</font><font color='#000088'>+ const unsigned char *buffer,
+ int length
</font> )
{
<font color='#997700'>@@ -50,8 +50,8 @@
</font> }
static inline void Dump_Line(
<font color='#880000'>- unsigned char *buffer,
- int length
</font><font color='#000088'>+ const unsigned char *buffer,
+ int length
</font> )
{
</pre>
<p> </p>
<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>