<!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 (2011-03-14)</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>2011-03-14 Joel Sherrill <joel.sherrill@oarcorp.com>

        * Makefile.am, configure.ac: Add test for Mouse Parser Engine
        (Microsoft Mouse paths) and Serial Mouse Driver.
        * mouse01/.cvsignore, mouse01/Makefile.am, mouse01/init.c,
        mouse01/mouse01.doc, mouse01/mouse01.scn, mouse01/msmouse.c,
        mouse01/serial_mouse_config.c: 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.262&r2=text&tr2=1.263&diff_format=h">M</a></td><td width='1%'>1.263</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.50&r2=text&tr2=1.51&diff_format=h">M</a></td><td width='1%'>1.51</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.62&r2=text&tr2=1.63&diff_format=h">M</a></td><td width='1%'>1.63</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/mouse01/.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/mouse01/.cvsignore</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/mouse01/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/mouse01/Makefile.am</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/mouse01/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/mouse01/init.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/mouse01/mouse01.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/mouse01/mouse01.doc</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/mouse01/mouse01.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/mouse01/mouse01.scn</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/mouse01/msmouse.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/mouse01/msmouse.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/mouse01/serial_mouse_config.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/mouse01/serial_mouse_config.c</font></td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/libtests/ChangeLog:1.262 rtems/testsuites/libtests/ChangeLog:1.263
--- rtems/testsuites/libtests/ChangeLog:1.262   Thu Mar 10 09:41:58 2011
+++ rtems/testsuites/libtests/ChangeLog Mon Mar 14 11:18:10 2011
</font><font color='#997700'>@@ -1,3 +1,11 @@
</font><font color='#000088'>+2011-03-14    Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * Makefile.am, configure.ac: Add test for Mouse Parser Engine
+       (Microsoft Mouse paths) and Serial Mouse Driver.
+       * mouse01/.cvsignore, mouse01/Makefile.am, mouse01/init.c,
+       mouse01/mouse01.doc, mouse01/mouse01.scn, mouse01/msmouse.c,
+       mouse01/serial_mouse_config.c: New files.
+
</font> 2011-03-10        Sebastian Huber <sebastian.huber@embedded-brains.de>
 
        * heapwalk/init.c: Improve coverage.

<font color='#006600'>diff -u rtems/testsuites/libtests/Makefile.am:1.50 rtems/testsuites/libtests/Makefile.am:1.51
--- rtems/testsuites/libtests/Makefile.am:1.50  Wed Feb  2 08:02:10 2011
+++ rtems/testsuites/libtests/Makefile.am       Mon Mar 14 11:18:10 2011
</font><font color='#997700'>@@ -15,7 +15,8 @@
</font>     rtems++ tztest block01 block02 block03 block04 block05 block06 block07 \
     block08 block09 block10 stringto01 \
     tar01 tar02 tar03 \
<font color='#880000'>-    math mathf mathl complex
</font><font color='#000088'>+    math mathf mathl complex \
+    mouse01
</font> 
 include $(top_srcdir)/../automake/subdirs.am
 include $(top_srcdir)/../automake/local.am

<font color='#006600'>diff -u rtems/testsuites/libtests/configure.ac:1.62 rtems/testsuites/libtests/configure.ac:1.63
--- rtems/testsuites/libtests/configure.ac:1.62 Tue Feb 22 08:46:46 2011
+++ rtems/testsuites/libtests/configure.ac      Mon Mar 14 11:18:10 2011
</font><font color='#997700'>@@ -69,6 +69,7 @@
</font> malloc05/Makefile
 monitor/Makefile
 monitor02/Makefile
<font color='#000088'>+mouse01/Makefile
</font> putenvtest/Makefile
 rtems++/Makefile
 rtmonuse/Makefile

