<!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-02-09)</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-02-09 Jennifer Averett <jennifer.averett@oarcorp.com>

        * console/ps2_mouse.c: Formatting changes in preparation for making
        mouse parsing and serial mouse driver BSP independent.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/i386/pc386/ChangeLog.diff?r1=text&tr1=1.266&r2=text&tr2=1.267&diff_format=h">M</a></td><td width='1%'>1.267</td><td width='100%'>c/src/lib/libbsp/i386/pc386/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/c/src/lib/libbsp/i386/pc386/console/ps2_mouse.c.diff?r1=text&tr1=1.14&r2=text&tr2=1.15&diff_format=h">M</a></td><td width='1%'>1.15</td><td width='100%'>c/src/lib/libbsp/i386/pc386/console/ps2_mouse.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/c/src/lib/libbsp/i386/pc386/ChangeLog:1.266 rtems/c/src/lib/libbsp/i386/pc386/ChangeLog:1.267
--- rtems/c/src/lib/libbsp/i386/pc386/ChangeLog:1.266   Wed Feb  9 02:22:58 2011
+++ rtems/c/src/lib/libbsp/i386/pc386/ChangeLog Wed Feb  9 09:57:29 2011
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2011-02-09    Jennifer Averett <jennifer.averett@oarcorp.com>
+
+       * console/ps2_mouse.c: Formatting changes in preparation for making
+       mouse parsing and serial mouse driver BSP independent.
+
</font> 2011-02-09        Ralf Corsépius <ralf.corsepius@rtems.org>
 
        * timer/timer.c: Include <rtems/btimer.h>.

<font color='#006600'>diff -u rtems/c/src/lib/libbsp/i386/pc386/console/ps2_mouse.c:1.14 rtems/c/src/lib/libbsp/i386/pc386/console/ps2_mouse.c:1.15
--- rtems/c/src/lib/libbsp/i386/pc386/console/ps2_mouse.c:1.14  Mon Apr 12 11:32:54 2010
+++ rtems/c/src/lib/libbsp/i386/pc386/console/ps2_mouse.c       Wed Feb  9 09:57:29 2011
</font><font color='#997700'>@@ -68,7 +68,7 @@
</font>  */
 void ps2_set_driver_handler( int port, void ( *handler )( void *,  unsigned char *, int ) )
 {
<font color='#880000'>-   driver_input_handler_ps2 = handler;
</font><font color='#000088'>+  driver_input_handler_ps2 = handler;
</font> }
 
 static void mdelay( unsigned long t )