<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/mouse01/.cvsignore:1.1
--- /dev/null   Mon Mar 14 12:11:16 2011
+++ rtems/testsuites/libtests/mouse01/.cvsignore        Mon Mar 14 11:18:10 2011
</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/mouse01/Makefile.am:1.1
--- /dev/null   Mon Mar 14 12:11:16 2011
+++ rtems/testsuites/libtests/mouse01/Makefile.am       Mon Mar 14 11:18:10 2011
</font><font color='#997700'>@@ -0,0 +1,28 @@
</font><font color='#000088'>+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = mouse01
+mouse01_SOURCES = init.c serial_mouse_config.c msmouse.c\
+    ../termios04/termios_testdriver_intr.c
+
+dist_rtems_tests_DATA = mouse01.scn
+dist_rtems_tests_DATA += mouse01.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
+AM_CPPFLAGS += -I$(top_srcdir)/termios04
+
+LINK_OBJS = $(mouse01_OBJECTS) $(mouse01_LDADD)
+LINK_LIBS = $(mouse01_LDLIBS)
+
+mouse01$(EXEEXT): $(mouse01_OBJECTS) $(mouse01_DEPENDENCIES)
+       @rm -f mouse01$(EXEEXT)
+       $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/mouse01/init.c:1.1
--- /dev/null   Mon Mar 14 12:11:16 2011
+++ rtems/testsuites/libtests/mouse01/init.c    Mon Mar 14 11:18:10 2011
</font><font color='#997700'>@@ -0,0 +1,159 @@
</font><font color='#000088'>+/*
+ *  COPYRIGHT (c) 1989-2011.
+ *  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 <bsp.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <unistd.h>
+#include <rtems/mw_uid.h>
+#include "termios_testdriver_intr.h"
+#include "tmacros.h"
+
+extern const char *Mouse_Type_Long;
+extern const char *Mouse_Type_Short;
+extern const unsigned char Mouse_Actions[];
+extern const size_t Mouse_Actions_Size;
+extern const size_t Mouse_Actions_Per_Iteration;
+
+int Mouse_Index = 0;
+
+bool enqueue_next_action(
+  const unsigned char *actions,
+  size_t               max,
+  size_t               to_enqueue
+)
+{
+  if ( (Mouse_Index + to_enqueue) > max )
+    return false;
+
+  termios_test_driver_set_rx_enqueue_now( true );
+<span style="background-color: #FF0000">  </span>
+  termios_test_driver_set_rx( &actions[Mouse_Index], to_enqueue );
+  Mouse_Index += to_enqueue;
+
+  return true;
+}
+
+int Test_fd;
+
+void open_it(void)
+{
+  /* open the file */
+  puts( "open(/dev/mouse) - OK " );
+  Test_fd = open( "/dev/mouse", O_RDONLY );
+  rtems_test_assert( Test_fd != -1 );
+}
+
+void register_it(void)
+{
+  int                rc;
+  char               name[5] = "mous";
+
+  printf( "uid_open_queue() - mouse queue\n" );
+  rc = uid_open_queue( name, 0, 10 );
+  rtems_test_assert( rc == 0 );
+
+  printf( "uid_register_device() - OK\n");
+  rc = uid_register_device( Test_fd, name );
+  rtems_test_assert( rc == 0 );
+}
+
+void printf_uid_message(
+  struct MW_UID_MESSAGE *uid
+)
+{
+  uid_print_message_with_plugin(
+    stdout,
+    (rtems_printk_plugin_t)fprintf,
+    uid
+  );
+}
+
+void receive_uid_message(void)
+{
+  int                    rc;
+  struct MW_UID_MESSAGE  uid;
+
+  rc = uid_read_message( &uid, 0 );
+  if ( rc != sizeof(struct MW_UID_MESSAGE) )
+    return;
+  printf_uid_message( &uid );
+}
+
+void close_it(void)
+{
+  int rc;
+
+  printf( "uid_unregister_device() - OK\n" );
+  rc = uid_unregister_device( Test_fd );
+  rtems_test_assert( rc == 0 );
+
+  puts( "close(/dev/mouse) - OK " );
+  rc = close( Test_fd );
+  rtems_test_assert( rc == 0 );
+}
+
+rtems_task Init(
+  rtems_task_argument ignored
+)
+{
+  bool more_data;
+
+  printf( "\n\n*** %s TEST ***\n", Mouse_Type_Long );
+
+  open_it();
+  register_it();<span style="background-color: #FF0000"> </span>
+  do {
+    more_data = enqueue_next_action(
+      Mouse_Actions,
+      Mouse_Actions_Size,<span style="background-color: #FF0000"> </span>
+      Mouse_Actions_Per_Iteration
+    );
+    receive_uid_message();
+  } while (more_data);
+  close_it();<span style="background-color: #FF0000"> </span>
+  printf( "*** END OF %s TEST ***\n", Mouse_Type_Long );
+  rtems_test_exit( 0 );
+}
+
+/* configuration information */
+
+#include <rtems/serial_mouse.h>
+#include "termios_testdriver_intr.h"
+
+/* NOTICE: the clock driver is explicitly disabled */
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_EXTRA_DRIVERS \
+    TERMIOS_TEST_DRIVER_TABLE_ENTRY, \
+    SERIAL_MOUSE_DRIVER_TABLE_ENTRY
+
+/* one for the console and one for the test port */
+#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2
+
+/* we need to be able to open the test device and mouse */
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 5
+#define CONFIGURE_MAXIMUM_TASKS  1
+#define CONFIGURE_MAXIMUM_TIMERS 2
+#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
+
+#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/mouse01/mouse01.doc:1.1
--- /dev/null   Mon Mar 14 12:11:16 2011
+++ rtems/testsuites/libtests/mouse01/mouse01.doc       Mon Mar 14 11:18:10 2011
</font><font color='#997700'>@@ -0,0 +1,26 @@
</font><font color='#000088'>+#
+#  $Id$
+#
+#  COPYRIGHT (c) 2011.
+#  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:  mouse01
+
+directives:
+  + None
+  + Mouse Parser Engine (cpukit/libmisc/mouse)
+  + Generic Serial Mouse Driver (cpukit/libmisc/mouse)
+
+concepts:
+
++ The purpose of this test is to exercise paths in the Mouse Parser Engine
+  related to parsing the input from a Microsoft Serial Mouse.
+
++ This test also exercises the serial mouse driver.
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/mouse01/mouse01.scn:1.1
--- /dev/null   Mon Mar 14 12:11:16 2011
+++ rtems/testsuites/libtests/mouse01/mouse01.scn       Mon Mar 14 11:18:10 2011
</font><font color='#997700'>@@ -0,0 +1,13 @@
</font><font color='#000088'>+*** Microsoft Mouse TEST ***
+open(/dev/mouse) - OK<span style="background-color: #FF0000"> </span>
+uid_open_queue() - mouse queue
+uid_register_device() - OK
+SerialMouse: reg=mous
+Device: /dev/mouse -- mouse type is: ms
+MV_UID_REL_POS - LEFT=down CENTER=up RIGHT=up x=1 y=2 z=0
+MV_UID_REL_POS - LEFT=up CENTER=up RIGHT=down x=1 y=2 z=0
+MV_UID_REL_POS - LEFT=up CENTER=up RIGHT=up x=-1 y=2 z=0
+MV_UID_REL_POS - LEFT=up CENTER=up RIGHT=up x=1 y=63 z=0
+uid_unregister_device() - OK
+close(/dev/mouse) - OK<span style="background-color: #FF0000"> </span>
+*** END OF Microsoft Mouse TEST ***
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/mouse01/msmouse.c:1.1
--- /dev/null   Mon Mar 14 12:11:16 2011
+++ rtems/testsuites/libtests/mouse01/msmouse.c Mon Mar 14 11:18:10 2011
</font><font color='#997700'>@@ -0,0 +1,35 @@
</font><font color='#000088'>+/*
+ *  COPYRIGHT (c) 1989-2011.
+ *  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 <sys/types.h>
+
+const char *Mouse_Type_Long = "Microsoft Mouse";
+const char *Mouse_Type_Short = "ms";
+
+#define PRESSED     1<span style="background-color: #FF0000"> </span>
+#define NOT_PRESSED 0<span style="background-color: #FF0000"> </span>
+
+#define MS_MOUSE_BYTES( _lb, _rb, _x, _y ) \
+  (0x40 | ((_lb) ? 0x20 : 0x00) | ((_rb) ? 0x10 : 0x00) | \
+     ((_y & 0xC) >> 4) | (_x >> 6)), \
+  (_x & 0x3F), \
+  (_y & 0x3F)
+
+const unsigned char Mouse_Actions[] = {
+  MS_MOUSE_BYTES(     PRESSED, NOT_PRESSED,    1,    2),
+  MS_MOUSE_BYTES( NOT_PRESSED, PRESSED,        1,    2),
+  MS_MOUSE_BYTES( NOT_PRESSED, NOT_PRESSED, 0xff,    2),
+  MS_MOUSE_BYTES( NOT_PRESSED, NOT_PRESSED,    1, 0xff)
+};
+
+const size_t Mouse_Actions_Size = sizeof(Mouse_Actions);
+const size_t Mouse_Actions_Per_Iteration = 3;
+
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/mouse01/serial_mouse_config.c:1.1
--- /dev/null   Mon Mar 14 12:11:16 2011
+++ rtems/testsuites/libtests/mouse01/serial_mouse_config.c     Mon Mar 14 11:18:10 2011
</font><font color='#997700'>@@ -0,0 +1,32 @@
</font><font color='#000088'>+/*
+ *
+ * $Id$
+ *
+ * MODULE DESCRIPTION:
+ * This module implements the RTEMS drivers for the PC serial ports
+ * as /dev/ttyS1 for COM1 and /dev/ttyS2 as COM2. If one of the ports
+ * is used as the console, this driver would fail to initialize.
+ *
+ * This code was based on the console driver. It is based on the
+ * current termios framework. This is just a shell around the
+ * termios support.
+ *
+ */
+
+#include "tmacros.h"
+#include <rtems/serial_mouse.h>
+#include "termios_testdriver_intr.h"
+
+extern const char *Mouse_Type_Short;
+
+bool bsp_get_serial_mouse_device(
+  const char **name,
+  const char **type
+)
+{
+  *name = TERMIOS_TEST_DRIVER_DEVICE_NAME;
+  *type = Mouse_Type_Short;
+
+  printf("Mouse Device: name=%s type=%s\n", *name, *type );
+  return true;
+}
</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>2011-03-14 Joel Sherrill <joel.sherrill@oarcorp.com>

        * libfs/src/imfs/deviceerrno.c: Add RTEMS_INVALID_CLOCK,
        RTEMS_INVALID_NODE, and RTEMS_NOT_CONFIGURED.