<font color='#997700'>@@ -117,82 +117,80 @@
</font> 
 static void kb_wait(void)
 {
<font color='#880000'>-   unsigned long timeout = KBC_TIMEOUT;
</font><font color='#000088'>+  unsigned long timeout = KBC_TIMEOUT;
</font> 
<font color='#880000'>-   do {
-               /*
-                * "handle_kbd_event()" will handle any incoming events
-                * while we wait - keypresses or mouse movement.
-                */
-               unsigned char status = handle_kbd_event();
-
-               if (! (status & KBD_STAT_IBF))
-                       return;
-
-               mdelay(1);
-
-               timeout--;
-       } while (timeout);
-#ifdef KBD_REPORT_TIMEOUTS
-       printk( "Keyboard timed out[1]\n");
-#endif
</font><font color='#000088'>+  do {
+    /*
+     * "handle_kbd_event()" will handle any incoming events
+     * while we wait - keypresses or mouse movement.
+     */
+    unsigned char status = handle_kbd_event();
+
+    if (! (status & KBD_STAT_IBF))
+      return;
+
+    mdelay(1);
+    timeout--;
+  } while (timeout);
+
+  #ifdef KBD_REPORT_TIMEOUTS
+    printk( "Keyboard timed out[1]\n");
+  #endif
</font> }
 
 static int do_acknowledge(unsigned char scancode)
 {
<font color='#880000'>-   if (reply_expected) {
-         /* Unfortunately, we must recognise these codes only if we know they
-          * are known to be valid (i.e., after sending a command), because there
-          * are some brain-damaged keyboards (yes, FOCUS 9000 again) which have
-          * keys with such codes :(
-          */
-               if (scancode == KBD_REPLY_ACK) {
-                       acknowledge = 1;
-                       reply_expected = 0;
-                       return 0;
-               } else if (scancode == KBD_REPLY_RESEND) {
-                       resend = 1;
-                       reply_expected = 0;
-                       return 0;
-               }
-               /* Should not happen... */
-#if 0
-               printk( "keyboard reply expected - got %02x\n",
-                      scancode);
-#endif
-       }
-       return 1;
</font><font color='#000088'>+  if (reply_expected) {
+
+    /* Unfortunately, we must recognise these codes only if we know they
+     * are known to be valid (i.e., after sending a command), because there
+     * are some brain-damaged keyboards (yes, FOCUS 9000 again) which have
+     * keys with such codes :(
+     */
+    if (scancode == KBD_REPLY_ACK) {
+      acknowledge = 1;
+      reply_expected = 0;
+      return 0;
+    } else if (scancode == KBD_REPLY_RESEND) {
+      resend = 1;
+      reply_expected = 0;
+      return 0;
+    }
+
+    /* Should not happen... */
+    #if 0
+      printk( "keyboard reply expected - got %02x\n", scancode);
+    #endif
+  }
+  return 1;
</font> }
 
 static inline void handle_mouse_event(unsigned char scancode)
 {
<font color='#880000'>-   if (mouse_reply_expected) {
-               if (scancode == AUX_ACK) {
-                       mouse_reply_expected--;
-                       return;
-               }
-               mouse_reply_expected = 0;
-       }
-
-       if (aux_count) {
-               int head = queue->head;
-
-               queue->buf[head] = scancode;
-               head = (head + 1) & (AUX_BUF_SIZE-1);
-               if (head != queue->tail) {
-                       queue->head = head;
-               }
-      /* if the input queue is active, add to it */
-      if( driver_input_handler_ps2 )
-      {
-          driver_input_handler_ps2( NULL,  &scancode, 1 );
-      }
-      else
-      {
-         /* post this byte to termios */
-<span style="background-color: #FF0000">  </span>              rtems_termios_enqueue_raw_characters( termios_ttyp_paux, (char *)&scancode, 1 );
-      }
-       }
</font><font color='#000088'>+  if (mouse_reply_expected) {
+    if (scancode == AUX_ACK) {
+      mouse_reply_expected--;
+      return;
+    }
+    mouse_reply_expected = 0;
+  }
+
+  if (aux_count) {
+    int head = queue->head;
+    queue->buf[head] = scancode;
+    head = (head + 1) & (AUX_BUF_SIZE-1);
+    if (head != queue->tail) {
+      queue->head = head;
+    }
+
+    /* if the input queue is active, add to it */
+    if( driver_input_handler_ps2 ) {
+      driver_input_handler_ps2( NULL,  &scancode, 1 );
+    } else {
+      /* post this byte to termios */
+      rtems_termios_enqueue_raw_characters( termios_ttyp_paux, (char *)&scancode, 1 );
+    }
+  }
</font> }
 
 /*
<font color='#997700'>@@ -204,141 +202,44 @@
</font>  */
 static unsigned char handle_kbd_event(void)
 {
<font color='#880000'>-   unsigned char status = kbd_read_status();
-       unsigned int work = 10000;
-
-       while (status & KBD_STAT_OBF) {
-               unsigned char scancode;
-
-               scancode = kbd_read_input();
</font><font color='#000088'>+  unsigned char status = kbd_read_status();
+  unsigned int work = 10000;
</font> 
<font color='#880000'>-           if (status & KBD_STAT_MOUSE_OBF) {
-                       handle_mouse_event(scancode);
-               } else {
-                       do_acknowledge(scancode);
-         printk("pc_keyb: %X ", scancode );
-               }
-               status = kbd_read_status();
-               if(!work--)
-               {
-                       printk("pc_keyb: controller jammed (0x%02X).\n",
-                               status);
-                       break;
-               }
-       }
-
-       return status;
</font><font color='#000088'>+  while (status & KBD_STAT_OBF) {
+    unsigned char scancode;
+    scancode = kbd_read_input();
+    if (status & KBD_STAT_MOUSE_OBF) {
+      handle_mouse_event(scancode);
+    } else {
+      do_acknowledge(scancode);
+      printk("pc_keyb: %X ", scancode );
+    }
+    status = kbd_read_status();
+    if(!work--) {
+      printk("pc_keyb: controller jammed (0x%02X).\n", status);
+      break;
+    }
+  }
+  return status;
</font> }
 
 static void ps2_mouse_interrupt(rtems_irq_hdl_param ignored)
 {
<font color='#880000'>-   handle_kbd_event();
</font><font color='#000088'>+  handle_kbd_event();
</font> }
 
<font color='#880000'>-/*
- * send_data sends a character to the keyboard and waits
- * for an acknowledge, possibly retrying if asked to. Returns
- * the success status.
- *
- * Don't use 'jiffies', so that we don't depend on interrupts
- */
-#if 0
-static int send_data(unsigned char data)
-{
-       int retries = 3;
-
-       do {
-               unsigned long timeout = KBD_TIMEOUT;
-
-               acknowledge = 0; /* Set by interrupt routine on receipt of ACK. */
-               resend = 0;
-               reply_expected = 1;
-               kbd_write_output_w(data);
-               for (;;) {
-                       if (acknowledge)
-                               return 1;
-                       if (resend)
-                               break;
-                       mdelay(1);
-                       if (!--timeout) {
-#ifdef KBD_REPORT_TIMEOUTS
-                               printk( "Keyboard timeout[2]\n");
-#endif
-                               return 0;
-                       }
-               }
-       } while (retries-- > 0);
-#ifdef KBD_REPORT_TIMEOUTS
-       printk( "keyboard: Too many NACKs -- noisy kbd cable?\n");
-#endif
-       return 0;
-}
-#endif
-
-#if 0
-#define KBD_NO_DATA    (-1)    /* No data */
-#define KBD_BAD_DATA   (-2)    /* Parity or other error */
-
-static int kbd_read_data(void)
-{
-       int retval = KBD_NO_DATA;
-       unsigned char status;
-
-       status = kbd_read_status();
-       if (status & KBD_STAT_OBF) {
-               unsigned char data = kbd_read_input();
-
-               retval = data;
-               if (status & (KBD_STAT_GTO | KBD_STAT_PERR))
-                       retval = KBD_BAD_DATA;
-       }
-       return retval;
-}
-
-static void kbd_clear_input(void)
-{
-       int maxread = 100;      /* Random number */
-
-       do {
-               if (kbd_read_data() == KBD_NO_DATA)
-                       break;
-       } while (--maxread);
-}
-
-static int kbd_wait_for_input(void)
-{
-       long timeout = KBD_INIT_TIMEOUT;
-
-       do {
-               int retval = kbd_read_data();
-               if (retval >= 0)
-                       return retval;
-               mdelay(1);
-       } while (--timeout);
-       return -1;
-}
-#endif
-
</font> static void kbd_write_command_w(int data)
 {
<font color='#880000'>-   kb_wait();
-       kbd_write_command(data);
-}
-
-#if 0
-static void kbd_write_output_w(int data)
-{
-       kb_wait();
-       kbd_write_output(data);
</font><font color='#000088'>+  kb_wait();
+  kbd_write_command(data);
</font> }
<font color='#880000'>-#endif
</font> 
 static void kbd_write_cmd(int cmd)
 {
<font color='#880000'>-   kb_wait();
-       kbd_write_command(KBD_CCMD_WRITE_MODE);
-       kb_wait();
-       kbd_write_output(cmd);
</font><font color='#000088'>+  kb_wait();
+  kbd_write_command(KBD_CCMD_WRITE_MODE);
+  kb_wait();
+  kbd_write_output(cmd);
</font> }
 
 /*
<font color='#997700'>@@ -346,36 +247,35 @@
</font>  */
 static int detect_auxiliary_port(void)
 {
<font color='#880000'>-   int loops = 10;
-       int retval = 0;
</font><font color='#000088'>+  int loops = 10;
+  int retval = 0;
</font> 
<font color='#880000'>-   /* Put the value 0x5A in the output buffer using the "Write
-        * Auxiliary Device Output Buffer" command (0xD3). Poll the
-        * Status Register for a while to see if the value really
-        * turns up in the Data Register. If the KBD_STAT_MOUSE_OBF
-        * bit is also set to 1 in the Status Register, we assume this
-        * controller has an Auxiliary Port (a.k.a. Mouse Port).
-        */
-       kb_wait();
-       kbd_write_command(KBD_CCMD_WRITE_AUX_OBUF);
-
-       kb_wait();
-       kbd_write_output(0x5a); /* 0x5a is a random dummy value. */
-
-       do {
-               unsigned char status = kbd_read_status();
-
-               if (status & KBD_STAT_OBF) {
-                       (void) kbd_read_input();
-                       if (status & KBD_STAT_MOUSE_OBF) {
-                               printk( "Detected PS/2 Mouse Port.\n");
-                               retval = 1;
-                       }
-                       break;
-               }
-               mdelay(1);
-       } while (--loops);
-       return retval;
</font><font color='#000088'>+  /* Put the value 0x5A in the output buffer using the "Write
+   * Auxiliary Device Output Buffer" command (0xD3). Poll the
+   * Status Register for a while to see if the value really
+   * turns up in the Data Register. If the KBD_STAT_MOUSE_OBF
+   * bit is also set to 1 in the Status Register, we assume this
+   * controller has an Auxiliary Port (a.k.a. Mouse Port).
+   */
+  kb_wait();
+  kbd_write_command(KBD_CCMD_WRITE_AUX_OBUF);
+
+  kb_wait();
+  kbd_write_output(0x5a); /* 0x5a is a random dummy value. */
+
+  do {
+    unsigned char status = kbd_read_status();
+    if (status & KBD_STAT_OBF) {
+      kbd_read_input();
+      if (status & KBD_STAT_MOUSE_OBF) {
+        printk( "Detected PS/2 Mouse Port.\n");
+        retval = 1;
+      }
+      break;
+    }
+    mdelay(1);
+  } while (--loops);
+  return retval;
</font> }
 
 /*
<font color='#997700'>@@ -383,10 +283,10 @@
</font>  */
 static void aux_write_dev(int val)
 {
<font color='#880000'>-   kb_wait();
-       kbd_write_command(KBD_CCMD_WRITE_MOUSE);
-       kb_wait();
-       kbd_write_output(val);
</font><font color='#000088'>+  kb_wait();
+  kbd_write_command(KBD_CCMD_WRITE_MOUSE);
+  kb_wait();
+  kbd_write_output(val);
</font> }
 
 /*
<font color='#997700'>@@ -394,26 +294,26 @@
</font>  */
 static void aux_write_ack(int val)
 {
<font color='#880000'>-   kb_wait();
-       kbd_write_command(KBD_CCMD_WRITE_MOUSE);
-       kb_wait();
-       kbd_write_output(val);
-       /* we expect an ACK in response. */
-       mouse_reply_expected++;
-       kb_wait();
</font><font color='#000088'>+  kb_wait();
+  kbd_write_command(KBD_CCMD_WRITE_MOUSE);
+  kb_wait();
+  kbd_write_output(val);
+  /* we expect an ACK in response. */
+  mouse_reply_expected++;
+  kb_wait();
</font> }
 
 static unsigned char get_from_queue(void)
 {
<font color='#880000'>-   unsigned char result;
-       result = queue->buf[queue->tail];
-       queue->tail = (queue->tail + 1) & (AUX_BUF_SIZE-1);
-       return result;
</font><font color='#000088'>+  unsigned char result;
+  result = queue->buf[queue->tail];
+  queue->tail = (queue->tail + 1) & (AUX_BUF_SIZE-1);
+  return result;
</font> }
 
 static int queue_empty(void)
 {
<font color='#880000'>-   return queue->head == queue->tail;
</font><font color='#000088'>+  return queue->head == queue->tail;
</font> }
 
 /*
<font color='#997700'>@@ -423,14 +323,14 @@
</font> 
 static int release_aux(void)
 {
<font color='#880000'>-   if (--aux_count)
-               return 0;
-       kbd_write_cmd(AUX_INTS_OFF);                        /* Disable controller ints */
-       kbd_write_command_w(KBD_CCMD_MOUSE_DISABLE);
-
-   BSP_remove_rtems_irq_handler( &ps2_isr_data );
-       return 0;
</font><font color='#000088'>+  if (--aux_count)
+    return 0;
+  kbd_write_cmd(AUX_INTS_OFF);                     /* Disable controller ints */
+  kbd_write_command_w(KBD_CCMD_MOUSE_DISABLE);
+  BSP_remove_rtems_irq_handler( &ps2_isr_data );
+  return 0;
</font> }
<font color='#000088'>+
</font> /*
  * Install interrupt handler.
  * Enable auxiliary device.
<font color='#997700'>@@ -463,116 +363,98 @@
</font>  */
 size_t read_aux(char * buffer, size_t count )
 {
<font color='#880000'>-   size_t i = count;
-       unsigned char c;
</font><font color='#000088'>+  size_t i = count;
+  unsigned char c;
</font> 
<font color='#880000'>-   if (queue_empty())
-       {
-               return 0;
-   }
-       while (i > 0 && !queue_empty())
-       {
-               c = get_from_queue();
-               *buffer++ = c;
-               i--;
-       }
-       return count-i;
</font><font color='#000088'>+  if (queue_empty()) {
+    return 0;
+  }
+  while (i > 0 && !queue_empty()) {
+    c = get_from_queue();
+    *buffer++ = c;
+    i--;
+  }
+  return count-i;
</font> }
 
 /*
  * Write to the aux device.
  */