</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.2771&r2=text&tr2=1.2772&diff_format=h">M</a></td><td width='1%'>1.2772</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/deviceerrno.c.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%'>cpukit/libfs/src/imfs/deviceerrno.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2771 rtems/cpukit/ChangeLog:1.2772
--- rtems/cpukit/ChangeLog:1.2771       Mon Mar 14 09:56:06 2011
+++ rtems/cpukit/ChangeLog      Mon Mar 14 11:23:59 2011
</font><font color='#997700'>@@ -1,5 +1,10 @@
</font> 2011-03-14        Joel Sherrill <joel.sherrill@oarcorp.com>
 
<font color='#000088'>+   * libfs/src/imfs/deviceerrno.c: Add RTEMS_INVALID_CLOCK,
+       RTEMS_INVALID_NODE, and RTEMS_NOT_CONFIGURED.
+
+2011-03-14     Joel Sherrill <joel.sherrill@oarcorp.com>
+
</font>   PR 1762/cpukit
        * Makefile.am, preinstall.am, libmisc/Makefile.am, wrapup/Makefile.am:
        Add generic serial mouse driver and mouse parser. The parser code was

<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/deviceerrno.c:1.2 rtems/cpukit/libfs/src/imfs/deviceerrno.c:1.3
--- rtems/cpukit/libfs/src/imfs/deviceerrno.c:1.2       Tue Jun  8 03:30:04 2010
+++ rtems/cpukit/libfs/src/imfs/deviceerrno.c   Mon Mar 14 11:24:00 2011
</font><font color='#997700'>@@ -44,6 +44,9 @@
</font>   [RTEMS_ILLEGAL_ON_REMOTE_OBJECT] = EIO,
   [RTEMS_CALLED_FROM_ISR]          = EIO,
   [RTEMS_INVALID_PRIORITY]         = EIO,
<font color='#000088'>+  [RTEMS_INVALID_CLOCK]            = EINVAL,
+  [RTEMS_INVALID_NODE]             = EINVAL,
+  [RTEMS_NOT_CONFIGURED]           = ENOSYS,
</font>   [RTEMS_NOT_OWNER_OF_RESOURCE]    = EPERM,
   [RTEMS_NOT_IMPLEMENTED]          = ENOSYS,
   [RTEMS_INTERNAL_ERROR]           = EIO,
</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>