<font color='#880000'>-
</font> static int write_aux( int minor, const char * buffer, int count )
 {
<font color='#880000'>-   int retval = 0;
-
-       if (count) {
-               int written = 0;
</font><font color='#000088'>+  int retval = 0;
</font> 
<font color='#880000'>-           if (count > 32)
-                       count = 32; /* Limit to 32 bytes. */
-               do {
-                       char c;
-                       c = *buffer++;
-                       aux_write_dev(c);
-                       written++;
-               } while (--count);
-               retval = -EIO;
-               if (written) {
-                       retval = written;
-               }
-       }
-       return retval;
-}
-
-#if 0
-static unsigned int aux_poll()
-{
-       if( !queue_empty() )
-               return 1;
-       return 0;
</font><font color='#000088'>+  if (count) {
+    int written = 0;
+    if (count > 32)
+      count = 32; /* Limit to 32 bytes. */
+    do {
+      char c;
+      c = *buffer++;
+      aux_write_dev(c);
+      written++;
+    } while (--count);
+    retval = -EIO;
+    if (written) {
+      retval = written;
+    }
+  }
+  return retval;
</font> }
<font color='#880000'>-#endif
</font> 
 static int psaux_init( void )
 {
<font color='#880000'>-   if( !detect_auxiliary_port() )
-   {
-<span style="background-color: #FF0000">   </span>       printk( "PS/2 - mouse not found.\n" );
-               return -EIO;
-   }
-
-       queue = (struct aux_queue *)malloc( sizeof(*queue) );
-   memset(queue, 0, sizeof(*queue));
-       queue->head = queue->tail = 0;
-       queue->proc_list = NULL;
-
-#ifdef INITIALIZE_MOUSE
-       kbd_write_command_w(KBD_CCMD_MOUSE_ENABLE); /* Enable Aux. */
-       aux_write_ack(AUX_SET_SAMPLE);
-       aux_write_ack(100);                           /* 100 samples/sec */
-       aux_write_ack(AUX_SET_RES);
-       aux_write_ack(3);                                /* 8 counts per mm */
-       aux_write_ack(AUX_SET_SCALE21); /* 2:1 scaling */
-#endif /* INITIALIZE_MOUSE */
-       kbd_write_command(KBD_CCMD_MOUSE_DISABLE); /* Disable aux device. */
-       kbd_write_cmd(AUX_INTS_OFF); /* Disable controller ints. */
-       return 0;
</font><font color='#000088'>+  if( !detect_auxiliary_port() ) {
+    printk( "PS/2 - mouse not found.\n" );
+    return -EIO;
+  }
+  queue = (struct aux_queue *)malloc( sizeof(*queue) );
+  memset(queue, 0, sizeof(*queue));
+  queue->head = queue->tail = 0;
+  queue->proc_list = NULL;
+
+  #ifdef INITIALIZE_MOUSE
+    kbd_write_command_w(KBD_CCMD_MOUSE_ENABLE); /* Enable Aux. */
+    aux_write_ack(AUX_SET_SAMPLE);
+    aux_write_ack(100);                              /* 100 samples/sec */
+    aux_write_ack(AUX_SET_RES);
+    aux_write_ack(3);                           /* 8 counts per mm */
+    aux_write_ack(AUX_SET_SCALE21);    /* 2:1 scaling */
+  #endif /* INITIALIZE_MOUSE */
+  kbd_write_command(KBD_CCMD_MOUSE_DISABLE); /* Disable aux device. */
+  kbd_write_cmd(AUX_INTS_OFF); /* Disable controller ints. */
+  return 0;
</font> }
 
 /*
  * paux device driver INITIALIZE entry point.
  */
<font color='#880000'>-rtems_device_driver
-paux_initialize(  rtems_device_major_number major,
-                   rtems_device_minor_number minor,
-                   void                      *arg)
</font><font color='#000088'>+rtems_device_driver paux_initialize(<span style="background-color: #FF0000">  </span>
+  rtems_device_major_number major,
+  rtems_device_minor_number minor,
+  void                      *arg)
</font> {
<font color='#880000'>-   rtems_status_code status;
</font><font color='#000088'>+  rtems_status_code status;
</font> 
   /*
    * Set up TERMIOS
    */
<font color='#880000'>-   rtems_termios_initialize();
</font><font color='#000088'>+  rtems_termios_initialize();
</font> 
<font color='#880000'>-   printk( "PS/2 mouse probe.\n" );
-   if( psaux_init() < 0 )
-   {
-      printk("Error detecting PS/2 mouse --\n");
-
-      /* we might want to finish the application here !!! */
-   }
-   open_aux();
</font><font color='#000088'>+  printk( "PS/2 mouse probe.\n" );
+  if( psaux_init() < 0 ) {
+    printk("Error detecting PS/2 mouse --\n");
+    /* we might want to finish the application here !!! */
+  }
+  open_aux();
</font> 
   /*
    * Register the device
    */
   status = rtems_io_register_name ("/dev/mouse", major, 0);
<font color='#880000'>-  if (status != RTEMS_SUCCESSFUL)
-  {
-      printk("Error registering paux device!\n");
-      rtems_fatal_error_occurred (status);
</font><font color='#000088'>+  if (status != RTEMS_SUCCESSFUL) {
+    printk("Error registering paux device!\n");
+    rtems_fatal_error_occurred (status);
</font>   }
   return RTEMS_SUCCESSFUL;
 } /* tty_initialize */
<font color='#997700'>@@ -590,16 +472,16 @@
</font>  */
 static ssize_t write_aux_echo( int minor, const char * buffer, size_t count )
 {
<font color='#880000'>-   return 0;
</font><font color='#000088'>+  return 0;
</font> }
 
 /*
  * paux device driver OPEN entry point
  */
<font color='#880000'>-rtems_device_driver
-paux_open(rtems_device_major_number major,
-                rtems_device_minor_number minor,
-                void                      *arg)
</font><font color='#000088'>+rtems_device_driver paux_open(
+  rtems_device_major_number major,
+  rtems_device_minor_number minor,
+  void                      *arg)
</font> {
   rtems_status_code              status;
   static rtems_termios_callbacks cb =
<font color='#997700'>@@ -622,10 +504,10 @@
</font> /*
  * paux device driver CLOSE entry point
  */
<font color='#880000'>-rtems_device_driver
-paux_close(rtems_device_major_number major,
-           rtems_device_minor_number minor,
-           void                      *arg)
</font><font color='#000088'>+rtems_device_driver paux_close(
+  rtems_device_major_number major,
+  rtems_device_minor_number minor,
+  void                      *arg)
</font> {
   return (rtems_termios_close (arg));
 }
<font color='#997700'>@@ -634,10 +516,10 @@
</font>  * paux device driver READ entry point.
  * Read characters from the PS/2 mouse.
  */
<font color='#880000'>-rtems_device_driver
-paux_read(rtems_device_major_number major,
-          rtems_device_minor_number minor,
-         void                      *arg)
</font><font color='#000088'>+rtems_device_driver paux_read(
+  rtems_device_major_number major,
+  rtems_device_minor_number minor,
+  void                      *arg)
</font> {
   return rtems_termios_read (arg);
 } /* tty_read */
<font color='#997700'>@@ -646,10 +528,10 @@
</font>  * paux device driver WRITE entry point.
  * Write characters to the PS/2 mouse.
  */
<font color='#880000'>-rtems_device_driver
-paux_write(rtems_device_major_number major,
-          rtems_device_minor_number minor,
-          void                    * arg)
</font><font color='#000088'>+rtems_device_driver  paux_write(
+  rtems_device_major_number major,
+  rtems_device_minor_number minor,
+  void                      *arg)
</font> {
   rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *)arg;
   char                  *buffer  = rw_args->buffer;
<font color='#997700'>@@ -661,28 +543,28 @@
</font> /*
  * Handle ioctl request.
  */
<font color='#880000'>-rtems_device_driver
-paux_control(rtems_device_major_number major,
-             rtems_device_minor_number minor,
-             void                      * arg
</font><font color='#000088'>+rtems_device_driver paux_control(
+  rtems_device_major_number major,
+  rtems_device_minor_number minor,
+  void                      *arg
</font> )
 {
<font color='#880000'>-   rtems_libio_ioctl_args_t *args = arg;
-       switch( args->command )
-       {
-          default:
</font><font color='#000088'>+  rtems_libio_ioctl_args_t *args = arg;
+
+  switch( args->command ) {
+    default:
</font>       return rtems_termios_ioctl (arg);
<font color='#880000'>-           break;
</font><font color='#000088'>+      break;
</font> 
<font color='#880000'>-      case MW_UID_REGISTER_DEVICE:
</font><font color='#000088'>+    case MW_UID_REGISTER_DEVICE:
</font>       printk( "PS2 Mouse: reg=%s\n", args->buffer );
       register_mou_msg_queue( args->buffer, -1 );
<font color='#880000'>-           break;
</font><font color='#000088'>+      break;
</font> 
<font color='#880000'>-      case MW_UID_UNREGISTER_DEVICE:
</font><font color='#000088'>+    case MW_UID_UNREGISTER_DEVICE:
</font>       unregister_mou_msg_queue( -1 );
<font color='#880000'>-           break;
-   }
-<span style="background-color: #FF0000"> </span> args->ioctl_return = 0;
-   return RTEMS_SUCCESSFUL;
</font><font color='#000088'>+      break;
+  }
+  args->ioctl_return = 0;
+  return RTEMS_SUCCESSFUL;
</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>