Index: vsignore
===================================================================
--- .cvsignore	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,1 +1,0 @@
-o-optimize
Index: itignore
===================================================================
--- .gitignore	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,7 +1,0 @@
-o-optimize
-FilesystemImage
-FilesystemImage.[ch]
-*.pyc
-.lock-waf_*
-*~
-build/*
Index: itmodules
===================================================================
--- .gitmodules	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,3 +1,0 @@
-[submodule "rtems_waf"]
-	path = rtems_waf
-	url = git://git.rtems.org/chrisj/rtems_waf.git
Index: angeLog
===================================================================
--- ChangeLog	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,25 +1,0 @@
-2011-10-05	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile: Add RTD6425.
-
-2011-10-05	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile: Update to new location.
-	* include/.cvsignore: New file.
-
-2011-05-24	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* README.doxygen, include/Doxyfile, include/mainpage.h: New files.
-
-2011-05-24	Jennifer Averett <Jennifer.Averett@OARcorp.com>
-
-	* include/adc.h: New file.
-
-2011-03-18	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* ChangeLog, Makefile, commands/Makefile, commands/main_multiio_adc.c,
-	commands/main_multiio_benchmark.c, commands/main_multiio_dac.c,
-	commands/main_multiio_din.c, commands/main_multiio_dout.c,
-	commands/main_multiio_irq.c, commands/multiio_commands.h,
-	include/multiio.h, stub/multio_stub.c: New files.
-
Index: CENSE.2
===================================================================
--- LICENSE.2	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,20 +1,0 @@
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index: kefile
===================================================================
--- Makefile	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,11 +1,0 @@
-#
-#  $Id$
-#
-
-include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
-include $(RTEMS_CUSTOM)
-include $(RTEMS_SHARE)/make/directory.cfg
-
-SUBDIRS  = commands
-SUBDIRS += pcmmio
-SUBDIRS += rtd6425 rtd6425_shell
Index: ADME.doxygen
===================================================================
--- README.doxygen	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,17 +1,0 @@
-#
-#  $Id$
-#
-
-Run the following commands:
-
-cd include
-doxygen
-
-Output is in doxy/html and doxy/latex.
-Warnings are in doxy_warnings.txt
-
-To generate PDF
-
-make -C doxy/latex pdf
-
-output is in doxy/latex/refman.pdf
Index: ADME.waf
===================================================================
--- README.waf	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,51 +1,0 @@
-RTEMS Waf
-~~~~~~~~~
-
-You can find the Waf project here:
-
- http://code.google.com/p/waf/
-
-Simple instructions on How to set up Waf is here:
-
- http://www.rtems.org/ftp/pub/rtems/people/chrisj/rtl/rtems-linker/waf.html
-
-Steps
------
-
-1. Build or install the tools. In this example the path is
-   $HOME/Development/rtems/4.11.
-
-2. Build and install the RTEMS Board Support Packages you want to use. In this
-   example the path is $HOME/Development/rtems/build/4.11.
-
-3. Unpack this package somewhere, anywhere on your disk and change into the top
-   level directory.
-
-4. Populate the git submodule:
-
-    $ git submodule init
-    $ git submodule update
-
-5. Configure with your specific settings. In this case the path to the tools
-   and RTEMS and provided on the command line and so do not need to be in your
-   path or environment [1] and we limit the build to 'sparc/sis' BSP:
-
-    $ waf configure --rtems=$HOME/Development/rtems/build/4.11 \
-                    --rtems-tools=$HOME/Development/rtems/4.11 \
-                    --rtems-bsps=sparc/sis
-
-   You can use '--rtems-archs=sparc,i386' or
-   '--rtems-bsps=sparc/sis,i386/pc586' to build for more than BSP at a time.
-
-6. Build:
-
-   $ waf
-
-[1] It is good practice to keep your environment as empty as possible. Setting
-    paths to tools or specific values to configure or control builds is
-    dangerous because settings can leak between different builds and change
-    what you expect a build to do. The waf tool used here lets you specify on
-    the command line the tools and RTEMS paths and this is embedded in waf's
-    configuration information. If you have a few source trees working at any
-    one time with different tool sets or configurations you can easly move
-    between them safe in the knowledge that one build will not infect another.
Index: mmands/.cvsignore
===================================================================
--- commands/.cvsignore	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,1 +1,0 @@
-o-optimize
Index: mmands/Makefile
===================================================================
--- commands/Makefile	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,36 +1,0 @@
-#
-#  Example Library Makefile
-#
-
-#
-#  RTEMS_MAKEFILE_PATH is typically set in an environment variable
-#
-
-VPATH=.:../stub
-LIB=${ARCH}/libmiocmds.a
-
-# C source names
-CSRCS = main_multiio_adc.c main_multiio_dac.c main_multiio_dout.c \
-  main_multiio_din.c main_multiio_benchmark.c main_multiio_irq.c
-COBJS = $(CSRCS:%.c=${ARCH}/%.o)
-
-# EXTERNAL_H_FILES=userLib.h
-
-include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
-include $(RTEMS_CUSTOM)
-include $(PROJECT_ROOT)/make/leaf.cfg
-
-CLEAN_ADDITIONS += $(LIB)
-
-DEFINES += -I ../include
-
-OBJS= $(COBJS)
-
-all:    ${ARCH} $(LIB)
-
-$(LIB): $(OBJS)
-	$(AR) crv $(LIB) $(OBJS)
-
-#install: all
-#	$(INSTALL_VARIANT) -m 555 ${LIB} ${PROJECT_RELEASE}/lib
-#	$(INSTALL_VARIANT) -m 555 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include
Index: mmands/main_multiio_adc.c
===================================================================
--- commands/main_multiio_adc.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,170 +1,0 @@
-/*
- *  adc command
- *
- *  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$
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <rtems.h>
-#include <rtems/shell.h>
-#include <rtems/stringto.h>
-#include "multiio.h"
-
-#define __need_getopt_newlib
-#include <getopt.h>
-
-static void adc_read(
-  float *adc,
-  int    max
-)
-{
-  int   input;
-  
-  for ( input=0 ; input<max ; input++ ) {
-    adc[input] = rtems_adc_get_channel_voltage(input);
-  }
-}
-
-static void adc_printf(
-  float *adc,
-  int    max
-)
-{
-  struct timespec ts;
-
-  (void) rtems_clock_get_uptime( &ts );
-  printf(
-    "%03ld:%06ld %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f\n" 
-    "%11s%7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f\n",
-    ts.tv_sec, ts.tv_nsec/1000,
-    adc[0], adc[1], adc[2], adc[3], adc[4], adc[5], adc[6], adc[7],
-    "", adc[8], adc[9], adc[10], adc[11], adc[12], adc[13], adc[14], adc[15]
-  );
-}
-
-char static adc_usage[] =
-  "Usage: %s [-i iterations] [-p period] [-v]\n"
-  "Where: maximum iterations defaults to 1\n"
-  "       the period is in milliseconds and defaults to 1000\n";
-
-#define PRINT_USAGE() \
-   printf( adc_usage, argv[0] )
-
-int main_multiio_adc(int argc, char **argv)
-{
-  int                 milliseconds;
-  int                 maximum;
-  int                 iterations;
-  char                ch;
-  bool                changed;
-  bool                verbose;
-  struct getopt_data  getopt_reent;
-  float               *adc_last = NULL;
-  float               *adc_current = NULL;
-  int                  adcs;
-  const  char         *s;
-
-  /*
-   * Parse arguments here
-   */
-  milliseconds = 1000;
-  maximum = 1;
-  verbose = false;
-
-  memset(&getopt_reent, 0, sizeof(getopt_data));
-  while ((ch = getopt_r(argc, argv, "i:p:v", &getopt_reent)) != -1) {
-    switch (ch) {
-      case 'i': /* maximum iterations */
-        s = getopt_reent.optarg;
-        if ( rtems_string_to_int( s, &maximum, NULL, 0 ) ) {
-          printf( "Maximum iterations (%s) is not a number\n", s );
-          PRINT_USAGE();
-          return -1;
-        }
-
-        break;
-      case 'p': /* sampling period */
-        s = getopt_reent.optarg;
-        if ( rtems_string_to_int( s, &milliseconds, NULL, 0 ) ) {
-          printf( "Sampling period (%s) is not a number\n", s );
-          PRINT_USAGE();
-          return -1;
-        }
-        if ( milliseconds == 0 ) {
-          printf( "Sampling period (%d) is 0\n", milliseconds );
-          PRINT_USAGE();
-          return -1;
-        }
-
-        break;
-      case 'v': /* verbose*/
-        verbose = true;
-        break;
-      default:
-        PRINT_USAGE();
-        return -1;
-    }
-  }
-
-  if ( maximum != 1 ) {
-    printf(
-      "Polling analog inputs for %d iterations with %d msec period\n",
-      maximum,
-      milliseconds
-    );
-  }
-  
-  adcs        = rtems_adc_get_maximum();
-  adc_last    = calloc( 1, adcs * sizeof(float) );
-  adc_current = calloc( 1, adcs * sizeof(float) );
-
-  /*
-   *  Now sample in the loop
-   */
-  changed = false;
-
-  iterations = 1;
-  while (1) {
-    adc_read(adc_current, adcs);
-   
-    if ( iterations == 1 )
-      changed = true;
-    else if ( memcmp( adc_last, adc_current, sizeof(adc_current) ) )
-      changed = true;
-    
-    if ( verbose || changed ) {
-      adc_printf(adc_current, adcs);
-      memcpy( adc_last, adc_current, sizeof(adc_current) );
-      changed = false;
-    }
-
-    if (iterations++ >= maximum )
-      break;
-
-    (void) rtems_task_wake_after( RTEMS_MILLISECONDS_TO_TICKS(milliseconds) );
-  }
-  return 0;
-}
-
-rtems_shell_cmd_t Shell_MULTIIO_ADC_Command = {
-  "multiio_adc",                            /* name */
-  "Read Analog Inputs",                     /* usage */
-  "multiio",                                /* topic */
-  main_multiio_adc,                         /* command */
-  NULL,                                     /* alias */
-  NULL                                      /* next */
-};
-
-rtems_shell_alias_t Shell_MULTIIO_ADC_Alias = {
-  "multiio_adc",         /* command */
-  "adc"                  /* alias */
-};
-
Index: mmands/main_multiio_benchmark.c
===================================================================
--- commands/main_multiio_benchmark.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,144 +1,0 @@
-/*
- *  multiio_irq command
- *
- *  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$
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <rtems.h>
-#include <rtems/shell.h>
-#include <rtems/stringto.h>
-#include "multiio.h"
-
-#define __need_getopt_newlib
-#include <getopt.h>
-
-char multiio_benchmark_usage[] =
-  "Usage: %s [-i interrupts] [-v]\n"
-  "Where: maximum interrupts must be >= 1\n";
-
-#define PRINT_USAGE() \
-   printf( multiio_benchmark_usage, argv[0] )
-
-static uint64_t to_usecs( struct timespec *time )
-{
-  uint64_t usecs;
-  usecs = _Timespec_Get_seconds( time ) * 1000000;
-  usecs += _Timespec_Get_nanoseconds( time ) / 1000;
-  return usecs;
-}
-
-int main_multiio_benchmark(int argc, char **argv)
-{
-  int                 milliseconds;
-  int                 maximum;
-  int                 sc;
-  char                ch;
-  bool                verbose;
-  struct getopt_data  getopt_reent;
-  const  char        *s;
-  int                 interrupts;
-  struct timespec     timestamp;
-  struct timespec     now;
-  struct timespec     min;
-  struct timespec     max;
-  struct timespec     total;
-  struct timespec     took;
-  struct timespec     average;
-
-  /*
-   * Parse arguments here
-   */
-  milliseconds = 1000;
-  maximum = 1;
-  verbose = false;
-
-  memset(&getopt_reent, 0, sizeof(getopt_data));
-  while ((ch = getopt_r(argc, argv, "i:v:", &getopt_reent)) != -1) {
-    switch (ch) {
-      case 'i': /* maximum interrupts */
-        s = getopt_reent.optarg;
-        if ( rtems_string_to_int( s, &maximum, NULL, 0 ) ) {
-          printf( "Maximum interrupts (%s) is not a number\n", s );
-          PRINT_USAGE();
-          return -1;
-        }
-	if ( maximum <= 0 ) {
-	  printf( "Maximum interrupts (%d) is invalid\n", maximum );
-	  PRINT_USAGE();
-          return -1;
-	}
-        break;
-      case 'v': /* verbose */
-        verbose = true;
-        break;
-      default:
-        printf( multiio_benchmark_usage, argv[0] );
-        return -1;
-    }
-  }
-
-  printf( "Benchmarking for DIN IRQ for %d interrupts\n", maximum );
-
-  /*
-   *  Now sample in the loop
-   */
-  interrupts   = 0;
-  _Timespec_Set( &min, 0xffffffff, 999999999 );
-  _Timespec_Set_to_zero( &max );
-  _Timespec_Set_to_zero( &total );
-
-  rtems_din_flush_buffered_interrupts();
-  while (1) {
-    sc = 0;
-   
-    sc = rtems_din_wait_interrupt_with_timestamp(0, &timestamp);
-
-    if ( sc == -1 )
-      continue;
-
-    rtems_clock_get_uptime( &now );
-
-    _Timespec_Subtract( &now, &timestamp, &took );
-    _Timespec_Add_to( &total, &took );
-
-    if ( _Timespec_Less_than(&took, &min) )    min = took;
-    if ( _Timespec_Greater_than(&took, &max) ) max = took;
-
-    interrupts++;
-
-    if (interrupts >= maximum )
-      break;
-  }
-
-  _Timespec_Divide_by_integer( &total, maximum, &average );
-
-  printf(
-    "Number of Interrupts:  %d\n"
-    "Total:                 %lld\n"
-    "min/max/avg:           %lld/%lld/%lld\n",
-    maximum,
-    to_usecs( &total ),
-    to_usecs( &min ),
-    to_usecs( &max ),
-    to_usecs( &average )
-  );
-  return 0;
-}
-
-rtems_shell_cmd_t Shell_MULTIIO_Benchmark_Command = {
-  "multiio_benchmark",                             /* name */
-  "Benchmark Multi IOInterrupts",                  /* usage */
-  "multiio",                                       /* topic */
-  main_multiio_benchmark,                          /* command */
-  NULL,                                            /* alias */
-  NULL                                             /* next */
-};
Index: mmands/main_multiio_dac.c
===================================================================
--- commands/main_multiio_dac.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,224 +1,0 @@
-/*
- *  dac command
- *
- *  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$
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <rtems.h>
-#include <rtems/shell.h>
-#include <rtems/stringto.h>
-#include "multiio.h"
-
-#define VALIDATE_VOLTAGE(_v) \
-  if ( (_v) < rtems_dac_get_minimum_voltage() || \
-       (_v) > rtems_dac_get_maximum_voltage() ) { \
-    printf( "Voltage must be between %fV and %f\n", \
-              rtems_dac_get_minimum_voltage(), \
-              rtems_dac_get_maximum_voltage()); \
-    fail = true; \
-  }
-
-static char dac_usage[] =
-  "Usage: %s dac voltage\n"
-  "       %s dac low high step time_per_step maximum_time\n"
-  "\n"
-  "Where: dac must be 0-%d\n"
-  "       voltages and step must be %fV to %fV\n"
-  "       times are in milliseconds\n"
-  "  First form is a single write.\n"
-  "  Second form writes a pattern.\n";
-
-#define PRINT_USAGE() \
-   printf( dac_usage, argv[0], argv[0], \
-           rtems_dac_get_maximum(), \
-           rtems_dac_get_minimum_voltage(), \
-           rtems_dac_get_maximum_voltage()); \
-
-int main_multiio_dac(int argc, char **argv)
-{
-  int       dac;
-  float     low_voltage;
-  float     high_voltage;
-  float     step_voltage;
-  float     current_voltage;
-  float     current_step;
-  int       step_time;
-  int       maximum_time;
-  uint32_t  step_ticks;
-  bool      fail = false;
-  int       elapsed;
-
-  /*
-   *  Verify that we have the right number of arguments.
-   */
-  if ( (argc != 3) && (argc != 7) ) {
-    printf( "Incorrect number of arguments\n" );
-    PRINT_USAGE();
-    return -1;
-  }
-
-  /*
-   *  Convert the string arguments into number values
-   */
-  if ( rtems_string_to_int( argv[1], &dac, NULL, 0 ) ) {
-    printf( "DAC (%s) is not a number\n", argv[1] );
-    fail = true;
-  }
-
-  if ( rtems_string_to_float( argv[2], &low_voltage, NULL ) ) {
-    printf( "Voltage (%s) is not a number\n", argv[2] );
-    fail = true;
-  }
-
-  /*
-   *  Validate the output dac and voltage.
-   */
-  if ( dac < 0 || dac > rtems_dac_get_maximum() ) {
-    printf( "DAC number must be 0-%d\n", rtems_dac_get_maximum() );
-    fail = true;
-  }
-
-  VALIDATE_VOLTAGE( low_voltage );
-
-  /*
-   *  Now do a single write to the DAC
-   */
-  if ( argc == 3 ) {
-    if ( fail ) {
-      PRINT_USAGE();
-      return -1;
-    }
-    printf( "Write %6.4f to to dac %d\n", low_voltage, dac );
-    rtems_set_dac_voltage(dac, low_voltage);
-    return 0;
-  }
-
-  /*
-   *  Finish parsing the arguments to do a pattern
-   */
-  fail = false;
-
-  if ( rtems_string_to_float( argv[3], &high_voltage, NULL ) ) {
-    printf( "Voltage (%s) is not a number\n", argv[3] );
-    fail = true;
-  }
-
-  VALIDATE_VOLTAGE( high_voltage );
-
-  if ( rtems_string_to_float( argv[4], &step_voltage, NULL ) ) {
-    printf( "Step voltage (%s) is not a number\n", argv[4] );
-    fail = true;
-  }
-
-  VALIDATE_VOLTAGE( step_voltage );
-
-  if ( step_voltage < 0.0 ) {
-    printf( "Step voltage must be greater than 0\n" );
-    fail = true;
-  }
-
-  if ( rtems_string_to_int( argv[5], &step_time, NULL, 0 ) ) {
-    printf( "Step time (%s) is not a number\n", argv[5] );
-    fail = true;
-  }
-
-  if ( rtems_string_to_int( argv[6], &maximum_time, NULL, 0 ) ) {
-    printf( "Maximum time (%s) is not a number\n", argv[6] );
-    fail = true;
-  }
-
-  if ( step_time >= maximum_time ) {
-    printf(
-      "Step time (%d) must be less than maximum time (%d)\n",
-      step_time,
-      maximum_time
-    );
-    fail = true;
-  }
-
-  if ( step_time < 0 ) {
-    printf( "Step time must be greater than 0\n" );
-    fail = true;
-  }
-
-  if ( maximum_time < 0 ) {
-    printf( "Maximum time must be greater than 0\n" );
-    fail = true;
-  }
-
-  /*
-   *  Now write the pattern to the DAC
-   */
-
-  if ( fail ) {
-    PRINT_USAGE();
-    return -1;
-  }
-
-  printf(
-    "Write %6.4f-%6.4f step=%6.4f stepTime=%d msecs dac=%d max=%d msecs\n",
-    low_voltage,
-    high_voltage,
-    step_voltage,
-    step_time,
-    dac,
-    maximum_time
-  );
-
-  elapsed         = 0;
-  step_ticks      = RTEMS_MILLISECONDS_TO_TICKS(step_time);
-  current_voltage = low_voltage;
-  current_step    = step_voltage;
-
-  if ( low_voltage > high_voltage ) 
-    current_step    *= -1.0;
-
-  while (1) {
-  
-    #if defined(TESTING)
-      printf( "%d: Write %6.4f to to dac %d\n", elapsed, current_voltage, dac );
-    #endif
-    rtems_set_dac_voltage(dac, current_voltage);
-
-    current_voltage += current_step;
-    if ( current_voltage < low_voltage ) {
-      current_step    = step_voltage;
-      current_voltage = low_voltage;
-    } else if ( current_voltage > high_voltage ) {
-      current_step    = -1.0 * step_voltage;
-      current_voltage = high_voltage;
-    }
-
-    elapsed += step_time;
-    if ( elapsed > maximum_time )
-      break;
-
-    rtems_task_wake_after( step_ticks );
-  }
-   
-  return 0;
-}
-
-rtems_shell_cmd_t Shell_MULTIIO_DAC_Command = {
-  "multiio_dac",                            /* name */
-  "Write Analog Outputs",                   /* usage */
-  "multiio",                                /* topic */
-  main_multiio_dac,                         /* command */
-  NULL,                                     /* alias */
-  NULL                                      /* next */
-};
-
-
-rtems_shell_alias_t Shell_MULTIIO_DAC_Alias = {
-  "multiio_dac",         /* command */
-  "dac"                  /* alias */
-};
Index: mmands/main_multiio_din.c
===================================================================
--- commands/main_multiio_din.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,167 +1,0 @@
-/*
- *  din command
- *
- *  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$
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <rtems.h>
-#include <rtems/shell.h>
-#include <rtems/stringto.h>
-#include "multiio.h"
-
-#define __need_getopt_newlib
-#include <getopt.h>
-
-static void dio_read(
-  int *dio,
-  int  max
-)
-{
-  int   bit;
-  
-  for ( bit=0 ; bit<max ; bit++ ) {
-    dio[bit] = rtems_din_get(bit);
-  }
-}
-
-static void dio_printf(
-  int *dio,
-  int  max
-)
-{
-  struct timespec ts;
-  int             bit;
-
-  /* TODO: Fix assumption that max is divisible by 4 and fits on a line */
-  (void) rtems_clock_get_uptime( &ts );
-  printf( "%ld:%ld ", ts.tv_sec, ts.tv_nsec );
-  for ( bit=0 ; bit<max ; bit+=4 ) {
-     printf(
-	"%d%d%d%d%s",
-	dio[bit +  0], dio[bit +  1],
-	dio[bit +  2], dio[bit +  3],
-        ((bit == 44) ? "\n" : " " )
-    );
-  }
-}
-
-static char din_usage[] =
-  "Usage: %s [-i iterations] [-p period] [-v]\n"
-  "Where: maximum iterations defaults to 1\n"
-  "       the period is in milliseconds and defaults to 1000\n";
-
-#define PRINT_USAGE() \
-   printf( din_usage, argv[0] )
-
-int main_multiio_din(int argc, char **argv)
-{
-  int                 milliseconds;
-  int                 maximum;
-  int                 iterations;
-  char                ch;
-  bool                changed;
-  bool                verbose;
-  struct getopt_data  getopt_reent;
-  int                 dio_last[48];
-  int                 dio_current[48];
-  const  char        *s;
-  int                 max_dins = rtems_din_get_maximum();
-
-  /*
-   * Parse arguments here
-   */
-  milliseconds = 1000;
-  maximum = 1;
-  verbose = false;
-
-  memset(&getopt_reent, 0, sizeof(getopt_data));
-  while ((ch = getopt_r(argc, argv, "i:p:v", &getopt_reent)) != -1) {
-    switch (ch) {
-      case 'i': /* maximum iterations */
-        s = getopt_reent.optarg;
-        if ( rtems_string_to_int( s, &maximum, NULL, 0 ) ) {
-          printf( "Maximum iterations (%s) is not a number\n", s );
-          PRINT_USAGE();
-          return -1;
-        }
-
-        break;
-      case 'p': /* sampling period */
-        s = getopt_reent.optarg;
-        if ( rtems_string_to_int( s, &milliseconds, NULL, 0 ) ) {
-          printf( "Sampling period (%s) is not a number\n", s );
-          PRINT_USAGE();
-          return -1;
-        }
-        if ( milliseconds == 0 ) {
-          printf( "Sampling period (%d) is 0\n", milliseconds );
-          PRINT_USAGE();
-          return -1;
-        }
-        break;
-      case 'v': /* verbose*/
-        verbose = true;
-        break;
-      default:
-        printf( din_usage, argv[0] );
-        return -1;
-    }
-  }
-
-  if ( maximum != 1 )
-    printf(
-      "Polling discrete inputs for %d iterations with %d msec period\n",
-      maximum,
-      milliseconds
-    );
-
-  /*
-   *  Now sample in the loop
-   */
-  changed = false;
-
-  iterations = 1;
-  while (1) {
-    dio_read( dio_current, max_dins );
-   
-    if ( iterations == 1 )
-      changed = true;
-    else if ( memcmp( dio_last, dio_current, sizeof(dio_current) ) )
-      changed = true;
-    
-    if ( verbose || changed ) {
-      dio_printf( dio_current, max_dins );
-      memcpy( dio_last, dio_current, sizeof(dio_current) );
-      changed = false;
-    }
-
-    if (iterations++ >= maximum )
-      break;
-
-    (void) rtems_task_wake_after( RTEMS_MILLISECONDS_TO_TICKS(milliseconds) );
-  }
-  return 0;
-}
-
-rtems_shell_cmd_t Shell_MULTIIO_DIN_Command = {
-  "multiio_din",                     /* name */
-  "Read Discrete Inputs",            /* usage */
-  "multiio",                         /* topic */
-  main_multiio_din,                  /* command */
-  NULL,                              /* alias */
-  NULL                               /* next */
-};
-
-rtems_shell_alias_t Shell_MULTIIO_DIN_Alias = {
-  "multiio_adc",         /* command */
-  "adc"                  /* alias */
-};
Index: mmands/main_multiio_dout.c
===================================================================
--- commands/main_multiio_dout.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,97 +1,0 @@
-/*
- *  dout command
- *
- *  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$
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <rtems.h>
-#include <rtems/shell.h>
-#include <rtems/stringto.h>
-#include "multiio.h"
-
-static char dout_usage[] =
-  "Usage: %s bit value\n"
-  "Where: bit must be 0-%d\n"
-  "       value must be 0 or 1\n";
-
-#define PRINT_USAGE() \
-   printf( dout_usage, argv[0], maximum )
-
-int main_multiio_dout(int argc, char **argv)
-{
-  int    bit;
-  int    value;
-  bool   fail = false;
-  int    maximum = rtems_dout_get_maximum();
-
-  /*
-   *  Verify that we have the right number of arguments.
-   */
-  if ( argc != 3 ) {
-    printf( "Incorrect number of arguments\n" );
-    PRINT_USAGE();
-    return -1;
-  }
-
-  /*
-   *  Convert the string arguments into number values
-   */
-  if ( rtems_string_to_int( argv[1], &bit, NULL, 0 ) ) {
-    printf( "Bit (%s) is not a number\n", argv[1] );
-    fail = true;
-  }
-
-  if ( rtems_string_to_int(argv[2], &value, NULL, 0) ) {
-    printf( "Value (%s) is not a number\n", argv[2] );
-    fail = true;
-  }
-
-  /*
-   *  Validate the output bit and value.
-   */
-  if ( bit < 0 || bit > maximum ) {
-    printf( "Bit number must be 0-maximum\n" );
-    fail = true;
-  }
-
-  if ( value != 0 && value != 1 ) {
-    printf( "Value must be 0 or 1\n" );
-    fail = true;
-  }
-
-  if ( fail ) {
-    PRINT_USAGE();
-    return -1;
-  }
-
-  /*
-   *  Now write the value
-   */
-  printf( "Write %d to to bit %d\n", value, bit );
-  rtems_set_dout(bit, value);
-
-  return 0;
-}
-
-rtems_shell_cmd_t Shell_MULTIIO_DOUT_Command = {
-  "multiio_dout",                           /* name */
-  "Write Discrete Outputs",                 /* usage */
-  "multiio",                                /* topic */
-  main_multiio_dout,                        /* command */
-  NULL,                                     /* alias */
-  NULL                                      /* next */
-};
-
-rtems_shell_alias_t Shell_MULTIIO_DOUT_Alias = {
-  "multiio_dout",         /* command */
-  "dout"                  /* alias */
-};
Index: mmands/main_multiio_irq.c
===================================================================
--- commands/main_multiio_irq.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,233 +1,0 @@
-/*
- *  multiio_irq command
- *
- *  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$
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <rtems.h>
-#include <rtems/shell.h>
-#include <rtems/stringto.h>
-#include "multiio.h"
-
-#define __need_getopt_newlib
-#include <getopt.h>
-
-char multiio_irq_usage[] =
-  "Usage: %s [-i iterations] [-p period] [-v] [-d|-D DAC|-a ADC]\n"
-  "Where: maximum iterations defaults to 1\n"
-  "       the period is in milliseconds and defaults to 1000\n";
-
-#define PRINT_USAGE() \
-   printf( multiio_irq_usage, argv[0] )
-
-static int to_usecs(
-  struct timespec *start,
-  struct timespec *end
-)
-{
-  int usecs;
-  struct timespec took;
-
-  _Timespec_Subtract( start, end, &took );
-  usecs = _Timespec_Get_seconds( &took ) * 1000000;
-  usecs += _Timespec_Get_nanoseconds( &took ) / 1000;
-  return usecs;
-}
-
-int main_multiio_irq(int argc, char **argv)
-{
-  int                 milliseconds;
-  int                 maximum;
-  int                 iterations;
-  int                 sc;
-  char                ch;
-  bool                verbose;
-  struct getopt_data  getopt_reent;
-  const  char        *s;
-  bool                do_dac = false;
-  bool                do_adc = false;
-  bool                do_din = false;
-  int                 dac = -1;
-  int                 adc = -1;
-  int                 selected;
-  const char         *irq = "";
-  int                 elapsed;
-  int                 interrupts;
-  struct timespec     previousTimestamp;
-  struct timespec     timestamp;
-
-  /*
-   * Parse arguments here
-   */
-  milliseconds = 1000;
-  maximum = 1;
-  verbose = false;
-  _Timespec_Set_to_zero( &previousTimestamp );
-
-  memset(&getopt_reent, 0, sizeof(getopt_data));
-  while ((ch = getopt_r(argc, argv, "i:p:vdD:a:", &getopt_reent)) != -1) {
-    switch (ch) {
-      case 'i': /* maximum iterations */
-        s = getopt_reent.optarg;
-        if ( rtems_string_to_int( s, &maximum, NULL, 0 ) ) {
-          printf( "Maximum iterations (%s) is not a number\n", s );
-          PRINT_USAGE();
-          return -1;
-        }
-
-        break;
-      case 'p': /* sampling period */
-        s = getopt_reent.optarg;
-        if ( rtems_string_to_int( s, &milliseconds, NULL, 0 ) ) {
-          printf( "Sampling period (%s) is not a number\n", s );
-          PRINT_USAGE();
-          return -1;
-        }
-        if ( milliseconds == 0 ) {
-          printf( "Sampling period (%d) is 0\n", milliseconds );
-          PRINT_USAGE();
-          return -1;
-        }
-        break;
-      case 'd': /* DIN enable */
-        do_din = true;
-        break;
-      case 'D': /* DAC enable */
-        s = getopt_reent.optarg;
-        if ( rtems_string_to_int( s, &dac, NULL, 0 ) ) {
-          printf( "DAC (%s) is not a number\n", s );
-          PRINT_USAGE();
-          return -1;
-        }
-
-	if ( dac < 0 || dac > 7 ) {
-	  puts( "DAC number must be 0-7" );
-          PRINT_USAGE();
-          return -1;
-	}
-
-        do_dac = true;
-        break;
-      case 'a': /* ADC enable */
-        s = getopt_reent.optarg;
-        if ( rtems_string_to_int( s, &adc, NULL, 0 ) ) {
-          printf( "ADC (%s) is not a number\n", s );
-          PRINT_USAGE();
-          return -1;
-        }
-
-	if ( adc < 0 || adc > 7 ) {
-	  puts( "ADC number must be 0-7" );
-          PRINT_USAGE();
-          return -1;
-	}
-        do_adc = true;
-        break;
-      case 'v': /* verbose */
-        verbose = true;
-        break;
-      default:
-        printf( multiio_irq_usage, argv[0] );
-        return -1;
-    }
-  }
-
-  /*
-   *  Did they select one item and ONLY one item?
-   */
-  selected = 0;
-  if ( do_din == true ) selected++;
-  if ( do_dac == true ) selected++;
-  if ( do_adc == true ) selected++;
-
-  if ( selected == 0 ) {
-    puts( "No IRQ Sources selected" );
-    return -1;
-  }
-
-  if ( selected > 1 ) {
-    puts( "More than 1 IRQ Sources selected" );
-    return -1;
-  }
-
-  if ( do_din == true ) {
-    irq = "DIN";
-  } else if ( do_dac == true ) {
-    irq = "DAC";
-  } else if ( do_adc == true ) {
-    irq = "ADC";
-  }
-  if ( maximum != 1 )
-    printf(
-      "Polling for %s IRQ for %d iterations with %d msec period\n",
-      irq,
-      maximum,
-      milliseconds
-    );
-
-  /*
-   *  Now sample in the loop
-   */
-  elapsed    = 0;
-  iterations = 1;
-  interrupts = 0;
-
-  rtems_din_flush_buffered_interrupts();
-  while (1) {
-    sc = 0;
-   
-    if ( do_din == true ) {
-      sc = rtems_din_wait_interrupt_with_timestamp(milliseconds, &timestamp);
-    } else if ( do_dac == true ) {
-      ; /* sc = wait_dac_int_with_timeout(dac, milliseconds); */
-    } else if ( do_adc == true ) {
-      ; /* sc = wait_dac_int_with_timeout(adc, milliseconds); */
-    }
-
-    if ( sc != -1 ) {
-      interrupts++;
-      if ( do_din == true ) {
-        printf(
-          "%d %s irq pin %d @ %ld:%ld (%d usecs since last)\n",
-          elapsed,
-          irq,
-          sc - 1,
-          timestamp.tv_sec, timestamp.tv_nsec,
-          to_usecs( &previousTimestamp, &timestamp )
-        );
-        previousTimestamp = timestamp;
-      } else {
-        printf( "%d %s irq\n", elapsed, irq );
-      }
-    }
-
-    elapsed += milliseconds;
-    if (iterations++ >= maximum )
-      break;
-  }
-  printf(
-    "%d total interrupts from %s in %d milliseconds\n",
-    interrupts,
-    irq,
-    elapsed
-  );
-  return 0;
-}
-
-rtems_shell_cmd_t Shell_MULTIIO_IRQ_Command = {
-  "multiio_irq",                                /* name */
-  "Wait for DIN Interrupts",                    /* usage */
-  "multiio",                                    /* topic */
-  main_multiio_irq,                             /* command */
-  NULL,                                         /* alias */
-  NULL                                          /* next */
-};
Index: mmands/multiio_commands.h
===================================================================
--- commands/multiio_commands.h	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- *  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 __RTEMS_PCMMIO_COMMANDS_h
-#define __RTEMS_PCMMIO_COMMANDS_h
-
-#include <rtems.h>
-#include <rtems/shell.h>
-
-extern int main_din(int argc, char **argv);
-
-extern rtems_shell_cmd_t Shell_MULTIIO_DIN_Command;
-extern rtems_shell_cmd_t Shell_MULTIIO_DOUT_Command;
-extern rtems_shell_cmd_t Shell_MULTIIO_ADC_Command;
-extern rtems_shell_cmd_t Shell_MULTIIO_DAC_Command;
-extern rtems_shell_cmd_t Shell_MULTIIO_IRQ_Command;
-extern rtems_shell_cmd_t Shell_MULTIIO_Benchmark_Command;
-
-#define CONFIGURE_MULTIIO_COMMANDS \
-  &Shell_MULTIIO_DIN_Command, \
-  &Shell_MULTIIO_DOUT_Command, \
-  &Shell_MULTIIO_ADC_Command, \
-  &Shell_MULTIIO_DAC_Command, \
-  &Shell_MULTIIO_IRQ_Command, \
-  &Shell_MULTIIO_Benchmark_Command \
-
-extern rtems_shell_alias_t Shell_MULTIIO_DIN_Alias;
-extern rtems_shell_alias_t Shell_MULTIIO_DOUT_Alias;
-extern rtems_shell_alias_t Shell_MULTIIO_ADC_Alias;
-extern rtems_shell_alias_t Shell_MULTIIO_DAC_Alias;
-
-#define CONFIGURE_MULTIIO_ALIASES \
-  &Shell_MULTIIO_DIN_Alias, \
-  &Shell_MULTIIO_DOUT_Alias, \
-  &Shell_MULTIIO_ADC_Alias, \
-  &Shell_MULTIIO_DAC_Alias
-  
-#endif
Index: mmands/wscript
===================================================================
--- commands/wscript	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,16 +1,0 @@
-# Copyright 2014 Chirayu Desai (chirayudesai1@gmail.com)
-#
-# This file's license is 2-clause BSD as in this distribution's LICENSE.2 file.
-#
-
-# Waf build script for an RTEMS Hello
-import rtems_waf.rtems as rtems
-
-def build(bld):
-    rtems.build(bld)
-
-    bld.set_group('libraries')
-    bld(features = 'c cstlib',
-        target = 'miocmds',
-        includes = '../include',
-        source = ['main_multiio_adc.c', 'main_multiio_dac.c', 'main_multiio_dout.c', 'main_multiio_din.c', 'main_multiio_benchmark.c', 'main_multiio_irq.c'])
Index: clude/.cvsignore
===================================================================
--- include/.cvsignore	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,2 +1,0 @@
-doxy
-doxy_warnings.txt
Index: clude/Doxyfile
===================================================================
--- include/Doxyfile	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,1721 +1,0 @@
-# Doxyfile 1.7.4
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project.
-#
-# All text after a hash (#) is considered a comment and will be ignored.
-# The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ").
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING      = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
-
-PROJECT_NAME           = "RTEMS Multi IO API"
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER         =
-
-# Using the PROJECT_BRIEF tag one can provide an optional one line description
-# for a project that appears at the top of each page and should give viewer
-# a quick idea about the purpose of the project. Keep the description short.
-
-PROJECT_BRIEF          =
-
-# With the PROJECT_LOGO tag one can specify an logo or icon that is
-# included in the documentation. The maximum height of the logo should not
-# exceed 55 pixels and the maximum width should not exceed 200 pixels.
-# Doxygen will copy the logo to the output directory.
-
-PROJECT_LOGO           =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY       = doxy
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS         = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE        = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC      = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF           = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF       =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC    = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB  = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES        = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH        =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH    =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful if your file system
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES            = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF      = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF           = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS           = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES  = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE               = 8
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES                =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C  = YES
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA   = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN   = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL   = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING      =
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also makes the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT    = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT        = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT            = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT   = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC   = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING            = YES
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
-# unions are shown inside the group in which they are included (e.g. using
-# @ingroup) instead of on a separate page (for HTML and Man pages) or
-# section (for LaTeX and RTF).
-
-INLINE_GROUPED_CLASSES = NO
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT   = NO
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penalty.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will roughly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols
-
-SYMBOL_CACHE_SIZE      = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL            = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE        = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC         = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES  = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS  = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespaces are hidden.
-
-EXTRACT_ANON_NSPACES   = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS     = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES     = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS  = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS      = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS          = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES       = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES       = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES     = YES
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES   = NO
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO            = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS       = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS        = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES       = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME     = NO
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
-# do proper type resolution of all parameters of a function it will reject a
-# match between the prototype and the implementation of a member function even
-# if there is only one candidate or it is obvious which candidate to choose
-# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
-# will still accept a match between prototype and implementation in such cases.
-
-STRICT_PROTO_MATCHING  = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST      = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST      = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST       = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS       =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or macro consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and macros in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES  = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES        = YES
-
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES       = NO
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES             = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page.
-# This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES        = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command <command> <input-file>, where <command> is the value of
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER    =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. The create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
-
-LAYOUT_FILE            =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET                  = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR      = YES
-
-# The WARN_NO_PARAMDOC option can be enabled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC       = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT            = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE           = doxy_warnings.txt
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT                  =
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING         = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
-# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
-# *.f90 *.f *.for *.vhd *.vhdl
-
-FILE_PATTERNS          =
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE              = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE                =
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix file system feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS       = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS       =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS        =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH           =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS       =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE      = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH             =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command <filter> <input-file>, where <filter>
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output.
-# If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER           =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis.
-# Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match.
-# The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty or if
-# non of the patterns match the file name, INPUT_FILTER is applied.
-
-FILTER_PATTERNS        =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES    = NO
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
-# and it is also possible to disable source filtering for a specific pattern
-# using *.ext= (so without naming a filter). This option only has effect when
-# FILTER_SOURCE_FILES is enabled.
-
-FILTER_SOURCE_PATTERNS =
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER         = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES         = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.
-# Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS              = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS       = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX     = YES
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX    = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX          =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML          = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT            = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION    = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header. Note that when using a custom header you are responsible
-# for the proper inclusion of any scripts and style sheets that doxygen
-# needs, which is dependent on the configuration options used.
-# It is adviced to generate a default header using "doxygen -w html
-# header.html footer.html stylesheet.css YourConfigFile" and then modify
-# that header. Note that the header is subject to change so you typically
-# have to redo this when upgrading to a newer version of doxygen or when changing the value of configuration settings such as GENERATE_TREEVIEW!
-
-HTML_HEADER            =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER            =
-
-# If the HTML_TIMESTAMP tag is set to YES then the generated HTML
-# documentation will contain the timesstamp.
-
-HTML_TIMESTAMP         = NO
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET        =
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the HTML output directory. Note
-# that these files will be copied to the base HTML output directory. Use the
-# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# files. In the HTML_STYLESHEET file, use the file name only. Also note that
-# the files will be copied as-is; there are no commands or markers available.
-
-HTML_EXTRA_FILES       =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the stylesheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
-
-HTML_COLORSTYLE_HUE    = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-HTML_COLORSTYLE_SAT    = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
-
-HTML_COLORSTYLE_GAMMA  = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP         = YES
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS     = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded. For this to work a browser that supports
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-
-HTML_DYNAMIC_SECTIONS  = NO
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-
-GENERATE_DOCSET        = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME        = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID       = org.doxygen.Project
-
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-
-DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
-DOCSET_PUBLISHER_NAME  = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE               =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION           =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI           = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING     =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC             = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND             = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
-GENERATE_QHP           = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE               =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE          = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER     = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME   =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
-# Qt Help Project / Custom Filters</a>.
-
-QHP_CUST_FILTER_ATTRS  =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
-# Qt Help Project / Filter Attributes</a>.
-
-QHP_SECT_FILTER_ATTRS  =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION           =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-#  will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
-
-GENERATE_ECLIPSEHELP   = NO
-
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
-
-ECLIPSE_DOC_ID         = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX          = NO
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
-# (range [0,1..20]) that doxygen will group on one line in the generated HTML
-# documentation. Note that a value of 0 will completely suppress the enum
-# values from appearing in the overview section.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW      = NO
-
-# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
-# and Class Hierarchy pages using a tree view instead of an ordered list.
-
-USE_INLINE_TREES       = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH         = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
-
-EXT_LINKS_IN_WINDOW    = NO
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE       = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
-
-FORMULA_TRANSPARENT    = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
-# (see http://www.mathjax.org) which uses client side Javascript for the
-# rendering instead of using prerendered bitmaps. Use this if you do not
-# have LaTeX installed or if you want to formulas look prettier in the HTML
-# output. When enabled you also need to install MathJax separately and
-# configure the path to it using the MATHJAX_RELPATH option.
-
-USE_MATHJAX            = NO
-
-# When MathJax is enabled you need to specify the location relative to the
-# HTML output directory using the MATHJAX_RELPATH option. The destination
-# directory should contain the MathJax.js script. For instance, if the mathjax
-# directory is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to the
-# mathjax.org site, so you can quickly see the result without installing
-# MathJax, but it is strongly recommended to install a local copy of MathJax
-# before deployment.
-
-MATHJAX_RELPATH        = http://www.mathjax.org/mathjax
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE           = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a PHP enabled web server instead of at the web client
-# using Javascript. Doxygen will generate the search PHP script and index
-# file to put on the web server. The advantage of the server
-# based approach is that it scales better to large projects and allows
-# full text search. The disadvantages are that it is more difficult to setup
-# and does not have live searching capabilities.
-
-SERVER_BASED_SEARCH    = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX         = YES
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT           = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
-LATEX_CMD_NAME         = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME     = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX          = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = a4
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES         =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER           =
-
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
-# the generated latex document. The footer should contain everything after
-# the last chapter. If it is left blank doxygen will generate a
-# standard footer. Notice: only use this tag if you know what you are doing!
-
-LATEX_FOOTER           =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS         = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX           = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES     = NO
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE      = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF           = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT             = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF            = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS         = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE    =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE    =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN           = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT             = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION          = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS              = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML           = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT             = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA             =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD                =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING     = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF   = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD       = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX          = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader.
-# This is useful
-# if you want to understand what is going on.
-# On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY         = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING   = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION        = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# pointed to by INCLUDE_PATH will be searched when a #include is found.
-
-SEARCH_INCLUDES        = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH           =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS  =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED             =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition that
-# overrules the definition found in the source code.
-
-EXPAND_AS_DEFINED      =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all references to function-like macros
-# that are alone on a line, have an all uppercase name, and do not end with a
-# semicolon, because these will confuse the parser if not removed.
-
-SKIP_FUNCTION_MACROS   = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-#
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-#
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES               =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE       =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS           = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS        = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH              = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option also works with HAVE_DOT disabled, but it is recommended to
-# install and use dot, since it yields more powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH            =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS   = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT               = NO
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
-
-DOT_NUM_THREADS        = 0
-
-# By default doxygen will write a font called Helvetica to the output
-# directory and reference it in all dot files that doxygen generates.
-# When you want a differently looking font you can specify the font name
-# using DOT_FONTNAME. You need to make sure dot is able to find the font,
-# which can be done by putting it in a standard location or by setting the
-# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
-# containing the font.
-
-DOT_FONTNAME           = Helvetica
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE           = 10
-
-# By default doxygen will tell dot to use the output directory to look for the
-# FreeSans.ttf font (which doxygen will put there itself). If you specify a
-# different font using DOT_FONTNAME you can set the path where dot
-# can find it using this tag.
-
-DOT_FONTPATH           =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH            = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH    = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS           = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK               = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS     = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH          = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH      = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH             = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH           = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will generate a graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH        = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are svg, png, jpg, or gif.
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT       = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH               =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS           =
-
-# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the
-# \mscfile command).
-
-MSCFILE_DIRS           =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES    = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH    = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT        = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS      = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND        = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP            = YES
Index: clude/adc.h
===================================================================
--- include/adc.h	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,315 +1,0 @@
-/**
- *  @file  multiio.h
- *
- *  This include file contains all the prototypes and definitions
- *  for the multiio user interface.
- */
-
-/*
- *  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$
- */
-
-#ifndef __multiio_h
-#define __multiio_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-
-/**
- * @brief multiio supported types
- */
-typedef enum {
-  MULTIIO_DAC,
-  MULTIIO_ADC,
-  MULTIIO_DOUT,
-  MULTIIO_DIN,
-  MULTIIO_THERMO
-} rtems_multio_type;
-  
-/**
- * @brief multiio control structure.
- */
-typedef struct {
-
-  /** 
-   * The Address that controls the pin.
-   */ 
-  void        *addr;
-
-  /** 
-   * The adc, dac, din, dout... that this 
-   * structure controls
-   */ 
-  int          pin;
-} rtems_multiio_control;
-
-/**
- *  @brief Initialize the multiio interface
- *
- *  This function initializes the multiio interface.
- *
- *  @return This method returns 0 if the interface was initialized
- *  without any problems.
- */
-int rtems_multiio_initialize(void);
-
-/**
- *  @brief Get the name of the multiio device
- *
- *  This function returns the name of the multiio device.
- *
- *  @return This method returns a character string representing
- *  the name of the multiio device.
- */
-const char *rtems_multiio_get_name(void);
-
-/*
- *  ADC 
- */
-
-/**
- * @brief adc control structure.
- */
-typedef rtems_multiio_control rtems_adc_control;
-
-/**
- *  @brief Get the maximum number of adcs supported.
- *
- *  This function returns the maximum supported adc.
- *  Note that the adcs are numbered 0 to maximum.
- *
- *  @return This method returns an integer representing the 
- *  maximum number of the adc supported.
- */
-int rtems_adc_get_maximum(void);
-
-/**
- *  @brief Get the rtems_adc_control for the @a adc.
- *
- *  This function returns the control structure of the 
- *  given adc.
- *
- *  @return This method returns the control structure 
- *  for @a adc. 
- */
-rtems_adc_control *adc_lookup( int adc );
-
-/**
- *  @brief Get adc channel voltage
- *
- *  This function returns the voltage in volts for the 
- *  channel represented by the @a adc input.
- *
- *  @param[in] adc that the voltage corresponds to
- *
- *  @return This method returns the volts for the 
- *  @a adc channel.
- */
-float rtems_adc_get_channel_voltage( rtems_adc_control *adc );
-
-/* 
- * DAC 
- */
-
-/**
- * @brief dac control structure.
- */
-typedef rtems_multiio_control rtems_dac_control;
-
-/**
- *  @brief Get the maximum number of the supported dac
- *
- *  This function returns the maximum number of supported
- *  dacs.
- *
- *  @return This method returns an integer representing the 
- *  maximum supported dac.
- */
-int rtems_dac_get_maximum(void);
-
-/**
- *  @brief Get the rtems_dac_control for the @a dac.
- *
- *  This function returns the control structure of the 
- *  given dac.
- *
- *  @return This method returns the control structure 
- *  for @a dac. 
- */
-rtems_dac_control *dac_lookup( int dac );
-
-/**
- *  @brief Get the mimimum voltage
- *
- *  This function returns the minimum voltage that the
- *  dac may be programmed to.
- *
- *  @param[in] dac that the voltage corresponds to
- *
- *  @return This method returns an floating point voltage
- *  representing the minimum value the voltage may be
- *  programmed to.
- */
-float rtems_dac_get_minimum_voltage(rtems_dac_control *dac);
-
-/**
- *  @brief Get the maximum voltage
- *
- *  This function returns the maximum voltage that the
- *  dac may be programmed to.
- *
- *  @param[in] dac that the voltage corresponds to
- *
-  *  @return This method returns an floating point voltage
- *  representing the maximum value the voltage may be
- *  programmed to.
- */
-float rtems_dac_get_maximum_voltage(rtems_dac_control *dac);
-
-/**
- *  @brief Set the dac voltage
- *
- *  This function sets the given @a dac voltage
- *  to the specified @a voltage.
- *
- *  @param[in] dac that the voltage corresponds to
- *
- *  @param[in] voltage to set the dac to
- *
- *  @return This method returns a 0 if floating point 
- *  voltage was set.
- */
-int rtems_set_dac_voltage(rtems_dac_control *dac, float voltage);
-
-/* 
- * Discrete Outputs 
- */
-
-/**
- * @brief discrete out control structure.
- */
-typedef rtems_multiio_control rtems_dout_control;
-
-/**
- *  @brief Get the maximum discrete out
- *
- *  This function returns the maximum discrete out.
- *
- *  @return This method returns an integer representing the 
- *  maximum discrete out.
- */
-int rtems_dout_get_maximum(void);
-
-/**
- *  @brief Get the rtems_dout_control for the @a dout.
- *
- *  This function returns the control structure of the 
- *  given discrete out.
- *
- *  @return This method returns the control structure 
- *  for @a dout. 
- */
-rtems_dout_control *dout_lookup( int dout );
-
-/**
- *  @brief Set the discrete out value
- *
- *  This function sets the given @a dout
- *  to the specified @a value.
- *
- *  @param[in] dout to set
- *
- *  @param[in] raw value to set
- *
- *  @return This method returns a 0 if discrete out was
- *  set to the raw value specified.
- */
-int rtems_set_dout(rtems_dout_control *dout, int value);
-
-/* 
- * Discrete Inputs
- */
-
-/**
- * @brief discrete out control structure.
- */
-typedef rtems_multiio_control rtems_din_control;
-
-/**
- *  @brief Get the maximum discrete in
- *
- *  This function returns the maximum discrete in.
- *
- *  @return This method returns an integer representing
- *  maximum supported discrete in.
- */
-int rtems_din_get_maximum(void);
-
-/**
- *  @brief Get the rtems_din_control for the @a din.
- *
- *  This function returns the control structure of the 
- *  given discrete input.
- *
- *  @return This method returns the control structure 
- *  for @a din. 
- */
-rtems_din_control *din_lookup( int din );
-
-
-/**
- *  @brief Get the discrete in value
- *
- *  This function returns the raw value of the specified
- *  @a discrete in.
- *
- *  @return This method returns an integer representing the 
- *  raw value of @a din
- */
-int rtems_din_get( rtems_din_control *din );
-
-/**
- * @brief Flush buffered inputs
- *
- * This function flushes buffered discrete inputs.
- * 
- * @return This method returns 0 when successful.
- */
-int rtems_din_flush_buffered_interrupts(void);
-
-/**
- * @brief Discrete In wait interrupt with timeout
- *
- * This function will wait for ANY discrete in to change
- * state for up to @a milliseconds.
- *
- * @param[in] milliseconds to wait for a change
- *
- * @param[out] timestamp of when the change occurred
- *
- * @param[out] discrete in control structure for the changed discrete.
- *
- * @return This method returns 0 when successful.
- *
- */
-int rtems_din_wait_interrupt_with_timestamp(
-  int                milliseconds,
-  struct timespec   *timestamp,
-  rtems_din_control *din
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
Index: clude/mainpage.h
===================================================================
--- include/mainpage.h	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/*
- *  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$
- */
-
-/**
- * @mainpage
- *
- * The ... TBD description of package
-
- *
- *  @section APIDeviceClasses API Device Classes
- *
- * This includes APIs tailored to each of the following device classes.
- *
- * - Analog to Digital Converters (ADCs)
- * - Digital to Analog Converters (DACs)
- * - XXX ...
- */
Index: clude/multiio.h
===================================================================
--- include/multiio.h	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,64 +1,0 @@
-/*
- *  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$
- */
-
-#ifndef __multiio_h
-#define __multiio_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-
-int rtems_multiio_initialize(void);
-
-const char *rtems_multiio_get_name(void);
-
-/* ADC */
-
-int rtems_adc_get_maximum(void);
-
-float rtems_adc_get_channel_voltage(int adc);
-
-/* DAC */
-
-int rtems_dac_get_maximum(void);
-
-float rtems_dac_get_minimum_voltage(void);
-
-float rtems_dac_get_maximum_voltage(void);
-
-int rtems_set_dac_voltage(int dac, float voltage);
-
-/* Discrete Outputs */
-
-int rtems_dout_get_maximum(void);
-
-int rtems_set_dout(int dout, int value);
-
-/* Discrete Inputs */
-
-int rtems_din_get_maximum(void);
-
-int rtems_din_get(int din);
-
-int rtems_din_flush_buffered_interrupts(void);
-
-int rtems_din_wait_interrupt_with_timestamp(
-  int                milliseconds,
-  struct timespec   *timestamp
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
Index: mmio/.cvsignore
===================================================================
--- pcmmio/.cvsignore	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,4 +1,0 @@
-o-optimize
-FilesystemImage
-FilesystemImage.c
-FilesystemImage.h
Index: mmio/ChangeLog
===================================================================
--- pcmmio/ChangeLog	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,237 +1,0 @@
-2011-10-05	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* mio_io.h: Clean up.
-
-2011-10-05	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* mio_io_rtems.c, multiio_pcmmio.c: Rework interrupt handler to reduce
-	overhead per pin change.
-
-2011-10-05	Cindy Cicalese <cicalese@mitre.org>
-
-	* mio_io.c, mio_io.h, mio_io_rtems.c: Updates after testing in lab.
-
-2011-03-18	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* .cvsignore, Makefile, rootfs/set_adc_modes, rootfs/test_adc: Add root
-	filesystem with test scripts.
-
-2011-03-18	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, mio_io.h, mio_io_rtems.c, pcmmio_shell.c, rtems_config.c:
-	Initial implementation.
-	* .cvsignore, multiio_pcmmio.c: New files.
-
-2009-12-14	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* mio_io_rtems.c: Make internal routines static.
-
-2009-12-14	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, README, mio_io_rtems.c, pcmmio_commands.h: Add command to
-	benchmark discrete input including message queue send and receive.
-	* main_pcmmio_benchmark.c: New file.
-
-2009-12-11	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* mio_io_rtems.c: Ensure mio_error_code is properly initialized to
-	MIO_SUCCESS.
-
-2009-12-11	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* main_pcmmio_din.c, main_pcmmio_irq.c, pcmmio_shell.c: Report time
-	between discrete in interrupts in microseconds.
-
-2009-12-11	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* README: Add section on RTEMS Configuration needed by driver.
-	* mio_io_rtems.c: Switch to using a message queue for transmitting
-	discrete interrupt changes to the task level.
-	* pcmmio_shell.c: Modify application configuration to take into
-	account one less barrier and the new message queue.
-
-2009-12-11	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* README: Add list of new methods.
-	* mio_io.h, mio_io_rtems.c: Add dio_get_missed_interrupts() with
-	no tracking of missed interrupts since will switch to message queues.
-
-2009-10-21	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* main_pcmmio_din.c, main_pcmmio_irq.c: Adjust bit numbering
-	difference.
-
-2009-10-13	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* main_pcmmio_dac.c: Fix help message.
-
-2009-08-13	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* main_pcmmio_dout.c: Fix mismatch in numbering between our view of
-	0-47 and driver's 1-48 view.
-
-2009-08-13	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* main_pcmmio_irq.c, mio_io.h, mio_io_rtems.c: Add ADCs confirmed to
-	work using the dac command. Both single voltages and a pattern were
-	written.
-
-2009-08-12	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, README, main_pcmmio_adc.c, main_pcmmio_dac.c,
-	main_pcmmio_din.c, main_pcmmio_dout.c, mio_io_rtems.c,
-	pcmmio_shell.c: Discrete input polled and interrupt now works.
-
-2009-07-23	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* main_pcmmio_irq.c: Add code to report interrupts.
-
-2009-07-23	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* main_pcmmio_adc.c, main_pcmmio_dac.c, main_pcmmio_din.c,
-	main_pcmmio_dout.c, main_pcmmio_irq.c: Update checks of return status
-	from rtems_string_to_XXX to reflect change to rtems_status_code.
-
-2009-07-22	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, README, main_pcmmio_dac.c, mio_io.h, mio_io_rtems.c,
-	pcmmio_commands.h, pcmmio_shell.c, rtems_config.c: Add pcmmio_irq
-	command and do some cleanup as noticed on other files.
-	* main_pcmmio_irq.c: New file.
-
-2009-07-22	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* README: Fix typo.
-
-2009-07-22	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* README, main_pcmmio_dac.c, rtems_config.c: Add mode to pcmmio_dac
-	command where it can write a pattern.
-
-2009-07-22	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* README, main_pcmmio_adc.c, main_pcmmio_dac.c, main_pcmmio_din.c,
-	main_pcmmio_dout.c, pcmmio_commands.h: Switch to rtems/string2.h
-	methods. Verify negative voltages are allowed as input.
-
-2009-07-21	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, README, main_pcmmio_dac.c, main_pcmmio_dout.c: Added
-	string2XXX routines to RTEMS so we have ability to do heavy error
-	checking on numeric inputs.
-
-2009-07-21	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, README, mio_io.h, pcmmio_commands.h: Add pcmmio_dac
-	command.
-	* main_pcmmio_dac.c: New file.
-
-2009-07-20	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, README, main_pcmmio_din.c, main_pcmmio_dout.c,
-	pcmmio_commands.h: Add initial command to monitor analog inputs.
-	Clean up help and usage.
-	* main_pcmmio_adc.c: New file.
-
-2009-07-20	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* README: Add description of commands.
-	* main_pcmmio_din.c, main_pcmmio_dout.c: Fix usage.
-
-2009-07-20	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, main_pcmmio_din.c, pcmmio_commands.h, pcmmio_shell.c: Add
-	dout command.
-	* main_pcmmio_dout.c: New file.
-
-2009-07-20	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile: Put each command in its own file.
-	* main_pcmmio_din.c: New file.
-	* pcmmio_commands.c: Removed.
-
-2009-07-20	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* pcmmio_commands.c: Clean up command.
-
-2009-07-17	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile: Add dependencies so .exe's are relinked.
-	* mio_io.c: Typo.
-	* pcmmio_commands.c: Basic shell of command works.
-
-2009-07-17	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile: Shell appplication configured with a dummy pcmmio command.
-	* pcmmio_commands.c, pcmmio_commands.h, pcmmio_shell.c: New files.
-
-2009-07-16	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, rtems_config.c: Simple RTEMS Application runs polled. Does
-	not report errors and reports all zeroes on input discretes.
-
-2009-07-10	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* rtems_config.c: Bump POSIX threads.
-
-2009-06-17	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Status: New file.
-
-2009-06-17	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* buffered.c, dacbuff.c, dacout.c, flash.c, getall.c, getvolt.c,
-	kbhit.c, mio_io.c, mio_io_linux.c, mio_io_rtems.c, pcmmio.c, poll.c,
-	repeat.c, rtems_config.c: Clean up. Worked on RTEMS IRQ support code.
-
-2009-06-10	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* mio_io.h, mio_io_rtems.c: Add timestamps to buffered interrupts.
-	* rtems_config.c: Switch to POSIX Initialization thread and up
-	configured pthreads so application can create one.
-
-2009-06-10	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* rtems_config.c: Needs 4 barriers.
-
-2009-06-10	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* README: Document state of the driver.
-	* mio_io.h, mio_io_rtems.c: Move to shared interrupts when possible.
-	* rtems_config.c: Implement the RTEMS configuration and initialization.
-
-2009-06-10	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* mio_io_rtems.c: Initial interrupt support added. Should now be on
-	functional parity with Linux driver but not debugged.
-
-2009-06-10	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* mio_io_rtems.c: All Linux functionality should be implemented now
-	EXCEPT hooking the interrupt.
-
-2009-06-10	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* mio_io_rtems.c: Add checking for interrupt status.
-
-2009-06-08	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, flash.c, mio_io.h: All programs now compile with the copied
-	RTEMS specific porting layer file.
-	* .cvsignore, mio_io_rtems.c: New files.
-
-2009-06-08	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, mio_io.c, mio_io.h: Linux code split to porting file.
-	* mio_io_linux.c: New file.
-
-2009-06-08	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, kbhit.c, mio_io.c, mio_io.h: First successful compilation
-	under RTEMS. Added some Linux ifdef's.
-	* rtems_config.c: New file.
-
-2009-06-08	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* ChangeLog, Makefile.linux, README: New files.
-
Index: mmio/Makefile
===================================================================
--- pcmmio/Makefile	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,45 +1,0 @@
-#
-#  $Id$
-#
-
-#
-#  RTEMS_MAKEFILE_PATH is typically set in an environment variable
-#
-
-
-PGM=${ARCH}/pcmmio_shell.exe
-
-# optional managers required
-MANAGERS=all
-
-#DEFINES += -DTESTING
-CSRCS = pcmmio_shell.c mio_io.c mio_io_rtems.c multiio_pcmmio.c \
-        FilesystemImage.c
-COBJS = $(CSRCS:%.c=${ARCH}/%.o)
-
-DEFINES += -I../include -I../commands
-LD_LIBS += ../commands/${ARCH}/libmiocmds.a
-
-CLEAN_ADDITIONS += FilesystemImage FilesystemImage.c FilesystemImage.h
-
-include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
-include $(RTEMS_CUSTOM)
-include $(PROJECT_ROOT)/make/leaf.cfg
-
-OBJS= $(COBJS) $(CXXOBJS) $(ASOBJS)
-
-all:    ${ARCH} FilesystemImage.c FilesystemImage.h $(OBJS) $(PGM)
-
-${PGM}: $(OBJS)
-	$(make-exe)
-
-FilesystemImage: rootfs/test_adc rootfs/set_adc_modes
-	(cd rootfs ; tar cf - --exclude=.svn \
-	  --exclude=CVS --exclude=.cvsignore .) >$(@)
-
-FilesystemImage.c FilesystemImage.h: FilesystemImage
-	$(PROJECT_ROOT)/bin/rtems-bin2c FilesystemImage FilesystemImage
-
-FilesystemImage.o: FilesystemImage.c
-	$(CC) $(CFLAGS) $(CPU_CFLAGS) -c $<
-
Index: mmio/README
===================================================================
--- pcmmio/README	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,110 +1,0 @@
-#
-#  $Id$
-#
-
-This is a port of the Winsystems Linux driver to RTEMS.
-
-In general, the goal was to minimize changes to the user level
-library and only replace Linux IO calls to the device driver
-with direct access functions. 
-
-The driver uses 4 Classic API Barriers.
-
---joel sherrill
-
-Issues
-======
-+ The library is not reentrant. The GNU/Linux version uses global variables
-  to track the state of certain variables and access to these is not protected.
-  This design flaw is carried over into the RTEMS version.
-
-+ We want to timestamp samples and the initial code did not do that.  I
-  added this.
-
-New Methods
-===========
-  void pcmmio_initialize(
-    unsigned short _base_port,
-    unsigned short _irq
-  );
-
-  void flush_buffered_ints(void);
-
-  int wait_adc_int_with_timeout(int adc_num, int milliseconds);
-
-  int wait_dac_int_with_timeout(int dac_num, int milliseconds);
-
-  int wait_dio_int_with_timeout(int milliseconds);
-
-  int wait_dio_int_with_timestamp(
-    int                 milliseconds,
-    unsigned long long *timestamp
-  );
-  int dio_get_missed_interrupts(void);
-
-RTEMS Configuration
-===================
-The driver needs:
-
-+ 3 Classic API Barriers
-+ 1 Classic API Message Queue
-  - 1024 buffers of sizeof(din_messsage_t) (should be 12 bytes)
-
-The pcmmio_shell example is probably over configured but is a
-working guide.
-
-RTEMS Shell Commands
-====================
-The following RTEMS Shell configuration aids are defined to assist in
-adding PCMMIO related commands to your shell.
-  CONFIGURE_PCMMIO_ALIASES
-  CONFIGURE_PCMMIO_COMMANDS
-
-pcmmio_din - Read Discrete Inputs
-    pcmmio_din [-i iterations] [-p period] [-v]
-    Where: maximum iterations defaults to 1
-           the period is in milliseconds and defaults to 1000
-
-pcmmio_dout - Write a Discrete Output
-    pcmmio_dout bit value
-    Where: bit must be 0-47
-           value must be 0 or 1
-
-pcmmio_adc - Read Analog Inputs
-    pcmmio_adc [-i iterations] [-p period] [-v]
-    Where: maximum iterations defaults to 1
-           the period is in milliseconds and defaults to 1000
-
-pcmmio_dac - Write Analog Output
-    pcmmio_dac dac voltage
-    pcmmio_dac dac low high step time_per_step maximum_time
-
-    Where: dac must be 0-7
-           voltages and step must be -10V to +10V
-           times are in milliseconds
-
-    First form is a single write.
-    Second form writes a pattern.
-
-pcmmio_irq - Wait for PCMMIO IRQs
-  pcmmio_irq [-i iterations] [-p period] [-v] [-d|-D DAC|-a ADC]
-
-  Where: maximum iterations defaults to 1
-         the period is in milliseconds and defaults to 1000
-         -d enables discrete input irq monitoring
-         -D DAC enables irq monitoring on the DAC channel "DAC"
-         -a ADC enables irq monitoring on the ADC channel "ADC"
-
-  You select one of the three IRQ sources to monitor.
-
-pcmmio_benchmark - Benchmark Discrete Input Interrupt Performance
-
-  pcmmio_benchmarks [-i interrupts] [-v]
-
-  Where: maximum interrupts must be >= 1
-
-Aliases
-  + adc  - alias for pcmmio_adc 
-  + dac  - alias for pcmmio_dac 
-  + din  - alias for pcmmio_din 
-  + dout - alias for pcmmio_dout 
Index: mmio/Status
===================================================================
--- pcmmio/Status	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#
-#  $Id$
-#
-
-Questions
-=========
-+ IO Base Address has to be selected and jumpered
-
-+ Interrupt is software programmed but must be selected
-
-Debug Issues
-============
-+ RTEMS specific interrupt code and initialization is the main
-  area of risk in this driver.  The rest of the code is massaged
-  versions of the GNU/Linux driver.
-
Index: mmio/buffered.c
===================================================================
--- pcmmio/buffered.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,138 +1,0 @@
-/* buffered.c Demonstration program for WinSystems PCM-MIO Driver */
-
-/*
-*
-* $Id$
-*
-* Compile for GNU/Linux with:
-*
-*   gcc buffered.c kbhit.c mio_io.o -o buffered -lpthread
-*
-*
-*  This program demonstrates the adc_buffered_channel_conversions function
-*  which allows for a programmed sequence of conversions to be accomplished
-*  with a single call.
-*/
-
-/* Our IOCTL definitions and all function prototypes */
-
-#include "mio_io.h"    
-
-#include <stdio.h>
-#include <stdlib.h>
-
-/* This array will hold 2000 channel numbers plus a terminating 0xff charcter */
-
-unsigned char to_do_channels[2001];
-
-/* This array will store the results of 2000 conversions */
-
-unsigned short values[2000];
-
-/* Keyboard support function prototypes */
-
-void init_keyboard(void);
-void close_keyboard(void);
-int kbhit(void);
-int readch(void);
-
-
-int main(int argc, char* argv[])
-{
-int channel = 0;
-unsigned short result;
-float current;
-unsigned long count = 0;
-int x;
-
-	/* Set up all 16 channels for the +/- 10 Volt range */
-
-	for(channel =0; channel < 16; channel ++)
-	{
-		adc_set_channel_mode(channel,ADC_SINGLE_ENDED,ADC_BIPOLAR,ADC_TOP_10V);
-		if(mio_error_code)
-		{
-			printf("\nError occured - %s\n",mio_error_string);
-			exit(1);
-		}
-	}
-
-	/* We'll fill the to_do list with the four different channels 500
-	  each successively.
-    */
-
-	for(x=0; x < 500; x++)
-	{
-		to_do_channels[x] = 0;
-		to_do_channels[x+500] = 1;
-		to_do_channels[x+1000] = 2;
-		to_do_channels[x+1500] = 3;
-
-	}
-
-	/* Load the "terminator" into the last position */ 
-
-	to_do_channels[2000] = 0xff;
-
-	/*  We'll keep going until a key is pressed */
-
-	init_keyboard();
-
-	while(!kbhit())
-	{
-		/* Start up the conversions. This function returns when all 2000 of
-	     our conversions are complete.
-	    */
-
-		adc_buffered_channel_conversions(to_do_channels,values);
-		
-		count += 2000;
-
-		if(mio_error_code)
-		{
-			printf("\nError occured - %s\n",mio_error_string);
-			exit(1);
-		}
-
-		/* We'll extract our data from the "values" array. In order to make the
-		 display more readable, we'll take a value from each channel display them,
-		 and move to the next result.
-		*/
-
-		for(x=0; x < 500; x++)
-		{
-			printf("%08ld  ",count);
-
-			/* Get the raw data */
-
-			result = values[x];
-
-			/* Convert to voltage */
-
-			current = adc_convert_to_volts(0, result);
-
-			/* Display the value */
-
-			printf("CH0 %9.5f ",current);
-
-			/* Repeat for channels 1 - 3  */
-
-			result = values[x+500];
-			current = adc_convert_to_volts(1, result);
-			printf("CH1 %9.5f ",current);
-
-			result = values[x+1000];
-			current = adc_convert_to_volts(2, result);
-			printf("CH2 %9.5f ",current);
-			
-			result = values[x+1500];
-			current = adc_convert_to_volts(3, result);
-			printf("CH3 %9.5f ",current);
-			printf("\r");
-		}
-	}
-	readch();
-	printf("\n\n");
-	close_keyboard();
-	return 0;
-}
Index: mmio/j.diff
===================================================================
--- pcmmio/j.diff	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,56 +1,0 @@
-Index: mio_io_rtems.c
-===================================================================
-RCS file: /home/CVS-Mitre/pcmmio-rtems/mio_io_rtems.c,v
-retrieving revision 1.10
-diff -u -r1.10 mio_io_rtems.c
---- mio_io_rtems.c	13 Aug 2009 20:49:38 -0000	1.10
-+++ mio_io_rtems.c	11 Dec 2009 15:12:44 -0000
-@@ -663,24 +681,34 @@
-       #endif
- 
-       /*
--       * Buffer the interrupt
--       *
--       * NOTE: No need to worry about disabling interrupts,
--       *       we are in interrupts.
-+       * Ensure there is space to buffer the interrupt
-        */
-+      if ( inptr == (outptr-1) || ((inptr == MAX_INTS) && outptr == 0)) {
-+        pcmmio_dio_missed_interrupts++;
- 
--      int_buffer[inptr].timestamp = rdtsc();
--      int_buffer[inptr].line = int_num;
--      inptr++;
--      if (inptr == MAX_INTS)
--        inptr = 0;
-+	/* Clear the interrupt */
-+	clr_int(int_num);
-+        /* at last slot */
-+      } else {
-+        /*
-+         * Buffer the interrupt
-+         *
-+         * NOTE: No need to worry about disabling interrupts,
-+         *       we are in interrupts.
-+         */
-+	int_buffer[inptr].timestamp = rdtsc();
-+	int_buffer[inptr].line = int_num;
-+	inptr++;
-+	if (inptr == MAX_INTS)
-+	  inptr = 0;
- 
--      /* Clear the interrupt */
--      clr_int(int_num);
--    }
-+	/* Clear the interrupt */
-+	clr_int(int_num);
- 
--    /* Wake up anybody waiting for a DIO interrupt */
--    wake_up_interruptible(&wq_dio);
-+        /* Wake up anybody waiting for a DIO interrupt */
-+        wake_up_interruptible(&wq_dio);
-+      }
-+    }
-   }
- 
-   if (status & 0x10) {
Index: mmio/mio_io.c
===================================================================
--- pcmmio/mio_io.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,1505 +1,0 @@
-/* mio_io.c
- * WinSystems support module file for the PCM-MIO Linux and RTEMS drivers
- *
- *  $Id$
- *
- *  This file implements all of the supported 'C' language functions.
- *  Where necessary calls are made into a porting layer to access the
- *  actual hardware.
- */
-
-#define LIB_DEFINED
-
-/* #define DEBUG 1 */
-
-#include "mio_io.h"    
-
-#include <stdio.h>
-
-/* These image variable help out where a register is not
-   capable of a read/modify/write operation
-*/
-
-unsigned char dio_port_images[8];
-unsigned char adc1_port_image =0;
-unsigned char adc2_port_image =0;
-unsigned char dac1_port_image =0;
-unsigned char dac2_port_image =0;
-
-
-/* The channel selects on the ADC are non contigous. In order to avoid shifting and such
-   with each channel select, we simple bild an array for selection.
-*/
-
-unsigned char adc_channel_select[16] = {ADC_CH0_SELECT, ADC_CH1_SELECT, ADC_CH2_SELECT,
-	ADC_CH3_SELECT, ADC_CH4_SELECT, ADC_CH5_SELECT, ADC_CH6_SELECT, ADC_CH7_SELECT,
-	ADC_CH0_SELECT, ADC_CH1_SELECT, ADC_CH2_SELECT, ADC_CH3_SELECT, ADC_CH4_SELECT,
-	ADC_CH5_SELECT, ADC_CH6_SELECT, ADC_CH7_SELECT };
-
-/* Mode selection can also be time consuming and we'd also like the mode to "Stick" from
-   call to call. This array will eventually hold the actual command byte to send to the
-   ADC controller for each channel according to the mode set with adc_set_channel_mode
-*/
-
-unsigned char adc_channel_mode[16] = {ADC_CH0_SELECT, ADC_CH1_SELECT, ADC_CH2_SELECT,
-	ADC_CH3_SELECT, ADC_CH4_SELECT, ADC_CH5_SELECT, ADC_CH6_SELECT, ADC_CH7_SELECT,
-	ADC_CH0_SELECT, ADC_CH1_SELECT, ADC_CH2_SELECT, ADC_CH3_SELECT, ADC_CH4_SELECT,
-	ADC_CH5_SELECT, ADC_CH6_SELECT, ADC_CH7_SELECT };
-
-
-/* This array and the index value are used internally for the adc_convert_all_channels
-  and for the adc_buffered_conversion routines.
-*/
-unsigned char adc_channel_buff[18] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,15,0xff,0xff};
-unsigned char *adc_input_buffer;
-unsigned short *adc_user_buffer;
-
-/* Becaues of the nature of the ADC beast. It's necessary to keep track of the last
-  channel and the previous channel in order to retrieve the data amd know who it belongs to
-*/
-
-int adc_last_channel, adc_current_channel;
-
-/* Various index pointers for the above arrays and misc globals */
-
-int adc_ch_index =0;
-int adc_out_index=0;
-int adc_repeat_channel;
-int adc_repeat_count;
-
-
-
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		DISABLE_DIO_INTERRUPT
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int disable_dio_interrupt(void)
-{
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	adc1_port_image = adc1_port_image | 0x10;
-	mio_write_reg(0x03, adc1_port_image);	// Access the int enable register
-	mio_write_reg(0x02, 0);
-	adc1_port_image = adc1_port_image & 0xef;
-	mio_write_reg(0x03,adc1_port_image );	// Disable the interrupt
-	
-	return(0);
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		ENABLE_DIO_INTERRUPT
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int enable_dio_interrupt(void)
-{
-unsigned char vector;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	/* We read the assign IRQ from the driver, so we can program the hardware to
-	   match,  but only if an aaplication desires such.
-    */
-
-	vector = mio_read_irq_assigned();
-
-	if(vector == 0)
-	{
-		mio_error_code = MIO_MISSING_IRQ;
-		sprintf(mio_error_string,"MIO(DIO) : enable_dio_interrupt - No IRQ assigned");
-		return(1);
-	}
-
-	adc1_port_image = adc1_port_image | 0x10;
-	mio_write_reg(0x03, adc1_port_image);	// Access the int enable register
-	mio_write_reg(0x02, vector);
-	adc1_port_image = adc1_port_image & 0xef;
-	mio_write_reg(0x03, adc1_port_image);	// Enable the interrupt
-
-	return(0);
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		DISABLE_DAC_INTERRUPT
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int disable_dac_interrupt(int dac_num)
-{
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	if(dac_num)
-	{
-		dac2_port_image = dac2_port_image & 0xfe;
-		dac2_port_image = dac2_port_image | 0x08;
-		mio_write_reg(0x0f, dac2_port_image);	// Access the int enable register
-		mio_write_reg(0x0e, 0);
-		dac2_port_image = dac2_port_image & 0xf7;
-		mio_write_reg(0x0f, dac2_port_image);	// Disable the interrupt
-	}
-	else
-	{
-		dac1_port_image = dac1_port_image & 0xfe;
-		dac1_port_image = dac1_port_image | 0x08;
-		mio_write_reg(0x0b, dac1_port_image);	// Access the int enable register
-	
-		mio_write_reg(0x0a, 0);
-
-		dac1_port_image = dac1_port_image & 0xf7;
-		mio_write_reg(0x0b, dac1_port_image);	// Disable the interrupt
-	}
-	return(0);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		ENABLE_DAC_INTERRUPT
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int enable_dac_interrupt(int dac_num)
-{
-unsigned char vector;
-
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	/* We read the assign IRQ from the driver, so we can program the hardware to
-	   match,  but only if an aaplication desires such.
-    */
-
-	vector = mio_read_irq_assigned();
-
-	if(vector == 0)
-	{
-		mio_error_code = MIO_MISSING_IRQ;
-		sprintf(mio_error_string,"MIO(DAC) : enable_dac_interrupt - No IRQ assigned");
-		return(1);
-	}
-
-
-	if(dac_num)
-	{
-		dac2_port_image = dac2_port_image & 0xfe;
-		dac2_port_image = dac2_port_image | 0x08;
-		mio_write_reg(0x0f, dac2_port_image);	// Access the int enable register
-
-		mio_write_reg(0x0e, vector);
-
-		dac2_port_image = dac2_port_image & 0xf7;
-		dac2_port_image = dac2_port_image | 0x01;
-		mio_write_reg(0x0f, dac2_port_image);	// Enable the interrupt
-	}
-	else
-	{
-		dac1_port_image = dac1_port_image & 0xfe;
-		dac1_port_image = dac1_port_image | 0x08;
-		mio_write_reg(0x0b, dac1_port_image);	// Access the int enable register
-
-		mio_write_reg(0x0a, vector);
-
-		dac1_port_image = dac1_port_image & 0xf7;
-		dac1_port_image = dac1_port_image | 0x01;
-		mio_write_reg(0x0b, dac1_port_image);	// Enable the interrupt
-	}
-	return(0);
-}
-
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		DISABLE_ADC_INTERRUPT
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int disable_adc_interrupt(int adc_num)
-{
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	if(adc_num)
-	{
-		adc2_port_image = adc2_port_image & 0xfe;
-		adc2_port_image = adc2_port_image | 0x08;
-		mio_write_reg(0x07, adc2_port_image);	// Access the int enable register
-
-		mio_write_reg(0x06, 0);
-
-		adc2_port_image = adc2_port_image & 0xf7;
-		mio_write_reg(0x07, adc2_port_image);	// Disable the interrupt
-	}
-	else
-	{
-		adc1_port_image = adc1_port_image & 0xfe;
-		adc1_port_image = adc1_port_image | 0x08;
-		mio_write_reg(0x03, adc1_port_image);	// Access the int enable register
-
-		mio_write_reg(0x02, 0);
-
-		adc1_port_image = adc1_port_image & 0xf7;
-		mio_write_reg(0x03, adc1_port_image);	// Disable the interrupt
-	}
-	return(0);
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		ENABLE_ADC_INTERRUPT
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int enable_adc_interrupt(int adc_num)
-{
-unsigned char vector;
-
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	/* We read the assign IRQ from the driver, so we can program the hardware to
-	   match,  but only if an aaplication desires such.
-    */
-
-	vector = mio_read_irq_assigned();
-
-	if(vector == 0)
-	{
-		mio_error_code = MIO_MISSING_IRQ;
-		sprintf(mio_error_string,"MIO(ADC) : enable_adc_interrupt - No IRQ assigned");
-
-		return(1);
-	}
-
-	if(adc_num)
-	{
-		adc2_port_image = adc2_port_image & 0xfe;
-		adc2_port_image = adc2_port_image | 0x08;
-		mio_write_reg(0x07, adc2_port_image);	// Access the int enable register
-
-		mio_write_reg(0x06, vector);
-
-		adc2_port_image = adc2_port_image & 0xf7;
-		adc2_port_image = adc2_port_image | 0x01;
-		mio_write_reg(0x07, adc2_port_image);	// Enable the interrupt
-	}
-	else
-	{
-		adc1_port_image = adc1_port_image & 0xfe;
-		adc1_port_image = adc1_port_image | 0x08;
-		mio_write_reg(0x03, adc1_port_image);	// Access the int enable register
-
-		mio_write_reg(0x02, vector);
-
-		adc1_port_image = adc1_port_image & 0xf7;
-		adc1_port_image = adc1_port_image | 0x01;
-		mio_write_reg(0x03, adc1_port_image);	// Enable the interrupt
-	}
-	return(0);
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		SET_DAC_SPAN
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int set_dac_span(int channel, unsigned char span_value)
-{
-unsigned char select_val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	if((channel < 0) || (channel > 7))
-	{
-		mio_error_code = MIO_BAD_CHANNEL_NUMBER;
-		sprintf(mio_error_string,"MIO(DAC) : Set_dac_span - bad channel number %d",channel);
-		return(1);
-	}
-
-
-	/* This function sets up the output range for the DAC channel */
-
-	select_val = (channel % 4) << 1;
-
-	write_dac_data(channel / 4, span_value);
-	if(mio_error_code)
-		return 1;
-
-	write_dac_command(channel / 4, 0x60 | select_val);
-	if(mio_error_code)
-		return(1);
-
-	if(wait_dac_ready(channel))
-		return 1;
-
-	return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		WAIT_DAC_READY
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int wait_dac_ready(int channel)
-{
-unsigned long retry;
-
-	retry = 100000L;
-
-	/* This may seem like an absurd way to handle waiting and violates the
-	"no busy waiting" policy. The fact is that the hardware is normally so fast that we
-	usually only need one time through the loop anyway. The longer timeout is for rare
-	occasions and for detecting non-existant hardware.
-	*/
-
-	while(retry--)
-	{
-		if(dac_read_status(channel / 4) & DAC_BUSY)
-			return 0;
-
-	}
-	return 1;
-
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		SET_DAC_OUTPUT
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int set_dac_output(int channel, unsigned short dac_value)
-{
-unsigned char select_val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	select_val = (channel % 4) << 1;
-	write_dac_data(channel / 4, dac_value);
-	if(mio_error_code)
-		return(1);
-	write_dac_command(channel / 4, 0x70 | select_val);
-	if(mio_error_code)
-		return(1);
-
-	if(wait_dac_ready(channel))
-		return 1;
-
-	return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		SET_DAC_VOLTAGE
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int set_dac_voltage(int channel, float voltage)
-{
-unsigned short  value = 0;
-float bit_val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	/* This output function is auto-ranging in that it picks the span that will
-	give the most precision for the voltage specified. This has one side-effect that
-	may be objectionable to some applications. When call to set_dac_span completes the
-	new range is set and the output will respond immediately using whatever value was last
-	in the output registers. This may cause a spike (up or down) in the DAC output until the
-	new output value is sent to the controller.
-	*/
-
-	if((voltage < -10.0) || (voltage > 10.0))
-	{
-		mio_error_code = MIO_ILLEGAL_VOLTAGE;
-		sprintf(mio_error_string,"MIO(DAC) :Set DAC Voltage - Illegal Voltage %9.5f",voltage);
-		return 1;
-	}
-
-	if((voltage >= 0.0) && (voltage < 5.0))
-	{
-		set_dac_span(channel,DAC_SPAN_UNI5);
-		if(mio_error_code)
-			return(1);
-		bit_val = 5.0 / 65536;
-		value = (unsigned short) (voltage / bit_val);
-	}
-
-	if(voltage >= 5.0)
-	{
-		set_dac_span(channel,DAC_SPAN_UNI10);
-		if(mio_error_code)
-			return(1);
-		bit_val = 10.0 / 65536;
-		value = (unsigned short) (voltage / bit_val);
-	}
-
-	if((voltage < 0.0) && (voltage > -5.0))
-	{
-		set_dac_span(channel, DAC_SPAN_BI5);
-		if(mio_error_code)
-			return(1);
-		bit_val = 10.0 / 65536;
-		value = (unsigned short) ((voltage + 5.0) / bit_val);
-	}
-
-	if(voltage <= -5.0)
-	{
-		set_dac_span(channel, DAC_SPAN_BI10);
-		if(mio_error_code)
-			return(1);
-		bit_val = 20.0 / 65536;
-		value  = (unsigned short) ((voltage + 10.0) / bit_val);
-	}
-
-	if(wait_dac_ready(channel))
-		return 1;
-
-	set_dac_output(channel,value);
-	if(mio_error_code)
-		return(1);
-
-	return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		ADC_START_CONVERSION
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int adc_start_conversion(int channel)
-{
-	mio_error_code = MIO_SUCCESS;
-
-	if((channel <0) || (channel > 15))
-	{
-		mio_error_code = MIO_BAD_CHANNEL_NUMBER;
-		sprintf(mio_error_string,"MIO(ADC) : Start conversion bad channel number %d",channel);
-		return(1);
-	}
-
-	adc_last_channel = adc_current_channel;
-	adc_current_channel = channel;
-
-	write_adc_command(channel / 8,adc_channel_mode[channel]);
-	
-	if(mio_error_code)
-		return(1);
-
-	return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		ADC_GET_CHANNEL_VOLTAGE
-//
-//////////////////////////////////////////////////////////////////////////////
-
-float adc_get_channel_voltage(int channel)
-{
-unsigned short value;
-float result;
-
-	mio_error_code = MIO_SUCCESS;
-
-	// Start two conversions so that we can have current data
-
-	adc_start_conversion(channel);
-	if(mio_error_code)
-		return(0.0);
-
-	adc_wait_ready(channel);
-	if(mio_error_code)
-		return(0.0);
-
-	adc_start_conversion(channel);
-	if(mio_error_code)
-		return(0.0);
-
-	adc_wait_ready(channel);
-	if(mio_error_code)
-		return(0.0);
-
-	// Read out the conversion's raw data
-
-	value = adc_read_conversion_data(channel);
-	if(mio_error_code)
-		return(0.0);
-
-	// Convert the raw data to a voltage 
-
-	value = value + adc_adjust[channel];
-	result = value * adc_bitval[channel];
-	result = result + adc_offset[channel];
-
-	return(result);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		ADC_CONVERT_ALL_CHANNELS
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int adc_convert_all_channels(unsigned short *buffer)
-{
-int x;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	// Initialize global variables including transferinng the
-	// address of the user's ouput buffer to an internal buffer pointer
-
-	adc_user_buffer = buffer;
-	adc_input_buffer = adc_channel_buff;
-	adc_ch_index =0;
-	adc_out_index = 0;
-
-	adc_start_conversion(0);
-	if(mio_error_code)
-		return(1);
-
-	adc_wait_ready(0);
-	if(mio_error_code)
-		return(1);
-
-	// This is old data throw it out
-
-	adc_read_conversion_data(0);
-	if(mio_error_code)
-		return(1);
-
-	// Finish the rest of the channels
-
-	for(x=1; x<8; x++)
-	{
-		adc_start_conversion(x);
-		if(mio_error_code)
-			return(1);
-
-		adc_wait_ready(x);
-		if(mio_error_code)
-			return(1);
-
-		// Store the results in the user's buffer
-
-		adc_user_buffer[adc_out_index++] = adc_read_conversion_data(x);
-		if(mio_error_code)
-			return(1);
-	}
-
-	// A final dummy conversion is required to get out the last data
-
-	adc_start_conversion(7);
-	if(mio_error_code)
-		return(1);
-
-	adc_wait_ready(7);
-	if(mio_error_code)
-		return(1);
-
-	adc_user_buffer[adc_out_index++] = adc_read_conversion_data(7);
-	if(mio_error_code)
-		return(1);
-
-	// Now start on the second controller
-
-	adc_start_conversion(8);
-	if(mio_error_code)
-		return(1);
-
-	adc_wait_ready(8);
-	if(mio_error_code)
-		return(1);
-
-	// This data is old - Throw it out
-
-	adc_read_conversion_data(8);
-	if(mio_error_code)
-		return(1);
-
-	for(x=9; x<16; x++)
-	{
-		adc_start_conversion(x);
-		if(mio_error_code)
-			return(1);
-
-		adc_wait_ready(x);
-		if(mio_error_code)
-			return(1);
-
-		adc_user_buffer[adc_out_index++] = adc_read_conversion_data(x);
-		if(mio_error_code)
-			return(1);
-	}
-
-	// A final dummy conversion is required to get the last data
-
-	adc_start_conversion(15);
-	if(mio_error_code)
-		return(1);
-
-	adc_wait_ready(15);
-	if(mio_error_code)
-		return(1);
-
-	adc_user_buffer[adc_out_index++] = adc_read_conversion_data(15);
-	if(mio_error_code)
-		return(1);
-
-	return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		ADC_CONVERT_TO_VOLTS
-//
-//////////////////////////////////////////////////////////////////////////////
-
-float adc_convert_to_volts(int channel, unsigned short value)
-{
-float result;
-
-		if((channel < 0) || (channel > 15))
-			return(0.0);
-
-		value = value + adc_adjust[channel];
-		result = value * adc_bitval[channel];
-		result = result + adc_offset[channel];
-		return result;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		ADC_CONVERT_SINGLE_REPEATED
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int adc_convert_single_repeated(int channel, unsigned short count, unsigned short *buffer)
-{
-	int x;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	// Setup global variables including transferring the address of the
-	// user's output buffer to a global variable the ISR knows about.
-
-	adc_user_buffer = buffer;
-	adc_out_index = 0;
-	adc_repeat_channel = channel;
-	adc_repeat_count = count;
-
-	adc_start_conversion(adc_repeat_channel);
-	if(mio_error_code)
-		return(1);
-
-	adc_wait_ready(adc_repeat_channel);
-	if(mio_error_code)
-		return(1);
-
-	// This data is old, we don't want it
-
-	adc_read_conversion_data(adc_repeat_channel);
-	if(mio_error_code)
-		return(1);
-
-	// Perform the requested number of conversions. Place the results into
-	// the user's buffer.
-
-	for(x=0; x<=adc_repeat_count; x++)
-	{
-		adc_start_conversion(adc_repeat_channel);
-		if(mio_error_code)
-			return(1);
-
-		adc_wait_ready(adc_repeat_channel);
-		if(mio_error_code)
-			return(1);
-
-		adc_user_buffer[adc_out_index++] = adc_read_conversion_data(adc_repeat_channel);
-		if(mio_error_code)
-			return(1);
-	}
-
-	// One last dummy conversion to retrieve our last data
-
-	adc_start_conversion(adc_repeat_channel);
-	if(mio_error_code)
-		return(1);
-
-	adc_wait_ready(adc_repeat_channel);
-	if(mio_error_code)
-		return(1);
-
-	adc_user_buffer[adc_out_index++] = adc_read_conversion_data(adc_repeat_channel);
-	if(mio_error_code)
-		return(1);
-
-	return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		ADC_BUFFERED_CHANNEL_CONVERSIONS
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int adc_buffered_channel_conversions(unsigned char *input_channel_buffer,unsigned short *buffer)
-{
-int adc_next_channel;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-
-	adc_ch_index = 0;
-	adc_out_index = 0;
-	
-	adc_user_buffer = buffer;
-	adc_input_buffer = input_channel_buffer;
-
-	// Reset all of the array index pointers
-
-	adc_start_conversion(adc_input_buffer[adc_ch_index]);
-
-	if(mio_error_code)
-		return(1);
-
-	adc_wait_ready(adc_input_buffer[adc_ch_index++]);
-
-	if(mio_error_code)
-		return(1);
-
-	// While there are channel numbers in the buffer (1= 0xff)
-	// convert the requested channel and place the result in the
-	// user's output buffer
-
-	while(adc_input_buffer[adc_ch_index] != 0xff)
-	{
-		adc_next_channel = adc_input_buffer[adc_ch_index];
-
-
-		/* This function is particularly tricky because of the
-		fact that the data is delayed by one conversion and if
-		we switch back and forth between the two controllers
-		we'll need to run an extra conversion in order to get the
-		last data offering from the previous controller. The
-		conditional code in the next several lines handles the
-		switches from one controller to the other.
-		*/
-
-		if(adc_current_channel < 8 && adc_next_channel > 7)
-		{
-			adc_start_conversion(adc_current_channel);
-			if(mio_error_code)
-				return(1);
-
-			adc_wait_ready(adc_current_channel);
-			if(mio_error_code)
-				return(1);
-
-			adc_user_buffer[adc_out_index++] = adc_read_conversion_data(adc_current_channel);
-			if(mio_error_code)
-				return(1);
-
-			adc_start_conversion(adc_input_buffer[adc_ch_index]);
-			if(mio_error_code)
-				return(1);
-
-			adc_wait_ready(adc_input_buffer[adc_ch_index++]);
-			if(mio_error_code)
-				return(1);
-		}
-		else if(adc_current_channel > 7 && adc_next_channel < 8)
-		{
-			adc_start_conversion(adc_current_channel);
-			if(mio_error_code)
-				return(1);
-
-			adc_wait_ready(adc_current_channel);
-			if(mio_error_code)
-				return(1);
-
-			adc_user_buffer[adc_out_index++] = adc_read_conversion_data(adc_current_channel);
-			if(mio_error_code)
-				return(1);
-
-			adc_start_conversion(adc_input_buffer[adc_ch_index]);
-			if(mio_error_code)
-				return(1);
-
-			adc_wait_ready(adc_input_buffer[adc_ch_index++]);
-			if(mio_error_code)
-				return(1);
-		}
-		adc_start_conversion(adc_input_buffer[adc_ch_index]);
-		if(mio_error_code)
-			return(1);
-
-		adc_wait_ready(adc_input_buffer[adc_ch_index++]);
-		if(mio_error_code)
-			return(1);
-
-		adc_user_buffer[adc_out_index++] = adc_read_conversion_data(adc_current_channel);
-		if(mio_error_code)
-			return(1);
-	}
-
-	// One last conversion allows us to retrieve our real last data
-
-	adc_start_conversion(adc_input_buffer[--adc_ch_index]);
-	if(mio_error_code)
-		return(1);
-	adc_wait_ready(adc_input_buffer[adc_ch_index]);
-	if(mio_error_code)
-		return(1);
-
-	adc_user_buffer[adc_out_index++] = adc_read_conversion_data(adc_last_channel);
-	if(mio_error_code)
-		return(1);
-
-	return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		ADC_WAIT_READY
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int adc_wait_ready(int channel)
-{
-long retry;
-	
-	mio_error_code = MIO_SUCCESS;
-	retry = 100000l;
-
-	/* Like with the DAC timeout routine, under normal circumstances we'll
-	barely make it through the loop one time beacuse the hadrware is plenty
-	fast. We have the delay for the rare occasion and when the hadrware is not
-	responding properly.
-	*/
-
-	while(retry--)
-	{
-		if(adc_read_status(channel / 8) & 0x80)
-			return 0;
-	}
-
-	mio_error_code = MIO_TIMEOUT_ERROR;
-	sprintf(mio_error_string,"MIO(ADC) : Wait ready - Device timeout error");
-	return(1);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		BUFFERED_DAC_OUTPUT
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int buffered_dac_output(unsigned char *cmd_buff,unsigned short *data_buff)
-{
-int x= 0;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	while(1)
-	{
-		if(cmd_buff[x] == 0xff)
-			return 0;
-
-		if(set_dac_output(cmd_buff[x], data_buff[x]))
-			return 1;
-
-		x++;
-	}
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		ADC_SET_CHANNEL_MODE
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int adc_set_channel_mode(int channel, int input_mode,int duplex,int range)
-{
-unsigned char command_byte;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(channel < 0 || channel > 15)
-	{
-		mio_error_code = MIO_BAD_CHANNEL_NUMBER;
-		sprintf(mio_error_string,"MIO(ADC) : Set Channel Mode - Bad Channel Number %d",channel);
-		return(1);
-	}
-
-	// Check for illegal modes
-
-	if((input_mode != ADC_SINGLE_ENDED) && (input_mode != ADC_DIFFERENTIAL))
-	{
-		mio_error_code = MIO_BAD_MODE_NUMBER;
-		sprintf(mio_error_string,"MIO(ADC) : Set Channel Mode - Bad Mode Number");
-		return(1);
-	}
-
-	if((duplex != ADC_UNIPOLAR) && (duplex != ADC_BIPOLAR))
-	{
-		mio_error_code = MIO_BAD_MODE_NUMBER;
-		sprintf(mio_error_string,"MIO(ADC) : Set Channel Mode - Bad Mode Number");
-		return(1);
-	}
-
-	if((range != ADC_TOP_5V) && (range != ADC_TOP_10V))
-	{
-		mio_error_code = MIO_BAD_RANGE;
-		sprintf(mio_error_string,"MIO(ADC) : Set Channel Mode - Bad Range Value");
-		return(1);
-	}
-
-	command_byte = adc_channel_select[channel];
-	command_byte = command_byte | input_mode | duplex | range;
-
-	/* Building these four arrays at mode set time is critical for speed
-	   as we don't need to calculate anything when we want to start an ADC
-	   conversion. WE simply retrieve the command byte from the array
-	   and send it to the controller.
-
-	   Likewise, when doing conversion from raw 16-bit values to a voltage
-	   the mode controls the worth of each individual bit as well as binary
-	   bias and offset values.
-   */
-
-	adc_channel_mode[channel] = command_byte;
-
-	/* Calculate bit values, offset, and adjustment values */
-
-	if((range == ADC_TOP_5V) && (duplex == ADC_UNIPOLAR))
-	{
-		adc_bitval[channel] = 5.00 / 65536.0;
-		adc_adjust[channel] = 0;
-		adc_offset[channel] = 0.0;
-	}
-
-	if((range == ADC_TOP_5V) && (duplex == ADC_BIPOLAR))
-	{
-		adc_bitval[channel] = 10.0 / 65536.0;
-		adc_adjust[channel] = 0x8000;
-		adc_offset[channel] = -5.000;
-	}
-
-	if((range == ADC_TOP_10V) && (duplex == ADC_UNIPOLAR))
-	{
-		adc_bitval[channel] = 10.0 / 65536.0;
-		adc_adjust[channel] = 0;
-		adc_offset[channel] = 0.0;
-	}
-
-	if((range == ADC_TOP_10V) && (duplex == ADC_BIPOLAR))
-	{
-		adc_bitval[channel] = 20.0 / 65536.0;
-		adc_adjust[channel] = 0x8000;
-		adc_offset[channel] = -10.0;
-	}
-
-	return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//
-//		ADC_AUTO_GET_CHANNEL_VOLTAGE
-//
-//
-/////////////////////////////////////////////////////////////////////////////////
-
-float adc_auto_get_channel_voltage(int channel)
-{
-unsigned short value;
-float result;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	// Start out on a +/-10 Volt scale
-
-	adc_set_channel_mode(channel,ADC_SINGLE_ENDED,ADC_BIPOLAR,ADC_TOP_10V);
-	if(mio_error_code)
-		return(0.0);
-
-	adc_start_conversion(channel);
-	if(mio_error_code)
-		return(0.0);
-
-	adc_wait_ready(channel);
-	if(mio_error_code)
-		return(0.0);
-
-	adc_start_conversion(channel);
-	if(mio_error_code)
-		return(0.0);
-
-	adc_wait_ready(channel);
-	if(mio_error_code)
-		return(0.0);
-
-	value = adc_read_conversion_data(channel);
-	if(mio_error_code)
-		return(0.0);
-
-	// Convert the raw data to voltage
-
-	value = value + adc_adjust[channel];
-	result = value * adc_bitval[channel];
-	result = result + adc_offset[channel];
-
-#ifdef DEBUG
-	printf("auto_get_channel_voltage : Raw = %04x, adjust = %d, bitval = %9.5f, offset = %9.5f,  result = %9.5f\n",
-		                                value - adc_adjust[channel],adc_adjust[channel],adc_bitval[channel],adc_offset[channel],result);
-#endif
-
-	// If the voltage is less than -5.00 volts, we're as precise as we can get
-
-	if(result <= -5.00)
-		return(result);
-
-	// If the result is between -4.99 and 0.0 we can  to the +/- 5V scale.
-
-	if(result < 0.0)
-		adc_set_channel_mode(channel,ADC_SINGLE_ENDED,ADC_BIPOLAR,ADC_TOP_5V);
-
-	if(mio_error_code)
-		return(0.0);
-
-	// If the result is above 5 volts a 0 - 10V range will work best
-
-	if(result >= 5.00)
-		adc_set_channel_mode(channel,ADC_SINGLE_ENDED,ADC_UNIPOLAR,ADC_TOP_10V);
-
-	if(mio_error_code)
-		return(0.0);
-
-	// Lastly if we're greater than 0 and less than 5 volts the 0-5V scale is best
-
-	if((result >= 0.0) && (result < 5.00))
-		adc_set_channel_mode(channel, ADC_SINGLE_ENDED, ADC_UNIPOLAR,ADC_TOP_5V);
-
-	if(mio_error_code)
-		return(0.0);
-
-	// Now that the values is properly ranged, we take two more samples
-	// to get a current reading at the new scale.
-
-	adc_start_conversion(channel);
-
-	if(mio_error_code)
-		return(0.0);
-
-	adc_wait_ready(channel);
-
-	if(mio_error_code)
-		return(0.0);
-
-	adc_start_conversion(channel);
-
-	if(mio_error_code)
-		return(0.0);
-
-	adc_wait_ready(channel);
-
-	if(mio_error_code)
-		return(0.0);
-
-	value = adc_read_conversion_data(channel);
-	if(mio_error_code)
-		return(0.0);
-
-	// Convert the raw data to voltage
-
-	value = value + adc_adjust[channel];
-	result = value * adc_bitval[channel];
-	result = result + adc_offset[channel];
-
-#ifdef DEBUG
-	printf("auto_get_channel_voltage : Raw = %04x, adjust = %d, bitval = %9.5f, offset = %9.5f,  result = %9.5f\n",
-		                                value - adc_adjust[channel],adc_adjust[channel],adc_bitval[channel],adc_offset[channel],result);
-#endif
-
-	return(result);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//
-//		DIO_READ_BIT
-//
-//
-/////////////////////////////////////////////////////////////////////////////////
-
-int dio_read_bit(int bit_number)
-{
-unsigned char port;
-int val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	// Adjust for 0 - 47 bit numbering
-
-	--bit_number;
-
-	port = bit_number / 8;
-
-	val = read_dio_byte(port);
-
-	// Get just the bit we specified
-
-	val = val & (1 << (bit_number % 8));
-
-	// adjust the return for a 0 or 1 value
-
-	if(val)
-		return 1;
-
-	return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//
-//		DIO_WRITE_BIT
-//
-//
-/////////////////////////////////////////////////////////////////////////////////
-
-int dio_write_bit(int bit_number, int val)
-{
-unsigned char port;
-unsigned char temp;
-unsigned char mask;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	// Adjust bit numbering for 0 based numbering
-
-	--bit_number;
-
-	// Calculate the address of the port based on bit number
-
-	port = bit_number / 8;
-
-	// Use the image value to avoid having to read from the port first
-
-	temp = dio_port_images[bit_number / 8];
-
-	// Calculate the bit mask for the specifed bit
-
-	mask = (1 << (bit_number %8));
-
-	// Check whether the request was to set or clear the bit
-
-	if(val)
-		temp = temp | mask;
-	else
-		temp = temp & ~mask;
-
-	// Update the image value with the value we're about to write
-
-	dio_port_images[bit_number / 8] = temp;
-
-	write_dio_byte(port, temp);
-
-	return 0;
-}
-
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//
-//		DIO_SET_BIT
-//
-//
-/////////////////////////////////////////////////////////////////////////////////
-
-int dio_set_bit(int bit_number)
-{
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	dio_write_bit(bit_number,1);
-
-	return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//
-//		DIO_CLR_BIT
-//
-//
-/////////////////////////////////////////////////////////////////////////////////
-
-int dio_clr_bit(int bit_number)
-{
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	dio_write_bit(bit_number,0);
-
-	return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//
-//		DIO_ENAB_BIT_INT
-//
-//
-/////////////////////////////////////////////////////////////////////////////////
-
-int dio_enab_bit_int(int bit_number, int polarity)
-{
-unsigned char port;
-unsigned char temp;
-unsigned char mask;
-
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	// Adjust the bit number for 0 based numbering
-
-	--bit_number;
-
-	// Calculate the offset for the enable port
-
-	port = (bit_number / 8) + 8;
-
-	// Calculate the proper bit mask for this bit number
-
-	mask = (1 << (bit_number % 8));
-
-	// Turn on access to page 2 registers
-
-	write_dio_byte(0x07,0x80);
-
-	// Get the current state of the enable register
-
-	temp = read_dio_byte(port);
-
-        // Temporarily clear only our enable. This clears the interrupt
-
-        temp = temp & ~mask;
-
-        // Write out the temporary value
-
-        write_dio_byte(port, temp);
-
-	// Set the enable bit for our bit number
-
-	temp = temp | mask;
-
-	// Now update the interrupt enable register
-
-	write_dio_byte(port, temp);
-
-	// Turn on access to page 1 for polarity control
-
-	write_dio_byte(0x07,0x40);
-
-	temp = read_dio_byte(port);
-
-	// Set the polarity according to the argument value
-
-	if(polarity)
-		temp = temp | mask;
-	else
-		temp = temp & ~mask;
-
-	write_dio_byte(port, temp);
-
-	// Set access back to page 0
-
-	write_dio_byte(0x07,0);
-
-	return 0;
-}
-
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//
-//		DIO_DISAB_BIT_INT
-//
-//
-/////////////////////////////////////////////////////////////////////////////////
-
-int dio_disab_bit_int(int bit_number)
-{
-unsigned char port;
-unsigned char temp;
-unsigned char mask;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	// Adjust the bit number for 0 based numbering
-
-	--bit_number;
-
-	// Calculate the offset for the enable port
-
-	port = (bit_number / 8) + 8;
-
-	// Calculate the proper bit mask for this bit number
-
-	mask = (1 << (bit_number % 8));
-
-	// Turn on access to page 2 registers
-
-	write_dio_byte(0x07,0x80);
-
-	// Get the current state of the enable register
-
-	temp = read_dio_byte(port);
-
-	// Clear the enable bit for the our bit
-
-	temp = temp & ~mask;
-
-	// Update the enable register with the new data
-
-	write_dio_byte(port,temp);
-
-	// Set access back to page 0
-
-	write_dio_byte(0x07,0);
-
-	return 0;
-}
-
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//
-//		DIO_CLR_INT
-//
-//
-/////////////////////////////////////////////////////////////////////////////////
-
-int dio_clr_int(int bit_number)
-{
-unsigned short port;
-unsigned short temp;
-unsigned short mask;
-
-	// Adjust for 0 based numbering
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	--bit_number;
-
-	// Calculate the correct offset for our enable register
-
-	port = (bit_number / 8) + 8;
-
-	// Calculate the bit mask for this bit
-
-	mask = (1 << (bit_number % 8));
-
-	// Set access to page 2 for the enable register
-
-	write_dio_byte(0x07,0x80);
-
-	// Get the current state of the register
-
-	temp = read_dio_byte(port);
-
-	// Temporarily clear only our enable. This clears the interrupt
-
-	temp = temp & ~mask;
-
-	// Write out the temporary value
-
-	write_dio_byte(port, temp);
-
-	temp = temp | mask;
-
-	write_dio_byte(port, temp);
-
-	// Set access back to page 0
-
-	write_dio_byte(0x07,0);
-
-	return 0;
-}
-
Index: mmio/mio_io.h
===================================================================
--- pcmmio/mio_io.h	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,213 +1,0 @@
-/* Filename : $RCSfile$
- *
- * The declarations here have to be in a header file, 
- * because they need to be known both to the kernel 
- * module (in chardev.c) and the process calling ioctl 
- * (ioctl.c)
- */
-
-/* $Id$ */
-
-#ifndef CHARDEV_H
-#define CHARDEV_H
-
-#if defined(__linux__)
-#include <linux/ioctl.h> 
-
-
-/* These are the IOCTL value the pcmmio driver recognizes */
-
-#define WRITE_DAC_DATA 		_IOWR(MAJOR_NUM, 0, int)
-
-#define READ_DAC_STATUS 	_IOWR(MAJOR_NUM, 1, int)
-
-#define WRITE_DAC_COMMAND 	_IOWR(MAJOR_NUM, 2, int)
-
-#define WRITE_ADC_COMMAND	_IOWR(MAJOR_NUM, 3, int)
-
-#define READ_ADC_DATA 		_IOWR(MAJOR_NUM, 4, int)
-
-#define READ_ADC_STATUS		_IOWR(MAJOR_NUM, 5, int)
-
-#define WRITE_DIO_BYTE 		_IOWR(MAJOR_NUM, 6, int)
-
-#define READ_DIO_BYTE 		_IOWR(MAJOR_NUM, 7, int)
-
-#define MIO_WRITE_REG 		_IOWR(MAJOR_NUM, 8, int)
-
-#define MIO_READ_REG 		_IOWR(MAJOR_NUM, 9, int)
-
-#define WAIT_A2D_INT_1 		_IOWR(MAJOR_NUM, 10, int)
-
-#define WAIT_A2D_INT_2 		_IOWR(MAJOR_NUM, 11, int)
-
-#define WAIT_DAC_INT_1 		_IOWR(MAJOR_NUM, 12, int)
-
-#define WAIT_DAC_INT_2 		_IOWR(MAJOR_NUM, 13, int)
-
-#define WAIT_DIO_INT 		_IOWR(MAJOR_NUM, 14, int)
-
-#define READ_IRQ_ASSIGNED	_IOWR(MAJOR_NUM, 15, int)
-
-#define DIO_GET_INT			_IOWR(MAJOR_NUM, 16, int)
-
-
-/* The name of the device file */
-
-#define DEVICE_FILE_NAME "pcmmio"
-
-#endif
-
-#endif
-
-/* These are the error codes for mio_error_code */
-
-#define MIO_SUCCESS 0
-#define MIO_OPEN_ERROR 1
-#define MIO_TIMEOUT_ERROR 2
-#define MIO_BAD_CHANNEL_NUMBER 3
-#define MIO_BAD_MODE_NUMBER 4
-#define MIO_BAD_RANGE 5
-#define MIO_COMMAND_WRITE_FAILURE 6
-#define MIO_READ_DATA_FAILURE 7
-#define MIO_MISSING_IRQ 8
-#define MIO_ILLEGAL_VOLTAGE 9
-
-
-/* These are DAC specific defines */
-
-#define DAC_BUSY 0x80
-
-#define DAC_SPAN_UNI5  0
-#define DAC_SPAN_UNI10 1
-#define DAC_SPAN_BI5   2
-#define DAC_SPAN_BI10  3
-#define DAC_SPAN_BI2   4
-#define DAC_SPAN_BI7   5
-
-/* These are ADC specific defines */
-
-#define	ADC_SINGLE_ENDED 0x80
-#define ADC_DIFFERENTIAL 0x00
-
-#define ADC_UNIPOLAR  0x08
-#define ADC_BIPOLAR   0x00
-
-#define ADC_TOP_5V	  0x00
-#define ADC_TOP_10V	  0x04
-
-#define ADC_CH0_SELECT 0x00
-#define ADC_CH1_SELECT 0x40
-#define ADC_CH2_SELECT 0x10
-#define ADC_CH3_SELECT 0x50
-#define ADC_CH4_SELECT 0x20
-#define ADC_CH5_SELECT 0x60
-#define ADC_CH6_SELECT 0x30
-#define ADC_CH7_SELECT 0x70
-
-/* These are DIO specific defines */
-
-#define FALLING 1
-#define RISING  0
-
-#ifdef LIB_DEFINED
-
-/* These are used by the library functions */
-
-int mio_error_code;
-char mio_error_string[128];
-float adc_bitval[16] = {.00, .00, .00, .00, .00, .00, 00, .00,
-		        .00, .00, .00, .00, .00, .00, .00, .00 };
-
-unsigned short adc_adjust[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
-
-float adc_offset[16] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
-			 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
-
-#else
-
-
-/* The rest of this file is made up of global variables available to application
-   code and the function prototypes for all available functions
-*/
-
-
-extern int mio_error_code;
-extern char mio_error_string[128];
-extern float adc_bitval[16];
-
-extern unsigned short adc_adjust[16];
-
-extern float adc_offset[16];
-
-#endif
-
-#include <sys/types.h>
-
-/* part of the porting layer */
-int check_handle(void);
-int mio_read_irq_assigned(void);
-
-int disable_dio_interrupt(void);
-int enable_dio_interrupt(void);
-int disable_dac_interrupt(int dac_num);
-int enable_dac_interrupt(int dac_num);
-int disable_adc_interrupt(int adc_num);
-int enable_adc_interrupt(int adc_num);
-int set_dac_span(int channel, unsigned char span_value);
-int wait_dac_ready(int channel);
-int set_dac_output(int channel, unsigned short dac_value);
-int set_dac_voltage(int channel, float voltage);
-unsigned char read_dio_byte(int offset);
-unsigned char mio_read_reg(int offset);
-int mio_write_reg(int offset, unsigned char value);
-int write_dio_byte(int offset, unsigned char value);
-int write_dac_command(int dac_num,unsigned char value);
-int adc_start_conversion(int channel);
-float adc_get_channel_voltage(int channel);
-int adc_convert_all_channels(unsigned short *buffer);
-float adc_convert_to_volts(int channel, unsigned short value);
-int adc_convert_single_repeated(int channel, unsigned short count, unsigned short *buffer);
-int adc_buffered_channel_conversions(unsigned char *input_channel_buffer,unsigned short *buffer);
-int adc_wait_ready(int channel);
-int write_adc_command(int adc_num,unsigned char value);
-int buffered_dac_output(unsigned char *cmd_buff,unsigned short *data_buff);
-int write_dac_data(int dac_num, unsigned short value);
-unsigned char dac_read_status(int dac_num);
-unsigned char adc_read_status(int adc_num);
-int adc_set_channel_mode(int channel, int input_mode,int duplex,int range);
-unsigned short adc_read_conversion_data(int channel);
-float adc_auto_get_channel_voltage(int channel);
-int dio_read_bit(int bit_number);
-int dio_write_bit(int bit_number, int val);
-int dio_set_bit(int bit_number);
-int dio_clr_bit(int bit_number);
-int dio_enab_bit_int(int bit_number, int polarity);
-int dio_disab_bit_int(int bit_number);
-int dio_clr_int(int bit_number);
-int dio_get_int(void);
-int dio_get_int_with_timestamp(
-  struct timespec *timestamp
-);
-int wait_adc_int(int adc_num);
-int wait_dac_int(int dac_num);
-int wait_dio_int(void);
-
-#if defined(__rtems__)
-
-  void pcmmio_initialize(
-    unsigned short _base_port,
-    unsigned short _irq
-  );
-
-  void flush_buffered_ints(void);
-  int wait_adc_int_with_timeout(int adc_num, int milliseconds);
-  int wait_dac_int_with_timeout(int dac_num, int milliseconds);
-  int wait_dio_int_with_timeout(int milliseconds);
-  int wait_dio_int_with_timestamp(
-    int              milliseconds,
-    struct timespec *timestamp
-  );
-  int dio_get_missed_interrupts(void);
-#endif
-
Index: mmio/mio_io_linux.c
===================================================================
--- pcmmio/mio_io_linux.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,405 +1,0 @@
-/* mio_io.c
- * WinSystems support module file for the  PCM-MIO Linux driver
- *
- *
- *  $Id$
- *
- *
- *  This file implements all of the supported 'C' language functions.
- *  Where necessary ioctl calls are made into the kernel driver to access
- *  the actual hardware.
- */
-
-/* #define DEBUG 1 */
-
-#include "mio_io.h"    
-
-#include <stdio.h>
-#include <fcntl.h>      /* open */ 
-#include <unistd.h>     /* exit */
-#include <sys/ioctl.h>  /* ioctl */
-
-/**************************************************************************
-*
-*		USER LIBRARY FUNCTIONS
-*
-***************************************************************************
-*/
-
-int handle = 0;
-char *device_id ="pcmmio";
-char *dev_id    = "/dev/pcmmio";
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		MIO_READ_IRQ_ASSIGNED
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int mio_read_irq_assigned(void)
-{
-unsigned char val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-
-	/* All of our programming of the hardware is handled at this level so that 
-	   all of the routines that need to shove and IRQ value into hardware will 
-	   use this call.
-   */
-
-    val = ioctl(handle,READ_IRQ_ASSIGNED,NULL);
-
-	return val & 0xff;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		READ_DIO_BYTE
-//
-//////////////////////////////////////////////////////////////////////////////
-
-unsigned char read_dio_byte(int offset)
-{
-int val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	/* All bit operations are handled at this level so we need only
-	read and write bytes from the actual hardware using the driver
-	to handle our ioctl call for it.
-	*/
-
-    val = ioctl(handle,READ_DIO_BYTE,offset);
-
-	return (unsigned char) (val & 0xff);;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		MIO_READ_REG
-//
-//////////////////////////////////////////////////////////////////////////////
-
-unsigned char mio_read_reg(int offset)
-{
-int val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-
-	/* This is a catchall register read routine that allows reading of
-	   ANY of the registers on the PCM-MIO. It is used primarily for
-	   retreiving control and access values in the hardware.
-   */
-
-     val = ioctl(handle,MIO_READ_REG,offset);
-
-	return (unsigned char) (val & 0xff);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		MIO_WRITE_REG
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int mio_write_reg(int offset, unsigned char value)
-{
-unsigned short param;
-int val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	param = offset & 0xff;
-
-	param = param | (value << 8);
-    
-	/* This function like the previous allow unlimited
-	   write access to ALL of the registers on the PCM-MIO
-   */
-
-	val = ioctl(handle,MIO_WRITE_REG,param);
-	
-	return 0;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		WRITE_DIO_BYTE
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int write_dio_byte(int offset, unsigned char value)
-{
-unsigned short param;
-int val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	param = offset & 0xff;
-
-	param = param | (value << 8);
-    
-	/* All bit operations for the DIO are handled at this level
-	   and we need the driver to allow access to the actual
-	   DIO registers to update the value.
-    */
-
-	val = ioctl(handle,WRITE_DIO_BYTE,param);
-	
-	return 0;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		WRITE_DAC_COMMAND
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int write_dac_command(int dac_num,unsigned char value)
-{
-unsigned short param;
-int val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	param = dac_num & 0xff;
-
-	param = param | (value << 8);
-
-	val = ioctl(handle,WRITE_DAC_COMMAND,param);
-
-	return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		WRITE_ADC_COMMAND
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int write_adc_command(int adc_num,unsigned char value)
-{
-unsigned short param;
-int ret_val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	param = adc_num & 0xff;
-
-	param = param | (value << 8);
-
-    ret_val = ioctl(handle,WRITE_ADC_COMMAND,param);
-
-	return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		WRITE_DAC_DATA
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int write_dac_data(int dac_num, unsigned short value)
-{
-int ret_val;
-unsigned char buffer[3];
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	buffer[0] = dac_num;
-	buffer[1] = value & 0xff;
-	buffer[2] = value >> 8;
-
-    ret_val = ioctl(handle,WRITE_DAC_DATA,buffer);
-	
-	return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		DAC_READ_STATUS
-//
-//////////////////////////////////////////////////////////////////////////////
-
-unsigned char dac_read_status(int dac_num)
-{
-int ret_val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-    ret_val = ioctl(handle,READ_DAC_STATUS,dac_num);
-
-	return ret_val & 0xff;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		ADC_READ_STATUS
-//
-//////////////////////////////////////////////////////////////////////////////
-
-unsigned char adc_read_status(int adc_num)
-{
-int ret_val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-    ret_val = ioctl(handle,READ_ADC_STATUS,adc_num);
-
-	return (ret_val & 0xff);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		ADC_READ_CONVERSION_DATA
-//
-//////////////////////////////////////////////////////////////////////////////
-
-unsigned short adc_read_conversion_data(int channel)
-{
-int ret_val;
-int adc_num;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	if(channel > 7)
-		adc_num = 1;
-	else
-		adc_num = 0;
-
-    ret_val = ioctl(handle,READ_ADC_DATA,adc_num);
-	
-	return (ret_val & 0xffff);
-}
-
-
-int dio_get_int(void)
-{
-int c;
-
-    c=ioctl(handle,DIO_GET_INT,NULL);
-
-    return (c & 0xff);
-
-}
-
-
-int wait_adc_int(int adc_num)
-{
-int c;
-
-
-    if(check_handle())   /* Check for chip available */
-		return -1;
-
-	if(adc_num)
-	    c=ioctl(handle,WAIT_A2D_INT_1,NULL);
-	else
-	    c=ioctl(handle,WAIT_A2D_INT_2,NULL);
-
-
-    return (c & 0xff);
-
-}
-
-
-int wait_dac_int(int dac_num)
-{
-int c;
-
-    if(check_handle())   /* Check for chip available */
-		return -1;
-
-	if(dac_num)
-	    c=ioctl(handle,WAIT_DAC_INT_1,NULL);
-	else
-	    c=ioctl(handle,WAIT_DAC_INT_2,NULL);
-
-    return (c & 0xff);
-
-}
-
-
-int wait_dio_int(void)
-{
-int c;
-
-
-    if(check_handle())   /* Check for chip available */
-		return -1;
-
-    c=ioctl(handle,WAIT_DIO_INT,NULL);
-
-    return (c & 0xff);
-
-}
-
-
-
-int check_handle(void)
-{
-    if(handle > 0)	/* If it's already a valid handle */
-		return 0;
-
-    if(handle == -1)	/* If it's already been tried */
-	{
-		mio_error_code = MIO_OPEN_ERROR;
-		sprintf(mio_error_string,"MIO - Unable to open device PCMMIO");
-		return -1;
-	}
-
-    /* Try opening the device file, in case it hasn't been opened yet */
-
-    handle = open(device_id,0);
-
-	/* Try an alternate open at /dev */
-
-	if(handle < 0)
-		handle = open(dev_id,0);
-
-    if(handle > 0)	/* If it's now a valid handle */
-		return 0;
-
-	mio_error_code = MIO_OPEN_ERROR;
-	sprintf(mio_error_string,"MIO - Unable to open device PCMMIO");
-    handle = -1;
-	return -1;
-}
-
Index: mmio/mio_io_rtems.c
===================================================================
--- pcmmio/mio_io_rtems.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,1021 +1,0 @@
-/* mio_io.c WinSystems support module file for the  PCM-MIO RTEMS driver
- *
- *  $Id$
- *
- *  This file implements the hardware access routines as implemented for RTEMS.
- *  This is very likely close to what is required with no OS.
- */
-
-/* #define DEBUG 1 */
-
-#include "mio_io.h"    
-
-#include <stdio.h>
-#include <fcntl.h>      /* open */ 
-#include <unistd.h>     /* exit */
-#include <sys/ioctl.h>  /* ioctl */
-#include <stdlib.h>     /* for exit */
-
-#include <rtems.h>
-#include <i386_io.h>
-#include <bsp/irq.h>
-
-/*
- *  These are configured by the initialization call.
- */
-
-/* IRQ source or 0 ==> polled */
-static unsigned short irq = 0;
-/* This holds the base addresses of the board */
-static unsigned short base_port = 0;
-
-/* Function prototypes for local functions */
-static int get_buffered_int(
-  struct timespec *timestamp
-);
-static void init_io(unsigned short io_address);
-static void clr_int(int bit_number);
-static int get_int(void);
-
-int report_dio_ints(void);
-
-/* RTEMS Ids for Wait Queues */
-rtems_id wq_a2d_1;
-rtems_id wq_a2d_2;
-rtems_id wq_dac_1;
-rtems_id wq_dac_2;
-rtems_id wq_dio;
-
-/*
- *  Limits on number of buffered discrete input interrupts in
- *  the message queue.
- */
-#define MAXIMUM_BUFFERED_DISCRETE_INTERRUPTS 1024
-
-///////////////////////////////////////////////////////////////////////////////
-typedef struct {
-  struct timespec timestamp;
-  int             pin;
-} din_message_t;
-
-unsigned int pcmmio_dio_missed_interrupts;
-
-int interruptible_sleep_on(
-  rtems_id *id,
-  int       milliseconds
-);
-void wake_up_interruptible(
-  rtems_id *id
-);
-
-//
-//    MIO_READ_IRQ_ASSIGNED
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int mio_read_irq_assigned(void)
-{
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  /* All of our programming of the hardware is handled at this level so that 
-     all of the routines that need to shove and IRQ value into hardware will 
-     use this call.
-  */
-
-  return (irq & 0xff);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//    READ_DIO_BYTE
-//
-//////////////////////////////////////////////////////////////////////////////
-
-unsigned char read_dio_byte(int offset)
-{
-  unsigned char byte_val;
-  unsigned char offset_val;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  /* All bit operations are handled at this level so we need only
-     read and write bytes from the actual hardware.
-  */
-
-  offset_val = offset & 0xff;
-  byte_val = inb(base_port + 0x10 + offset_val);
-  return (byte_val & 0xff);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//    MIO_READ_REG
-//
-//////////////////////////////////////////////////////////////////////////////
-
-unsigned char mio_read_reg(int offset)
-{
-  unsigned char byte_val;
-  unsigned char offset_val;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-
-  /* This is a catchall register read routine that allows reading of
-     ANY of the registers on the PCM-MIO. It is used primarily for
-     retreiving control and access values in the hardware.
-   */
-
-  offset_val = offset & 0xff;
-  byte_val = inb(base_port + offset_val);
-  return (byte_val & 0xff);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//    MIO_WRITE_REG
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int mio_write_reg(int offset, unsigned char value)
-{
-  unsigned char byte_val;
-  unsigned char offset_val;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  /* This function like the previous allow unlimited
-     write access to ALL of the registers on the PCM-MIO
-   */
-
-  offset_val = offset & 0xff;
-  byte_val = value;
-  outb(byte_val, base_port + offset_val);
-  
-  return 0;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//    WRITE_DIO_BYTE
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int write_dio_byte(int offset, unsigned char value)
-{
-  unsigned char byte_val;
-  unsigned char offset_val;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  /* All bit operations for the DIO are handled at this level
-     and we need the driver to allow access to the actual
-     DIO registers to update the value.
-  */
-
-  offset_val = offset & 0xff;
-  byte_val = value;
-  outb(byte_val, base_port + 0x10 + offset_val);
-
-  return 0;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//    WRITE_DAC_COMMAND
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int write_dac_command(int dac_num,unsigned char value)
-{
-  unsigned char  byte_val;
-  unsigned char  offset_val;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  byte_val = dac_num & 0xff;		/* This is the DAC number */
-  offset_val = value;		        /* This is the data value */
-  if (byte_val)
-    outb(offset_val,base_port + 0x0e);
-  else
-    outb(offset_val,base_port + 0x0a);
-
-  return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//    WRITE_ADC_COMMAND
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int write_adc_command(int adc_num,unsigned char value)
-{
-  unsigned char byte_val;
-  unsigned char offset_val;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  byte_val = adc_num & 0xff;		/* This is the ADC number */
-  offset_val = value;		        /* This is the data value */
-
-  if(byte_val)
-    outb(offset_val,base_port + 0x06);
-  else
-    outb(offset_val,base_port + 0x02);
-  return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//    WRITE_DAC_DATA
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int write_dac_data(int dac_num, unsigned short value)
-{
-  unsigned short word_val;
-  unsigned char byte_val;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  byte_val = dac_num;
-  word_val = value;
-
-  if(byte_val)		/* DAC 1 */
-    outw(word_val,base_port+0x0c);
-  else
-    outw(word_val,base_port+8);
-  
-  return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//    DAC_READ_STATUS
-//
-//////////////////////////////////////////////////////////////////////////////
-
-unsigned char dac_read_status(int dac_num)
-{
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  if (dac_num)
-    return inb(base_port + 0x0f);
-
-  return inb(base_port + 0x0b);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//    ADC_READ_STATUS
-//
-//////////////////////////////////////////////////////////////////////////////
-
-unsigned char adc_read_status(int adc_num)
-{
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  if (adc_num)
-    return inb(base_port + 7);
-  return inb(base_port + 3);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//    ADC_READ_CONVERSION_DATA
-//
-//////////////////////////////////////////////////////////////////////////////
-
-unsigned short adc_read_conversion_data(int channel)
-{
-  int adc_num;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  if (channel > 7)
-    adc_num = 1;
-  else
-    adc_num = 0;
-
-  if (adc_num)
-    return inw(base_port + 4);
-
-  return inw(base_port);
-}
-
-
-int dio_get_int_with_timestamp(
-  struct timespec *timestamp
-)
-{
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  return get_buffered_int(timestamp) & 0xff;
-}
-
-int dio_get_int(void)
-{
-  mio_error_code = MIO_SUCCESS;
-
-  return dio_get_int_with_timestamp(NULL);
-}
-
-int wait_adc_int_with_timeout(int adc_num, int milliseconds)
-{
-  int sc;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  if (adc_num) {
-    sc = interruptible_sleep_on(&wq_a2d_1, milliseconds);
-  } else {
-    sc = interruptible_sleep_on(&wq_a2d_2, milliseconds);
-  }
-
-  return sc;
-}
-
-int wait_adc_int(int adc_num)
-{
-  return wait_adc_int_with_timeout(adc_num, 0);
-}
-
-int wait_dac_int_with_timeout(int dac_num, int milliseconds)
-{
-  int sc;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  if (dac_num) {
-    sc = interruptible_sleep_on(&wq_dac_1, milliseconds);
-  } else {
-    sc = interruptible_sleep_on(&wq_dac_2, milliseconds);
-  }
-
-  return sc;
-}
-
-int wait_dac_int(int dac_num)
-{
-  return wait_dac_int_with_timeout(dac_num, 0);
-}
-
-int wait_dio_int_with_timestamp(
-  int              milliseconds,
-  struct timespec *timestamp
-)
-{
-  rtems_status_code  rc;
-  din_message_t      din;
-  size_t             received;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  rc = rtems_message_queue_receive(
-    wq_dio,
-    &din,
-    &received,
-    RTEMS_DEFAULT_OPTIONS,
-    RTEMS_MILLISECONDS_TO_TICKS(milliseconds)
-  );
-  if ( rc == RTEMS_UNSATISFIED ) {
-    mio_error_code = MIO_READ_DATA_FAILURE;
-    return -1;
-  }
-
-  if ( rc == RTEMS_TIMEOUT ) {
-    mio_error_code = MIO_TIMEOUT_ERROR;
-    return -1;
-  }
-
-  if ( rc != RTEMS_SUCCESSFUL ) {
-    printk( "wait_dio_int_with_timestamp - error %d\n", rc );
-    exit( 0 );
-  }
-
-  if (timestamp)
-    *timestamp = din.timestamp;
-  return din.pin;
-}
-
-int wait_dio_int_with_timeout(int milliseconds)
-{
-  return wait_dio_int_with_timestamp(milliseconds, NULL);
-}
-
-int wait_dio_int(void)
-{
-  return wait_dio_int_with_timestamp(0, NULL);
-}
-
-static int handle = 0; /* XXX move to lower */
-
-int check_handle(void)
-{
-  if (handle > 0)  /* If it's already a valid handle */
-    return 0;
-
-  if (handle == -1)  /* If it's already been tried */
-  {
-    mio_error_code = MIO_OPEN_ERROR;
-    sprintf(mio_error_string,"MIO - Unable to open device PCMMIO");
-    return -1;
-  }
-
-  /*
-   * 0  ==> not initialized
-   * 1+ ==> valid file handle, thus initialized
-   * -1 ==> already attempted to open
-   */
-  handle = 1;
-  return 0;
-
-  /* if an error happens, go here */
-  mio_error_code = MIO_OPEN_ERROR;
-  sprintf(mio_error_string,"MIO - Unable to open device PCMMIO");
-  handle = -1;
-  return -1;
-}
-
-/*
- *  RTEMS barrier create helper
- */
-void pcmmio_barrier_create(
-  rtems_name  name,
-  rtems_id   *id
-)
-{
-  rtems_status_code rc;
-
-  rc = rtems_barrier_create( name, RTEMS_BARRIER_MANUAL_RELEASE, 0, id );
-  if ( rc == RTEMS_SUCCESSFUL )
-    return;
-
- printk( "Unable to create PCMMIO Barrier\n" );
- exit(1);
-}
-
-/*
- *  RTEMS barrier create helper
- */
-void pcmmio_din_queue_create(
-  rtems_name  name,
-  rtems_id   *id
-)
-{
-  rtems_status_code rc;
-
-  rc = rtems_message_queue_create(
-    name,
-    MAXIMUM_BUFFERED_DISCRETE_INTERRUPTS,
-    sizeof(din_message_t),
-    RTEMS_DEFAULT_ATTRIBUTES,
-    id
-  );
-  if ( rc == RTEMS_SUCCESSFUL )
-    return;
-
-  printk( "Unable to create PCMMIO DIN IRQ Message Queue\n" );
-  exit(1);
-}
-
-int interruptible_sleep_on(
-  rtems_id *id,
-  int       milliseconds
-)
-{
-  rtems_status_code rc;
-
-  rc = rtems_barrier_wait(*id, RTEMS_MILLISECONDS_TO_TICKS(milliseconds));
-  if ( rc == RTEMS_SUCCESSFUL )
-    return 0;
-
-  mio_error_code = MIO_TIMEOUT_ERROR;
-  return -1;
-}
-
-void wake_up_interruptible(
-  rtems_id *id
-)
-{
-  uint32_t  unblocked;
-
-  (void) rtems_barrier_release(*id, &unblocked);
-}
-
-/*
- *  RTEMS specific interrupt handler
- */
-#include <bsp/irq.h>
-
-void common_handler(void);
-
-void pcmmio_irq_handler(
-  rtems_irq_hdl_param param
-)
-{
-  common_handler();
-}
-
-static void pcmmio_irq_disable(const rtems_irq_connect_data *irq)
-{
-  BSP_irq_disable_at_i8259s(irq->name);
-}
-static void pcmmio_irq_enable(const rtems_irq_connect_data *irq)
-{
-  BSP_irq_enable_at_i8259s(irq->name);
-}
-
-static int pcmmio_irq_is_on(const rtems_irq_connect_data *irq)
-{
-  return BSP_irq_enabled_at_i8259s( irq->name );
-}
-
-rtems_irq_connect_data pcmmio_irq = {
-  0,                            // name
-  pcmmio_irq_handler,           // handler
-  NULL,                         // parameter
-  pcmmio_irq_enable,            // enable IRQ
-  pcmmio_irq_disable,           // disable IRQ
-  pcmmio_irq_is_on,             // is IRQ enabled
-};
-
-/* from pcmmio.c - GNU/Linux driver */
-void init_io(unsigned short io_address)
-{
-  int x;
-  unsigned short port;
-
-  /* save the address for later use */
-  port = io_address + 0X10;
-
-  /* Clear all of the I/O ports. This also makes them inputs */
-  for(x=0; x < 7; x++)
-    outb(0,port+x);
-
-  /* Set page 2 access, for interrupt enables */
-  outb(0x80,port+7);
-
-  /* Clear all interrupt enables */
-  outb(0,port+8);
-  outb(0,port+9);
-  outb(0,port+0x0a);
-
-  /* Restore page 0 register access */
-  outb(0,port+7);
-}
-
-/*
- * RTEMS specific initialization routine
- */
-void pcmmio_initialize(
-  unsigned short _base_port,
-  unsigned short _irq
-)
-{
-  /* hardware configuration information */
-  base_port                    = _base_port;
-  irq                          = _irq;
-  pcmmio_dio_missed_interrupts = 0;
-
-  /* Create RTEMS Objects */
-  pcmmio_barrier_create( rtems_build_name( 'a', '2', 'd', '1' ), &wq_a2d_1 );
-  pcmmio_barrier_create( rtems_build_name( 'd', 'a', 'c', '1' ), &wq_dac_1 );
-  pcmmio_barrier_create( rtems_build_name( 'd', 'a', 'c', '2' ), &wq_dac_2 );
-  pcmmio_din_queue_create( rtems_build_name( 'd', 'i', 'o', ' ' ), &wq_dio );
-
-  if ( base_port )
-    init_io( base_port );
-
-  /* install IRQ handler */
-  if ( base_port && irq ) {
-    int status = 0;
-
-    /*
-     *  Process any pending interrupts
-     */
-
-    common_handler();
-
-    pcmmio_irq.name = irq;
-    #if defined(BSP_SHARED_HANDLER_SUPPORT)
-      printk( "PCMMIO Installing IRQ handler as shared\n" );
-      status = BSP_install_rtems_shared_irq_handler( &pcmmio_irq );
-    #else
-      printk( "PCMMIO Installing IRQ handler as non-shared\n" );
-      status = BSP_install_rtems_irq_handler( &pcmmio_irq );
-    #endif
-    if ( !status ) {
-      printk("Error installing PCMMIO interrupt handler! status=%d\n", status );
-    }
-  }
-}
-
-/*
- *  From this point down, we should be able to share easily with the Linux
- *  driver but I haven't gone to the trouble to do surgery on it.  I have
- *  no way to test it.
- */
-
-/* real copy is in mio_io.c */
-extern unsigned char adc2_port_image;
-
-/* This is the common interrupt handler. It is called by the
- * actual hardware ISR.
- */
-
-void common_handler(void)
-{
-  unsigned char status;
-#if 0
-  unsigned char int_num;
-#endif
-
-  /* Read the interrupt ID register from ADC2 */
-  adc2_port_image = adc2_port_image | 0x20;
-  outb(adc2_port_image,base_port + 0x0f);
-
-  status = inb(base_port + 0x0f);
-#if !defined(PCMMIO_DISABLE_ADC_IRQ)
-  if (status & 1) {
-    /* Clear ADC1 interrupt */
-    inb(base_port+1);      /* Clear interrupt */
-
-    /* Wake up any holding processes */
-    wake_up_interruptible(&wq_a2d_1);
-  }
-
-  if (status & 2) {
-    /* Clear ADC1 interrupt */
-    inb(base_port+5);      /* Clear interrupt */
-
-    /* Wake up anybody waiting for ADC1 */
-    wake_up_interruptible(&wq_a2d_2);
-  }
-
-  if (status & 4) {
-    /* Clear DAC1 interrupt */
-    inb(base_port+9);    /* Clear interrupt */
-
-    /* Wake up if you're waiting on DAC1 */
-    wake_up_interruptible(&wq_dac_1);
-  }
-#endif
-
-  if (status & 8) {
-
-#if 1
-    report_dio_ints();
-#else
-    /* DIO interrupt. Find out which bit */
-    int_num = get_int();
-    if (int_num) {
-      rtems_status_code  rc;
-      din_message_t      din;
-
-      rtems_clock_get_uptime( &din.timestamp );
-      din.pin = int_num; 
-
-      rc = rtems_message_queue_send( wq_dio, &din, sizeof(din_message_t) );
-      if ( rc != RTEMS_SUCCESSFUL ) {
-        pcmmio_dio_missed_interrupts++;
-        #ifdef DEBUG
-          printk("<1>Missed DIO interrupt\n" );
-        #endif
-     }
-     #ifdef DEBUG
-       printk("<1>Buffering DIO interrupt on bit %d\n",int_num);
-     #endif
-
-      /* Clear the interrupt */
-      clr_int(int_num);
-    }
-#endif
-  }
-
-  if (status & 0x10) {
-    /* Clear DAC2 Interrupt */
-    inb(base_port+0x0d);    /* Clear interrupt */
-
-    /* Wake up DAC2 holding processes */
-    wake_up_interruptible(&wq_dac_2);
-  }
-
-  /* Reset the access to the interrupt ID register */
-  adc2_port_image = adc2_port_image & 0xdf;
-  outb(adc2_port_image,base_port+0x0f);
-}
-
-
-void clr_int(int bit_number)
-{
-  unsigned short port;
-  unsigned short temp;
-  unsigned short mask;
-  unsigned short dio_port;
-
-  dio_port = base_port + 0x10;
-
-  /* Also adjust bit number */
-  --bit_number;
-
-  /* Calculate the I/O address based upon bit number */
-  port = (bit_number / 8) + dio_port + 8;
-
-  /* Calculate a bit mask based upon the specified bit number */
-  mask = (1 << (bit_number % 8));
-
-  /* Turn on page 2 access */
-  outb(0x80,dio_port+7);
-
-  /* Get the current state of the interrupt enable register */
-  temp = inb(port);
-
-  /* Temporarily clear only our enable. This clears the interrupt */
-  temp = temp & ~mask;    /* Clear the enable for this bit */
-
-  /* Now update the interrupt enable register */
-  outb(temp,port);
-
-  /* Re-enable our interrupt bit */
-  temp = temp | mask;
-  outb(temp,port);
-
-  /* Set access back to page 0 */
-  outb(0x00,dio_port+7);
-}
-
-int get_int(void)
-{
-  int temp;
-  int x;
-  unsigned short dio_port;
-
-  dio_port = base_port + 0x10;
-
-  /* Read the master interrupt pending register,
-           mask off undefined bits */
-  temp = inb(dio_port+6) & 0x07;
-
-  /* If there are no pending interrupts, return 0 */
-  if ((temp & 7) == 0)
-    return 0;
-
-  /* There is something pending, now we need to identify it */
-
-  /* Set access to page 3 for interrupt id register */
-  outb(0xc0, dio_port + 7);
-
-  /* Read the interrupt ID register for port 0 */
-  temp = inb(dio_port+8);
-
-  /* See if any bit set, if so return the bit number */
-  if (temp != 0) {
-    for (x=0; x<=7; x++) {
-      if (temp & (1 << x)) {
-        outb(0,dio_port+7);
-        return(x+1);
-       }
-    }
-  }
-
-  /* None in port 0, read port 1 interrupt ID register */
-  temp = inb(dio_port+9);
-
-  /* See if any bit set, if so return the bit number */
-  if (temp != 0) {
-    for (x=0; x<=7; x++) {
-      if (temp & (1 << x)) {
-        outb(0,dio_port+7);
-        return(x+9);
-      }
-    }
-  }
-
-  /* Lastly, read the status of port 2 interrupt ID register */
-  temp = inb(dio_port+0x0a);
-
-  /* If any pending, return the appropriate bit number */
-  if (temp != 0) {
-    for (x=0; x<=7; x++) {
-      if (temp & (1 << x)) {
-         outb(0,dio_port+7);
-         return(x+17);
-      }
-    }
-  }
-
-  /* We should never get here unless the hardware is seriously
-     misbehaving, but just to be sure, we'll turn the page access
-     back to 0 and return a 0 for no interrupt found
-  */
-  outb(0,dio_port+7);
-  return 0;
-}
-
-void report_dio_interrupt(
-  din_message_t   *din,
-  int              pin
-)
-{
-  rtems_status_code  rc;
-
-  din->pin = pin; 
-
-  rc = rtems_message_queue_send( wq_dio, &din, sizeof(din_message_t) );
-  if ( rc != RTEMS_SUCCESSFUL ) {
-    pcmmio_dio_missed_interrupts++;
-    #ifdef DEBUG
-      printk("<1>Missed DIO interrupt\n" );
-    #endif
- }
- #ifdef DEBUG
-   printk("<1>Buffering DIO interrupt on bit %d\n",int_num);
- #endif
-
-  /* Clear the interrupt */
-  clr_int(pin);
-}
-
-int report_dio_ints(void)
-{
-  int                temp;
-  int                x;
-  unsigned short     dio_port;
-  din_message_t      din;
-  bool               found = false;
-
-  rtems_clock_get_uptime( &din.timestamp );
-  /* din.pin set in report_dio_interrupts() */
-
-  dio_port = base_port + 0x10;
-
-  /* Read the master interrupt pending register,
-           mask off undefined bits */
-  temp = inb(dio_port+6) & 0x07;
-
-  /* If there are no pending interrupts, return 0 */
-  if ((temp & 7) == 0)
-    return 0;
-
-  /* There is something pending, now we need to identify it */
-
-  /* Set access to page 3 for interrupt id register */
-  outb(0xc0, dio_port + 7);
-
-  /* Read the interrupt ID register for port 0 */
-  temp = inb(dio_port+8);
-
-  /* See if any bit set, if so return the bit number */
-  for (x=0; temp && x<=7; x++) {
-    if (temp & (1 << x)) {
-      outb(0,dio_port+7);
-      report_dio_interrupt( &din, x+1 );
-      found = true;
-      temp &= ~(1 << x);
-    }
-  }
-
-  /* Now check port 0, read port 1 interrupt ID register */
-  temp = inb(dio_port+9);
-
-  /* See if any bit set, if so return the bit number */
-  for (x=0; temp && x<=7; x++) {
-    if (temp & (1 << x)) {
-      outb(0,dio_port+7);
-      report_dio_interrupt( &din, x+9 );
-      found = true;
-      temp &= ~(1 << x);
-    }
-  }
-
-  /* Now read the status of port 2 interrupt ID register */
-  temp = inb(dio_port+0x0a);
-
-  /* If any pending, return the appropriate bit number */
-  for (x=0; temp && x<=7; x++) {
-    if (temp & (1 << x)) {
-      outb(0,dio_port+7);
-      report_dio_interrupt( &din, x+17 );
-      temp &= ~(1 << x);
-      found = true;
-    }
-  }
-
-  /* We should never get here unless the hardware is seriously
-     misbehaving, but just to be sure, we'll turn the page access
-     back to 0 and return a 0 for no interrupt found
-  */
-  if ( !found )
-    outb(0,dio_port+7);
-  return 0;
-}
-
-void flush_buffered_ints(void)
-{
-  rtems_status_code  rc;
-  size_t             flushed;
-
-  rc = rtems_message_queue_flush( wq_dio, &flushed );
-  if ( rc != RTEMS_SUCCESSFUL ) {
-    printk( "flushed_buffered_int - error %d\n", rc );
-    exit( 0 );
-  }
-}
-
-int get_buffered_int(
-  struct timespec *timestamp
-)
-{
-  rtems_status_code  rc;
-  din_message_t      din;
-  int                line;
-  size_t             received;
-
-  if (irq == 0) {
-    line = get_int();
-    if (line)
-      clr_int(line);
-    return line;
-  }
-
-  rc = rtems_message_queue_receive(
-    wq_dio,
-    &din,
-    &received,
-    RTEMS_NO_WAIT,
-    0
-  );
-  if ( rc == RTEMS_UNSATISFIED ) {
-    mio_error_code = MIO_READ_DATA_FAILURE;
-    return 0;
-  }
-
-  if ( rc != RTEMS_SUCCESSFUL ) {
-    printk( "get_buffered_int - error %d\n", rc );
-    exit( 0 );
-  }
-
-  if (timestamp)
-    *timestamp = din.timestamp;
-  return din.pin;
-}
-
-int dio_get_missed_interrupts(void)
-{
-  int isrs;
-
-  isrs = pcmmio_dio_missed_interrupts;
-
-  pcmmio_dio_missed_interrupts = 0;
-
-  return isrs;
-}
Index: mmio/multiio_pcmmio.c
===================================================================
--- pcmmio/multiio_pcmmio.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,117 +1,0 @@
-/*
- *  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 "multiio.h"
-#include "mio_io.h"
-#include <stdint.h>
-#include <rtems.h>
-
-int rtems_multiio_initialize(void)
-{
-  /*
-   *  Initialize the PCMMIO module to use IRQ6.  Ours is jumpered for 0x300
-   *  base address.  We use discrete input interrupts so enable all of the
-   *  as edge triggered on 1.
-   */
-  pcmmio_initialize(0x300, 6);
-  enable_dio_interrupt();
-  { int i;
-    for (i=1 ; i<=48 ; i++ )
-      dio_enab_bit_int(i, 1);
-  }
-
-  return 0;
-}
-
-const char *rtems_multiio_get_name(void)
-{
-  return "Winsystems";
-}
-
-/*
- *  ADC
- */
-int rtems_adc_get_maximum(void)
-{
-  return 16;
-}
-
-float rtems_adc_get_channel_voltage(int adc)
-{
-  return adc_get_channel_voltage(adc);
-}
-
-/*
- *  DAC
- */
-int rtems_dac_get_maximum(void)
-{
-  return 8;
-}
-
-float rtems_dac_get_minimum_voltage(void)
-{
-  return -10.0;
-}
-
-float rtems_dac_get_maximum_voltage(void)
-{
-  return 10.0;
-}
-
-int rtems_set_dac_voltage(int dac, float voltage)
-{
-  set_dac_voltage(dac, voltage);
-  return 0;
-}
-
-/*
- *  Discrete Outputs
- */
-int rtems_dout_get_maximum(void)
-{
-  return 48;
-}
-
-int rtems_set_dout(int dout, int value)
-{
-  dio_write_bit(dout+1, value);
-  return 0;
-}
-
-/*
- *  Discrete Inputs
- */
-int rtems_din_get_maximum(void)
-{
-  return 48;
-}
-
-int rtems_din_get(int din)
-{
-  return dio_read_bit(din+1);
-}
-
-int rtems_din_flush_buffered_interrupts(void)
-{
-  flush_buffered_ints();
-  return 0;
-}
-
-int rtems_din_wait_interrupt_with_timestamp(
-  int                milliseconds,
-  struct timespec   *timestamp
-)
-{
-  (void) wait_dio_int_with_timestamp(milliseconds, timestamp);
-  return 0;
-}
-
Index: mmio/original/ChangeLog
===================================================================
--- pcmmio/original/ChangeLog	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,236 +1,0 @@
-2011-02-17	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* .cvsignore, main_pcmmio_adc.c, main_pcmmio_benchmark.c,
-	main_pcmmio_irq.c, pcmmio_commands.h, pcmmio_shell.c: Clean up.
-
-2011-02-17	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, main_pcmmio_adc.c, pcmmio_commands.h, pcmmio_shell.c: Add
-	set mode command. Add capability to read a single ADC. Updates from
-	Ada version.
-	* rootfs/set_adc_modes, rootfs/test_adc: New files.
-
-2011-02-17	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile: Use ${HOME}
-	* main_pcmmio_benchmark.c, main_pcmmio_irq.c: Clean up.
-	* mio_io_rtems.c: Set error code in more cases.
-
-2011-01-26	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, rtems_config.c: Add include of <unistd.h> for prototype of
-	sleep().
-
-2009-12-14	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* mio_io_rtems.c: Make internal routines static.
-
-2009-12-14	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, README, mio_io_rtems.c, pcmmio_commands.h: Add command to
-	benchmark discrete input including message queue send and receive.
-	* main_pcmmio_benchmark.c: New file.
-
-2009-12-11	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* mio_io_rtems.c: Ensure mio_error_code is properly initialized to
-	MIO_SUCCESS.
-
-2009-12-11	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* main_pcmmio_din.c, main_pcmmio_irq.c, pcmmio_shell.c: Report time
-	between discrete in interrupts in microseconds.
-
-2009-12-11	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* README: Add section on RTEMS Configuration needed by driver.
-	* mio_io_rtems.c: Switch to using a message queue for transmitting
-	discrete interrupt changes to the task level.
-	* pcmmio_shell.c: Modify application configuration to take into
-	account one less barrier and the new message queue.
-
-2009-12-11	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* README: Add list of new methods.
-	* mio_io.h, mio_io_rtems.c: Add dio_get_missed_interrupts() with
-	no tracking of missed interrupts since will switch to message queues.
-
-2009-10-21	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* main_pcmmio_din.c, main_pcmmio_irq.c: Adjust bit numbering
-	difference.
-
-2009-10-13	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* main_pcmmio_dac.c: Fix help message.
-
-2009-08-13	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* main_pcmmio_dout.c: Fix mismatch in numbering between our view of
-	0-47 and driver's 1-48 view.
-
-2009-08-13	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* main_pcmmio_irq.c, mio_io.h, mio_io_rtems.c: Add ADCs confirmed to
-	work using the dac command. Both single voltages and a pattern were
-	written.
-
-2009-08-12	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, README, main_pcmmio_adc.c, main_pcmmio_dac.c,
-	main_pcmmio_din.c, main_pcmmio_dout.c, mio_io_rtems.c,
-	pcmmio_shell.c: Discrete input polled and interrupt now works.
-
-2009-07-23	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* main_pcmmio_irq.c: Add code to report interrupts.
-
-2009-07-23	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* main_pcmmio_adc.c, main_pcmmio_dac.c, main_pcmmio_din.c,
-	main_pcmmio_dout.c, main_pcmmio_irq.c: Update checks of return status
-	from rtems_string_to_XXX to reflect change to rtems_status_code.
-
-2009-07-22	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, README, main_pcmmio_dac.c, mio_io.h, mio_io_rtems.c,
-	pcmmio_commands.h, pcmmio_shell.c, rtems_config.c: Add pcmmio_irq
-	command and do some cleanup as noticed on other files.
-	* main_pcmmio_irq.c: New file.
-
-2009-07-22	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* README: Fix typo.
-
-2009-07-22	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* README, main_pcmmio_dac.c, rtems_config.c: Add mode to pcmmio_dac
-	command where it can write a pattern.
-
-2009-07-22	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* README, main_pcmmio_adc.c, main_pcmmio_dac.c, main_pcmmio_din.c,
-	main_pcmmio_dout.c, pcmmio_commands.h: Switch to rtems/string2.h
-	methods. Verify negative voltages are allowed as input.
-
-2009-07-21	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, README, main_pcmmio_dac.c, main_pcmmio_dout.c: Added
-	string2XXX routines to RTEMS so we have ability to do heavy error
-	checking on numeric inputs.
-
-2009-07-21	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, README, mio_io.h, pcmmio_commands.h: Add pcmmio_dac
-	command.
-	* main_pcmmio_dac.c: New file.
-
-2009-07-20	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, README, main_pcmmio_din.c, main_pcmmio_dout.c,
-	pcmmio_commands.h: Add initial command to monitor analog inputs.
-	Clean up help and usage.
-	* main_pcmmio_adc.c: New file.
-
-2009-07-20	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* README: Add description of commands.
-	* main_pcmmio_din.c, main_pcmmio_dout.c: Fix usage.
-
-2009-07-20	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, main_pcmmio_din.c, pcmmio_commands.h, pcmmio_shell.c: Add
-	dout command.
-	* main_pcmmio_dout.c: New file.
-
-2009-07-20	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile: Put each command in its own file.
-	* main_pcmmio_din.c: New file.
-	* pcmmio_commands.c: Removed.
-
-2009-07-20	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* pcmmio_commands.c: Clean up command.
-
-2009-07-17	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile: Add dependencies so .exe's are relinked.
-	* mio_io.c: Typo.
-	* pcmmio_commands.c: Basic shell of command works.
-
-2009-07-17	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile: Shell appplication configured with a dummy pcmmio command.
-	* pcmmio_commands.c, pcmmio_commands.h, pcmmio_shell.c: New files.
-
-2009-07-16	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, rtems_config.c: Simple RTEMS Application runs polled. Does
-	not report errors and reports all zeroes on input discretes.
-
-2009-07-10	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* rtems_config.c: Bump POSIX threads.
-
-2009-06-17	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Status: New file.
-
-2009-06-17	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* buffered.c, dacbuff.c, dacout.c, flash.c, getall.c, getvolt.c,
-	kbhit.c, mio_io.c, mio_io_linux.c, mio_io_rtems.c, pcmmio.c, poll.c,
-	repeat.c, rtems_config.c: Clean up. Worked on RTEMS IRQ support code.
-
-2009-06-10	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* mio_io.h, mio_io_rtems.c: Add timestamps to buffered interrupts.
-	* rtems_config.c: Switch to POSIX Initialization thread and up
-	configured pthreads so application can create one.
-
-2009-06-10	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* rtems_config.c: Needs 4 barriers.
-
-2009-06-10	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* README: Document state of the driver.
-	* mio_io.h, mio_io_rtems.c: Move to shared interrupts when possible.
-	* rtems_config.c: Implement the RTEMS configuration and initialization.
-
-2009-06-10	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* mio_io_rtems.c: Initial interrupt support added. Should now be on
-	functional parity with Linux driver but not debugged.
-
-2009-06-10	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* mio_io_rtems.c: All Linux functionality should be implemented now
-	EXCEPT hooking the interrupt.
-
-2009-06-10	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* mio_io_rtems.c: Add checking for interrupt status.
-
-2009-06-08	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, flash.c, mio_io.h: All programs now compile with the copied
-	RTEMS specific porting layer file.
-	* .cvsignore, mio_io_rtems.c: New files.
-
-2009-06-08	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, mio_io.c, mio_io.h: Linux code split to porting file.
-	* mio_io_linux.c: New file.
-
-2009-06-08	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* Makefile, kbhit.c, mio_io.c, mio_io.h: First successful compilation
-	under RTEMS. Added some Linux ifdef's.
-	* rtems_config.c: New file.
-
-2009-06-08	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* ChangeLog, Makefile.linux, README: New files.
-
Index: pcmmio/original/Makefile
===================================================================
--- pcmmio/original/Makefile	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ pcmmio/original/Makefile	(revision 2bae2aa487be5c21a8eac5de5ba3c19d73b1651c)
@@ -1,61 +1,68 @@
+# $Header$
 #
-#  $Id$
+# $Id$
+#
+# $Log$
 #
 
-RTEMS_MAKEFILE_PATH=${HOME}/centaur/install/i386-rtems4.10/pc386/
-#
-#  RTEMS_MAKEFILE_PATH is typically set in an environment variable
-#
+MAJOR = 115
 
-#MAINS= buffered.c dacbuff.c dacout.c flash.c getall.c getvolt.c \
-#  poll.c repeat.c simple_rtems.c pcmmio_shell.c
+CFLAGS += -DMAJOR_NUM=$(MAJOR)
 
-MAINS= pcmmio_shell.c
+# Test Makefile
 
-PGMS=$(MAINS:%.c=${ARCH}/%.exe)
+ifneq ($(KERNELRELEASE),)
+	obj-m := pcmmio.o
+else
+	KERNELDIR ?= /lib/modules/$(shell uname -r)/build
+	PWD := $(shell pwd)
 
-# optional managers required
-MANAGERS=all
-#DEFINES += -DTESTING
+default:
+	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
+endif
 
-# C source names
-#SHARED_CSRCS += mio_io_linux.c
-SHARED_CSRCS = mio_io.c kbhit.c 
-SHARED_CSRCS += main_pcmmio_adc_mode.c
-SHARED_CSRCS += main_pcmmio_din.c main_pcmmio_dout.c
-SHARED_CSRCS += main_pcmmio_adc.c main_pcmmio_dac.c
-SHARED_CSRCS += main_pcmmio_irq.c
-SHARED_CSRCS += main_pcmmio_benchmark.c
-SHARED_CSRCS += mio_io_rtems.c
-SHARED_CSRCS += FilesystemImage.c
+mio_io.o: mio_io.c mio_io.h Makefile
+	gcc -c $(CFLAGS) mio_io.c
 
-SHARED_COBJS = $(SHARED_CSRCS:%.c=${ARCH}/%.o)
-SHARED_CONFIG = ${ARCH}/rtems_config.o
+nodes:
+	mknod pcmmio c $(MAJOR) 0
+	chmod a+rw pcmmio
 
-CLEAN_ADDITIONS += FilesystemImage FilesystemImage.c FilesystemImage.h
+all:    default nodes poll flash getvolt dacout getall repeat buffered dacbuff
 
-include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
-include $(RTEMS_CUSTOM)
-include $(PROJECT_ROOT)/make/leaf.cfg
+dacbuff: dacbuff.c mio_io.o mio_io.h Makefile kbhit.c
+	gcc $(CFLAGS) -static dacbuff.c kbhit.c mio_io.o -o dacbuff
+	chmod a+x dacbuff
+	
+buffered: buffered.c mio_io.o mio_io.h Makefile kbhit.c
+	gcc $(CFLAGS) -static buffered.c kbhit.c mio_io.o -o buffered
+	chmod a+x buffered
+	
+repeat: repeat.c mio_io.o mio_io.h Makefile kbhit.c
+	gcc $(CFLAGS) -D_REENTRANT -static repeat.c kbhit.c mio_io.o -o repeat -lpthread
+	chmod a+x repeat
 
-LDFLAGS += -g
-OBJS= $(COBJS) $(CXXOBJS) $(ASOBJS) $(SHARED_COBJS) $(SHARED_CONFIG)
+flash: flash.c mio_io.h kbhit.c mio_io.o Makefile
+	gcc $(CFLAGS) -static flash.c kbhit.c mio_io.o -o flash
+	chmod a+x flash
 
-all:    ${ARCH} FilesystemImage.c FilesystemImage.h $(OBJS) $(PGMS)
+getvolt: getvolt.c mio_io.h mio_io.o Makefile
+	gcc $(CFLAGS) -static getvolt.c mio_io.o -o getvolt
+	chmod a+x getvolt
 
-${ARCH}/pcmmio_shell.exe: pcmmio_shell.c $(OBJS)
-	$(CC) $(LDFLAGS) -o $@ $< $(SHARED_COBJS)
+getall: getall.c mio_io.h mio_io.o Makefile
+	gcc $(CFLAGS) -static getall.c mio_io.o -o getall
+	chmod a+x getall
 
-${ARCH}/%.exe: %.c $(OBJS)
-	$(CC) $(LDFLAGS) -o $@ $< $(SHARED_COBJS) $(SHARED_CONFIG)
+dacout: dacout.c mio_io.h mio_io.o Makefile
+	gcc $(CFLAGS) -static dacout.c mio_io.o -o dacout
+	chmod a+x dacout
 
-FilesystemImage: rootfs/test_adc rootfs/set_adc_modes
-	(cd rootfs ; tar cf - --exclude=.svn \
-	  --exclude=CVS --exclude=.cvsignore .) >$(@)
+poll:  poll.c mio_io.o mio_io.h Makefile
+	gcc $(CFLAGS) -D_REENTRANT -static poll.c mio_io.o -o poll -lpthread
+	chmod a+x poll
+ 
+clean:
+	rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions pcmmio
 
-FilesystemImage.c FilesystemImage.h: FilesystemImage
-	$(PROJECT_ROOT)/bin/rtems-bin2c FilesystemImage FilesystemImage
 
-FilesystemImage.o: FilesystemImage.c
-	$(CC) $(CFLAGS) $(CPU_CFLAGS) -c $<
-
Index: mmio/original/Makefile.linux
===================================================================
--- pcmmio/original/Makefile.linux	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,71 +1,0 @@
-# $Header$
-#
-# $Id$
-#
-# $Log$
-# Revision 1.1.1.1  2009/06/08 14:52:43  joel
-# Initial import.
-#
-#
-
-MAJOR = 115
-
-CFLAGS += -DMAJOR_NUM=$(MAJOR)
-
-# Test Makefile
-
-ifneq ($(KERNELRELEASE),)
-	obj-m := pcmmio.o
-else
-	KERNELDIR ?= /lib/modules/$(shell uname -r)/build
-	PWD := $(shell pwd)
-
-default:
-	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
-endif
-
-mio_io.o: mio_io.c mio_io.h Makefile
-	gcc -c $(CFLAGS) mio_io.c
-
-nodes:
-	mknod pcmmio c $(MAJOR) 0
-	chmod a+rw pcmmio
-
-all:    default nodes poll flash getvolt dacout getall repeat buffered dacbuff
-
-dacbuff: dacbuff.c mio_io.o mio_io.h Makefile kbhit.c
-	gcc $(CFLAGS) -static dacbuff.c kbhit.c mio_io.o -o dacbuff
-	chmod a+x dacbuff
-	
-buffered: buffered.c mio_io.o mio_io.h Makefile kbhit.c
-	gcc $(CFLAGS) -static buffered.c kbhit.c mio_io.o -o buffered
-	chmod a+x buffered
-	
-repeat: repeat.c mio_io.o mio_io.h Makefile kbhit.c
-	gcc $(CFLAGS) -D_REENTRANT -static repeat.c kbhit.c mio_io.o -o repeat -lpthread
-	chmod a+x repeat
-
-flash: flash.c mio_io.h kbhit.c mio_io.o Makefile
-	gcc $(CFLAGS) -static flash.c kbhit.c mio_io.o -o flash
-	chmod a+x flash
-
-getvolt: getvolt.c mio_io.h mio_io.o Makefile
-	gcc $(CFLAGS) -static getvolt.c mio_io.o -o getvolt
-	chmod a+x getvolt
-
-getall: getall.c mio_io.h mio_io.o Makefile
-	gcc $(CFLAGS) -static getall.c mio_io.o -o getall
-	chmod a+x getall
-
-dacout: dacout.c mio_io.h mio_io.o Makefile
-	gcc $(CFLAGS) -static dacout.c mio_io.o -o dacout
-	chmod a+x dacout
-
-poll:  poll.c mio_io.o mio_io.h Makefile
-	gcc $(CFLAGS) -D_REENTRANT -static poll.c mio_io.o -o poll -lpthread
-	chmod a+x poll
- 
-clean:
-	rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions pcmmio
-
-
Index: mmio/original/README
===================================================================
--- pcmmio/original/README	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,110 +1,0 @@
-#
-#  $Id$
-#
-
-This is a port of the Winsystems Linux driver to RTEMS.
-
-In general, the goal was to minimize changes to the user level
-library and only replace Linux IO calls to the device driver
-with direct access functions. 
-
-The driver uses 4 Classic API Barriers.
-
---joel sherrill
-
-Issues
-======
-+ The library is not reentrant. The GNU/Linux version uses global variables
-  to track the state of certain variables and access to these is not protected.
-  This design flaw is carried over into the RTEMS version.
-
-+ We want to timestamp samples and the initial code did not do that.  I
-  added this.
-
-New Methods
-===========
-  void pcmmio_initialize(
-    unsigned short _base_port,
-    unsigned short _irq
-  );
-
-  void flush_buffered_ints(void);
-
-  int wait_adc_int_with_timeout(int adc_num, int milliseconds);
-
-  int wait_dac_int_with_timeout(int dac_num, int milliseconds);
-
-  int wait_dio_int_with_timeout(int milliseconds);
-
-  int wait_dio_int_with_timestamp(
-    int                 milliseconds,
-    unsigned long long *timestamp
-  );
-  int dio_get_missed_interrupts(void);
-
-RTEMS Configuration
-===================
-The driver needs:
-
-+ 3 Classic API Barriers
-+ 1 Classic API Message Queue
-  - 1024 buffers of sizeof(din_messsage_t) (should be 12 bytes)
-
-The pcmmio_shell example is probably over configured but is a
-working guide.
-
-RTEMS Shell Commands
-====================
-The following RTEMS Shell configuration aids are defined to assist in
-adding PCMMIO related commands to your shell.
-  CONFIGURE_PCMMIO_ALIASES
-  CONFIGURE_PCMMIO_COMMANDS
-
-pcmmio_din - Read Discrete Inputs
-    pcmmio_din [-i iterations] [-p period] [-v]
-    Where: maximum iterations defaults to 1
-           the period is in milliseconds and defaults to 1000
-
-pcmmio_dout - Write a Discrete Output
-    pcmmio_dout bit value
-    Where: bit must be 0-47
-           value must be 0 or 1
-
-pcmmio_adc - Read Analog Inputs
-    pcmmio_adc [-i iterations] [-p period] [-v]
-    Where: maximum iterations defaults to 1
-           the period is in milliseconds and defaults to 1000
-
-pcmmio_dac - Write Analog Output
-    pcmmio_dac dac voltage
-    pcmmio_dac dac low high step time_per_step maximum_time
-
-    Where: dac must be 0-7
-           voltages and step must be -10V to +10V
-           times are in milliseconds
-
-    First form is a single write.
-    Second form writes a pattern.
-
-pcmmio_irq - Wait for PCMMIO IRQs
-  pcmmio_irq [-i iterations] [-p period] [-v] [-d|-D DAC|-a ADC]
-
-  Where: maximum iterations defaults to 1
-         the period is in milliseconds and defaults to 1000
-         -d enables discrete input irq monitoring
-         -D DAC enables irq monitoring on the DAC channel "DAC"
-         -a ADC enables irq monitoring on the ADC channel "ADC"
-
-  You select one of the three IRQ sources to monitor.
-
-pcmmio_benchmark - Benchmark Discrete Input Interrupt Performance
-
-  pcmmio_benchmarks [-i interrupts] [-v]
-
-  Where: maximum interrupts must be >= 1
-
-Aliases
-  + adc  - alias for pcmmio_adc 
-  + dac  - alias for pcmmio_dac 
-  + din  - alias for pcmmio_din 
-  + dout - alias for pcmmio_dout 
Index: mmio/original/Status
===================================================================
--- pcmmio/original/Status	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#
-#  $Id$
-#
-
-Questions
-=========
-+ IO Base Address has to be selected and jumpered
-
-+ Interrupt is software programmed but must be selected
-
-Debug Issues
-============
-+ RTEMS specific interrupt code and initialization is the main
-  area of risk in this driver.  The rest of the code is massaged
-  versions of the GNU/Linux driver.
-
Index: pcmmio/original/buffered.c
===================================================================
--- pcmmio/original/buffered.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ pcmmio/original/buffered.c	(revision 2bae2aa487be5c21a8eac5de5ba3c19d73b1651c)
@@ -3,15 +3,21 @@
 /*
 *
+* $Header$
+*
 * $Id$
 *
-* Compile for GNU/Linux with:
+* $Log$
 *
-*   gcc buffered.c kbhit.c mio_io.o -o buffered -lpthread
+*	Compile with :
+*
+*		gcc buffered.c kbhit.c mio_io.o -o buffered -lpthread
 *
 *
-*  This program demonstrates the adc_buffered_channel_conversions function
-*  which allows for a programmed sequence of conversions to be accomplished
-*  with a single call.
+*	This program demonstrates the adc_buffered_channel_conversions function
+*	which allows for a programmed sequence of conversions to be accomplished
+*	with a single call.
+*
 */
+
 
 /* Our IOCTL definitions and all function prototypes */
Index: pcmmio/original/dacbuff.c
===================================================================
--- pcmmio/original/dacbuff.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ pcmmio/original/dacbuff.c	(revision 2bae2aa487be5c21a8eac5de5ba3c19d73b1651c)
@@ -3,16 +3,21 @@
 /*
 *
+* $Header$
+*
 * $Id$
 *
+* $Log$
 *
-* Compile for GNU/Linux with:
+*	Compile with :
 *
-*     gcc dacbuff.c kbhit.c mio_io.o -o dacbuff
+*		gcc dacbuff.c kbhit.c mio_io.o -o dacbuff
 *
 *
-* This program demonstrates the adc_buffered_channel_conversions function
-* which allows for a programmed sequence of conversions to be accomplished
-* with a single call.
+*	This program demonstrates the adc_buffered_channel_conversions function
+*	which allows for a programmed sequence of conversions to be accomplished
+*	with a single call.
+*
 */
+
 
 #include "mio_io.h"    
Index: pcmmio/original/dacout.c
===================================================================
--- pcmmio/original/dacout.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ pcmmio/original/dacout.c	(revision 2bae2aa487be5c21a8eac5de5ba3c19d73b1651c)
@@ -1,13 +1,19 @@
 /* dacout.c WinSystems PCM-MIO driver Demonstration Program
+*
+*  $Header$
 *
 *  $Id$
 *
-* Compile for GNU/Linux with:
-*
-*   gcc dacout.c mio_io.o -o dacout
+*  $Log$
 *
 *
-* This extremely simple program uses the set_dac_voltage function to update
-*  the dac output to a specific voltage.
+*  Compile with :
+*
+*
+*	gcc dacout.c mio_io.o -o dacout
+*
+*
+*	This extremely simple program uses the set_dac_voltage function to update
+*   the dac output to a specific voltage.
 */
 
Index: pcmmio/original/flash.c
===================================================================
--- pcmmio/original/flash.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ pcmmio/original/flash.c	(revision 2bae2aa487be5c21a8eac5de5ba3c19d73b1651c)
@@ -1,12 +1,18 @@
 /* Flash.c WinSystems PCM-MIO driver Demonstration Program
+*
+*  $Header$
 *
 *  $Id$
 *
-*  Compile for GNU/Linux with:
+*  $Log$
 *
-*    gcc flash.c kbhit.c mio_io.o -o flash
 *
-*  This very simple program, toggles each of the 48  DIO lines in succession,
-*  holding it low for 250ms and then releasing it.
+*  Compile with :
+*
+*
+*	gcc flash.c kbhit.c mio_io.o -o flash
+*
+*   This very simple program, toggles each of the 48  DIO lines in succession, holding it low
+*   for 250ms and then releasing it.
 * 
 */
@@ -22,5 +28,4 @@
 
 #include <stdio.h>
-#include <stdlib.h>
 #include <unistd.h>
 #include "mio_io.h"
Index: pcmmio/original/getall.c
===================================================================
--- pcmmio/original/getall.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ pcmmio/original/getall.c	(revision 2bae2aa487be5c21a8eac5de5ba3c19d73b1651c)
@@ -1,11 +1,14 @@
-/* 
- * Demonstration program for use with the WinSystems PCM-MIO driver
- *
- *	$Id$
- *
- * Compile for GNU/Linux with:
- *
- *    gcc -static getall.c mio_io.o -o getall
- */
+/* getall.c Demonstration program for use with the WinSystems PCM-MIO Linux driver
+*
+*	$Header$
+*
+*	$Id$
+*
+*	$Log$
+*
+*	Compile with :
+*
+*			gcc -static getall.c mio_io.o -o getall
+*/
 
 #include <stdio.h>
@@ -13,10 +16,9 @@
 #include "mio_io.h"
 
-/* This program demonstrates usage of the adc_convert_all_channels
- * function call.  This allows for all 16 channels to be quickly converted
- * and the results passed back in an 16 element array. Note that this
- * function does not return voltage values, it returns raw 16-bit data
- * directly from the converter.
- */
+/* This program demonstrates usage of the adc_convert_all_channels function call.
+   This allows for all 16 channels to be quickly converted and the results passed
+   back in an 16 element array. Note that this function does not return voltage values,
+   it returns raw 16-bit data directly from the converter.
+*/
 
 
Index: pcmmio/original/getvolt.c
===================================================================
--- pcmmio/original/getvolt.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ pcmmio/original/getvolt.c	(revision 2bae2aa487be5c21a8eac5de5ba3c19d73b1651c)
@@ -1,16 +1,22 @@
 /* getvolt.c WinSystems PCM-MIO driver Demonstration Program
- *
- *  $Id$
- *
- * Compile for GNU/Linux with:
- *
- *
- *   gcc getvolt.c mio_io.o -o getvolt
- *
- *
- * This program demonstrates the adc_auto_get_channel_voltage
- * function. It reads the voltage on the channel specified
- * prints the value and then exits.
- */
+*
+*  $Header$
+*
+*  $Id$
+*
+*  $Log$
+*
+*
+*  Compile with :
+*
+*
+*	gcc getvolt.c mio_io.o -o getvolt
+*
+*
+*	This program demonstrates the adc_auto_get_channel_voltage
+*	function. It reads the voltage on the channel specified
+*	prints the value and then exits.
+* 
+*/
 
 #include <stdio.h>
Index: pcmmio/original/kbhit.c
===================================================================
--- pcmmio/original/kbhit.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ pcmmio/original/kbhit.c	(revision 2bae2aa487be5c21a8eac5de5ba3c19d73b1651c)
@@ -1,19 +1,29 @@
-/*
- * $Id$
- */
+/* $Header$
+*
+*
+*   Filename : $RCSfile$
+*
+*   $Id$
+*
+*   $Log$
+*   Revision 1.1  2005/04/19 20:39:11  steve
+*   Initial revision
+*
+*
+*
+*/
 
 
 /* These functions are from the Wrox Press Book "Beginning Linux
- * Programming - Second Edition" by Richard Stones and Neil Matthew.
- * (C) 1996 & 1999 and are included here in compliance with the GNU
- * Public license.
- */
+   Programming - Second Edition" by Richard Stones and Neil Matthew.
+   (C) 1996 & 1999 and are included here in compliance with the GNU
+   Public license.
+
+*/
 
 #include <stdio.h>
 #include <termios.h>
-#if defined(__linux__)
-  #include <term.h>
-  #include <curses.h>
-#endif
+#include <term.h>
+#include <curses.h>
 #include <unistd.h>
 
Index: mmio/original/main_pcmmio_adc.c
===================================================================
--- pcmmio/original/main_pcmmio_adc.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,192 +1,0 @@
-/*
- *  pcmmio_adc command
- *
- *  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 "pcmmio_commands.h"
-#include "mio_io.h"
-#include <rtems/stringto.h>
-
-#define __need_getopt_newlib
-#include <getopt.h>
-
-#if defined(TESTING)
-  #define adc_get_channel_voltage(_x) (_x + 1.5)
-#endif
-
-void pcmmio_adc_read(
-  float *adc
-)
-{
-  int   input;
-  
-  for ( input=0 ; input<16 ; input++ ) {
-    adc[input] = adc_get_channel_voltage(input);
-  }
-}
-
-void pcmmio_adc_printf(
-  float *adc,
-  int    channel
-)
-{
-  struct timespec ts;
-
-  (void) rtems_clock_get_uptime( &ts );
-  printf( "%03ld:%06ld ", ts.tv_sec, ts.tv_nsec/1000 );
-
-  if ( channel == -1 ) {
-    printf(
-      "%7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f\n" 
-      "%11s%7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f\n",
-      adc[0], adc[1], adc[2], adc[3], adc[4], adc[5], adc[6], adc[7],
-      "", adc[8], adc[9], adc[10], adc[11], adc[12], adc[13], adc[14], adc[15]
-    );
-  } else {
-    printf( "%7.4f\n", adc[channel] );
-  }
-}
-
-char pcmmio_adc_usage[] =
-  "Usage: %s [-i iterations] [-p period] [-v] [channel]\n"
-  "Where: maximum iterations defaults to 1\n"
-  "       the period is in milliseconds and defaults to 1000\n";
-
-#define PRINT_USAGE() \
-   printf( pcmmio_adc_usage, argv[0] )
-
-int main_pcmmio_adc(int argc, char **argv)
-{
-  int                 milliseconds;
-  int                 maximum;
-  int                 iterations;
-  int                 channel;
-  int                 i;
-  char                ch;
-  bool                changed;
-  bool                verbose;
-  struct getopt_data  getopt_reent;
-  float               adc_last[16];
-  float               adc_current[16];
-  const  char        *s;
-
-  /*
-   * Parse arguments here
-   */
-  milliseconds = 1000;
-  maximum      = 1;
-  channel      = -1;
-  verbose      = false;
-
-  memset(&getopt_reent, 0, sizeof(getopt_data));
-  while ((ch = getopt_r(argc, argv, "i:p:v", &getopt_reent)) != -1) {
-    switch (ch) {
-      case 'i': /* maximum iterations */
-        s = getopt_reent.optarg;
-        if ( rtems_string_to_int( s, &maximum, NULL, 0 ) ) {
-          printf( "Maximum iterations (%s) is not a number\n", s );
-          PRINT_USAGE();
-          return -1;
-        }
-
-        break;
-      case 'p': /* sampling period */
-        s = getopt_reent.optarg;
-        if ( rtems_string_to_int( s, &milliseconds, NULL, 0 ) ) {
-          printf( "Sampling period (%s) is not a number\n", s );
-          PRINT_USAGE();
-          return -1;
-        }
-        if ( milliseconds == 0 ) {
-          printf( "Sampling period (%d) is 0\n", milliseconds );
-          PRINT_USAGE();
-          return -1;
-        }
-
-        break;
-      case 'v': /* verbose*/
-        verbose = true;
-        break;
-      default:
-        PRINT_USAGE();
-        return -1;
-    }
-  }
-
-  if ( maximum != 1 ) {
-    printf(
-      "Polling analog inputs for %d iterations with %d msec period\n",
-      maximum,
-      milliseconds
-    );
-  }
-
-  /*
-   *  Is there a specific ADC we are interested in?
-   */
-  i = getopt_reent.optind;
-  if ( i < argc ) {
-    if ( rtems_string_to_int( argv[i], &channel, NULL, 0 ) ) {
-      printf( "ADC (%s) is not a number\n", argv[i] );
-      return -1;
-    }
-    if ( channel < 0 || channel > 15 ) {
-      puts( "ADC number must be 0-15" );
-      return -1;
-    }
-  }
-
-  /*
-   *  Now sample in the loop
-   */
-  changed = false;
-
-  iterations = 1;
-  while (1) {
-    pcmmio_adc_read(adc_current);
-   
-    if ( iterations == 1 ) {
-      changed = true;
-    } else if ( channel == -1 ) {
-      if ( memcmp( adc_last, adc_current, sizeof(adc_current) ) )
-	changed = true;
-    } else if ( adc_last[channel] != adc_current[channel] ) {
-       changed = true;
-    } 
-
-    if ( verbose || changed ) {
-      pcmmio_adc_printf(adc_current, channel);
-      memcpy( adc_last, adc_current, sizeof(adc_current) );
-      changed = false;
-    }
-
-    if (iterations++ >= maximum )
-      break;
-
-    (void) rtems_task_wake_after( RTEMS_MILLISECONDS_TO_TICKS(milliseconds) );
-  }
-  return 0;
-}
-
-rtems_shell_cmd_t Shell_PCMMIO_ADC_Command = {
-  "pcmmio_adc",                                    /* name */
-  "Read PCMMIO Analog Inputs",                     /* usage */
-  "pcmmio",                                        /* topic */
-  main_pcmmio_adc,                                 /* command */
-  NULL,                                            /* alias */
-  NULL                                             /* next */
-};
-
-rtems_shell_alias_t Shell_PCMMIO_ADC_Alias = {
-  "pcmmio_adc",          /* command */
-  "adc"                  /* alias */
-};
-
Index: mmio/original/main_pcmmio_benchmark.c
===================================================================
--- pcmmio/original/main_pcmmio_benchmark.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,143 +1,0 @@
-/*
- *  pcmmio_irq command
- *
- *  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 "pcmmio_commands.h"
-#include "mio_io.h"
-#include <stdint.h>
-#include <rtems/stringto.h>
-#include <libcpu/cpuModel.h> /* for rdtsc */
-
-#define __need_getopt_newlib
-#include <getopt.h>
-
-char pcmmio_benchmark_usage[] =
-  "Usage: %s [-i interrupts] [-v]\n"
-  "Where: maximum interrupts must be >= 1\n";
-
-#define PRINT_USAGE() \
-   printf( pcmmio_benchmark_usage, argv[0] )
-
-/*
- *  Compute the number of TSC clicks per microsecond.
- */ 
-extern uint64_t tsc_per_microsecond(void);
-int din_timestamp_subtract( uint64_t, uint64_t );
-
-uint64_t to_usecs( uint64_t cycles )
-{
-  return din_timestamp_subtract( 1, cycles + 1 );
-}
-
-int main_pcmmio_benchmark(int argc, char **argv)
-{
-  int                 maximum;
-  int                 sc;
-  char                ch;
-  bool                verbose;
-  struct getopt_data  getopt_reent;
-  const  char        *s;
-  int                 interrupts;
-  uint64_t            timestamp;
-  uint64_t            now;
-  uint32_t            min_cycles;
-  uint32_t            max_cycles;
-  uint64_t            total_cycles;
-  uint64_t            cycles;
-
-  /*
-   * Parse arguments here
-   */
-  maximum = 1;
-  verbose = false;
-
-  memset(&getopt_reent, 0, sizeof(getopt_data));
-  while ((ch = getopt_r(argc, argv, "i:v", &getopt_reent)) != -1) {
-    switch (ch) {
-      case 'i': /* maximum interrupts */
-        s = getopt_reent.optarg;
-        if ( rtems_string_to_int( s, &maximum, NULL, 0 ) ) {
-          printf( "Maximum interrupts (%s) is not a number\n", s );
-          PRINT_USAGE();
-          return -1;
-        }
-	if ( maximum <= 0 ) {
-	  printf( "Maximum interrupts (%d) is invalid\n", maximum );
-	  PRINT_USAGE();
-          return -1;
-	}
-        break;
-      case 'v': /* verbose */
-        verbose = true;
-        break;
-      default:
-        printf( pcmmio_benchmark_usage, argv[0] );
-        return -1;
-    }
-  }
-
-  printf( "Benchmarking for DIN IRQ for %d interrupts\n", maximum );
-
-  /*
-   *  Now catch interrupts in the loop
-   */
-  interrupts   = 0;
-  min_cycles   = 0xffffffff;
-  max_cycles   = 0;
-  total_cycles = 0;
-
-  flush_buffered_ints();
-  while (1) {
-    sc = 0;
-   
-    sc = wait_dio_int_with_timestamp(0, &timestamp);
-
-    if ( sc == -1 )
-      continue;
-
-    now = rdtsc();
-
-    cycles = now - timestamp;
-    total_cycles += cycles;
-
-    if ( cycles < min_cycles ) min_cycles = cycles;
-    if ( cycles > max_cycles ) max_cycles = cycles;
-
-    interrupts++;
-
-    if (interrupts >= maximum )
-      break;
-  }
-
-  printf(
-    "Number of Interrupts:     %d\n"
-    "Total Cycles:             %lld\n"
-    "min/max/avg cycles:       %ld/%ld/%lld\n"
-    "min/max/avg microseconds: %lld/%lld/%lld\n",
-    maximum,
-    total_cycles,
-    min_cycles, max_cycles, total_cycles / maximum,
-    to_usecs( min_cycles ),
-    to_usecs( max_cycles ),
-    to_usecs( total_cycles / maximum )
-  );
-  return 0;
-}
-
-rtems_shell_cmd_t Shell_PCMMIO_Benchmark_Command = {
-  "pcmmio_benchmark",                              /* name */
-  "Benchmark PCMMIO Interrupts",                   /* usage */
-  "pcmmio",                                        /* topic */
-  main_pcmmio_benchmark,                           /* command */
-  NULL,                                            /* alias */
-  NULL                                             /* next */
-};
Index: mmio/original/main_pcmmio_dac.c
===================================================================
--- pcmmio/original/main_pcmmio_dac.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,222 +1,0 @@
-/*
- *  pcmmio_dac command
- *
- *  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$
- */
-
-#include "pcmmio_commands.h"
-#include "mio_io.h"
-#include <rtems/stringto.h>
-
-#include <stdlib.h>
-
-#if defined(TESTING)
-  #define set_dac_voltage(_dac, _voltage) \
-    /* printf( "Testing: Write %6.4f to to dac %d\n", _voltage, _dac ); */
-#endif
-
-#define VALIDATE_VOLTAGE(_v) \
-  if ( (_v) < -10.0 || (_v) > 10.0 ) { \
-    printf( "Voltage must be between -10.0V and +10.0V\n" ); \
-    fail = true; \
-  }
-
-char pcmmio_dac_usage[] =
-  "Usage: %s dac voltage\n"
-  "       %s dac low high step time_per_step maximum_time\n"
-  "\n"
-  "Where: dac must be 0-7\n"
-  "       voltages and step must be -10V to +10V\n"
-  "       times are in milliseconds\n"
-  "  First form is a single write.\n"
-  "  Second form writes a pattern.\n";
-
-#define PRINT_USAGE() \
-   printf( pcmmio_dac_usage, argv[0], argv[0] );
-
-int main_pcmmio_dac(int argc, char **argv)
-{
-  int       dac;
-  float     low_voltage;
-  float     high_voltage;
-  float     step_voltage;
-  float     current_voltage;
-  float     current_step;
-  int       step_time;
-  int       maximum_time;
-  uint32_t  step_ticks;
-  bool      fail = false;
-  int       elapsed;
-
-  /*
-   *  Verify that we have the right number of arguments.
-   */
-  if ( (argc != 3) && (argc != 7) ) {
-    printf( "Incorrect number of arguments\n" );
-    PRINT_USAGE();
-    return -1;
-  }
-
-  /*
-   *  Convert the string arguments into number values
-   */
-  if ( rtems_string_to_int( argv[1], &dac, NULL, 0 ) ) {
-    printf( "DAC (%s) is not a number\n", argv[1] );
-    fail = true;
-  }
-
-  if ( rtems_string_to_float( argv[2], &low_voltage, NULL ) ) {
-    printf( "Voltage (%s) is not a number\n", argv[2] );
-    fail = true;
-  }
-
-  /*
-   *  Validate the output dac and voltage.
-   */
-  if ( dac < 0 || dac > 7 ) {
-    puts( "DAC number must be 0-7" );
-    fail = true;
-  }
-
-  VALIDATE_VOLTAGE( low_voltage );
-
-  /*
-   *  Now do a single write to the DAC
-   */
-  if ( argc == 3 ) {
-    if ( fail ) {
-      PRINT_USAGE();
-      return -1;
-    }
-    printf( "Write %6.4f to to dac %d\n", low_voltage, dac );
-    set_dac_voltage(dac, low_voltage);
-    return 0;
-  }
-
-  /*
-   *  Finish parsing the arguments to do a pattern
-   */
-  fail = false;
-
-  if ( rtems_string_to_float( argv[3], &high_voltage, NULL ) ) {
-    printf( "Voltage (%s) is not a number\n", argv[3] );
-    fail = true;
-  }
-
-  VALIDATE_VOLTAGE( high_voltage );
-
-  if ( rtems_string_to_float( argv[4], &step_voltage, NULL ) ) {
-    printf( "Step voltage (%s) is not a number\n", argv[4] );
-    fail = true;
-  }
-
-  VALIDATE_VOLTAGE( step_voltage );
-
-  if ( step_voltage < 0.0 ) {
-    printf( "Step voltage must be greater than 0\n" );
-    fail = true;
-  }
-
-  if ( rtems_string_to_int( argv[5], &step_time, NULL, 0 ) ) {
-    printf( "Step time (%s) is not a number\n", argv[5] );
-    fail = true;
-  }
-
-  if ( rtems_string_to_int( argv[6], &maximum_time, NULL, 0 ) ) {
-    printf( "Maximum time (%s) is not a number\n", argv[6] );
-    fail = true;
-  }
-
-  if ( step_time >= maximum_time ) {
-    printf(
-      "Step time (%d) must be less than maximum time (%d)\n",
-      step_time,
-      maximum_time
-    );
-    fail = true;
-  }
-
-  if ( step_time < 0 ) {
-    printf( "Step time must be greater than 0\n" );
-    fail = true;
-  }
-
-  if ( maximum_time < 0 ) {
-    printf( "Maximum time must be greater than 0\n" );
-    fail = true;
-  }
-
-  /*
-   *  Now write the pattern to the DAC
-   */
-
-  if ( fail ) {
-    PRINT_USAGE();
-    return -1;
-  }
-
-  printf(
-    "Write %6.4f-%6.4f step=%6.4f stepTime=%d msecs dac=%d max=%d msecs\n",
-    low_voltage,
-    high_voltage,
-    step_voltage,
-    step_time,
-    dac,
-    maximum_time
-  );
-
-  elapsed         = 0;
-  step_ticks      = RTEMS_MILLISECONDS_TO_TICKS(step_time);
-  current_voltage = low_voltage;
-  current_step    = step_voltage;
-
-  if ( low_voltage > high_voltage ) 
-    current_step    *= -1.0;
-
-  while (1) {
-  
-    #if defined(TESTING)
-      printf( "%d: Write %6.4f to to dac %d\n", elapsed, current_voltage, dac );
-    #endif
-    set_dac_voltage(dac, current_voltage);
-
-    current_voltage += current_step;
-    if ( current_voltage < low_voltage ) {
-      current_step    = step_voltage;
-      current_voltage = low_voltage;
-    } else if ( current_voltage > high_voltage ) {
-      current_step    = -1.0 * step_voltage;
-      current_voltage = high_voltage;
-    }
-
-    elapsed += step_time;
-    if ( elapsed > maximum_time )
-      break;
-
-    rtems_task_wake_after( step_ticks );
-  }
-   
-  return 0;
-}
-
-rtems_shell_cmd_t Shell_PCMMIO_DAC_Command = {
-  "pcmmio_dac",                                    /* name */
-  "Write PCMMIO Analog Outputs",                   /* usage */
-  "pcmmio",                                        /* topic */
-  main_pcmmio_dac,                                 /* command */
-  NULL,                                            /* alias */
-  NULL                                             /* next */
-};
-
-rtems_shell_alias_t Shell_PCMMIO_DAC_Alias = {
-  "pcmmio_dac",          /* command */
-  "dac"                  /* alias */
-};
-
Index: mmio/original/main_pcmmio_din.c
===================================================================
--- pcmmio/original/main_pcmmio_din.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,165 +1,0 @@
-/*
- *  pcmmio_din command
- *
- *  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$
- */
-
-#include "pcmmio_commands.h"
-#include "mio_io.h"
-#include <rtems/stringto.h>
-
-#define __need_getopt_newlib
-#include <getopt.h>
-
-#if defined(TESTING)
-  #define dio_read_bit(_x) ((_x) & 1)
-#endif
-
-void pcmmio_dio_read(
-  int *dio
-)
-{
-  int   bit;
-  
-  for ( bit=0 ; bit<48 ; bit++ ) {
-    dio[bit] = dio_read_bit(bit+1);
-  }
-}
-
-void pcmmio_dio_printf(
-  int *dio
-)
-{
-  struct timespec ts;
-  int             bit;
-
-  (void) rtems_clock_get_uptime( &ts );
-  printf( "%ld:%ld ", ts.tv_sec, ts.tv_nsec );
-  for ( bit=0 ; bit<48 ; bit+=4 ) {
-     printf(
-	"%d%d%d%d%s",
-	dio[bit +  0], dio[bit +  1],
-	dio[bit +  2], dio[bit +  3],
-        ((bit == 44) ? "\n" : " " )
-    );
-  }
-}
-
-char pcmmio_din_usage[] =
-  "Usage: %s [-i iterations] [-p period] [-v]\n"
-  "Where: maximum iterations defaults to 1\n"
-  "       the period is in milliseconds and defaults to 1000\n";
-
-#define PRINT_USAGE() \
-   printf( pcmmio_din_usage, argv[0] )
-
-int main_pcmmio_din(int argc, char **argv)
-{
-  int                 milliseconds;
-  int                 maximum;
-  int                 iterations;
-  char                ch;
-  bool                changed;
-  bool                verbose;
-  struct getopt_data  getopt_reent;
-  int                 dio_last[48];
-  int                 dio_current[48];
-  const  char        *s;
-
-  /*
-   * Parse arguments here
-   */
-  milliseconds = 1000;
-  maximum = 1;
-  verbose = false;
-
-  memset(&getopt_reent, 0, sizeof(getopt_data));
-  while ((ch = getopt_r(argc, argv, "i:p:v", &getopt_reent)) != -1) {
-    switch (ch) {
-      case 'i': /* maximum iterations */
-        s = getopt_reent.optarg;
-        if ( rtems_string_to_int( s, &maximum, NULL, 0 ) ) {
-          printf( "Maximum iterations (%s) is not a number\n", s );
-          PRINT_USAGE();
-          return -1;
-        }
-
-        break;
-      case 'p': /* sampling period */
-        s = getopt_reent.optarg;
-        if ( rtems_string_to_int( s, &milliseconds, NULL, 0 ) ) {
-          printf( "Sampling period (%s) is not a number\n", s );
-          PRINT_USAGE();
-          return -1;
-        }
-        if ( milliseconds == 0 ) {
-          printf( "Sampling period (%d) is 0\n", milliseconds );
-          PRINT_USAGE();
-          return -1;
-        }
-        break;
-      case 'v': /* verbose*/
-        verbose = true;
-        break;
-      default:
-        printf( pcmmio_din_usage, argv[0] );
-        return -1;
-    }
-  }
-
-  if ( maximum != 1 )
-    printf(
-      "Polling discrete inputs for %d iterations with %d msec period\n",
-      maximum,
-      milliseconds
-    );
-
-  /*
-   *  Now sample in the loop
-   */
-  changed = false;
-
-  iterations = 1;
-  while (1) {
-    pcmmio_dio_read(dio_current);
-   
-    if ( iterations == 1 )
-      changed = true;
-    else if ( memcmp( dio_last, dio_current, sizeof(dio_current) ) )
-      changed = true;
-    
-    if ( verbose || changed ) {
-      pcmmio_dio_printf(dio_current);
-      memcpy( dio_last, dio_current, sizeof(dio_current) );
-      changed = false;
-    }
-
-    if (iterations++ >= maximum )
-      break;
-
-    (void) rtems_task_wake_after( RTEMS_MILLISECONDS_TO_TICKS(milliseconds) );
-  }
-  return 0;
-}
-
-rtems_shell_cmd_t Shell_PCMMIO_DIN_Command = {
-  "pcmmio_din",                                    /* name */
-  "Read PCMMIO Discrete Inputs",                   /* usage */
-  "pcmmio",                                        /* topic */
-  main_pcmmio_din,                                 /* command */
-  NULL,                                            /* alias */
-  NULL                                             /* next */
-};
-
-rtems_shell_alias_t Shell_PCMMIO_DIN_Alias = {
-  "pcmmio_din",          /* command */
-  "din"                  /* alias */
-};
-
Index: mmio/original/main_pcmmio_dout.c
===================================================================
--- pcmmio/original/main_pcmmio_dout.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,99 +1,0 @@
-/*
- *  pcmmio_dout command
- *
- *  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$
- */
-
-#include "pcmmio_commands.h"
-#include "mio_io.h"
-#include <rtems/stringto.h>
-
-#if defined(TESTING)
-  #define dio_write_bit(_bit, _value) \
-    printf( "Testing: Write %d to to bit %d\n", _value, _bit );
-#endif
-
-char pcmmio_dout_usage[] =
-  "Usage: %s bit value\n"
-  "Where: bit must be 0-47\n"
-  "       value must be 0 or 1\n";
-
-#define PRINT_USAGE() \
-   printf( pcmmio_dout_usage, argv[0] )
-
-int main_pcmmio_dout(int argc, char **argv)
-{
-  int    bit;
-  int    value;
-  bool   fail = false;
-
-  /*
-   *  Verify that we have the right number of arguments.
-   */
-  if ( argc != 3 ) {
-    printf( "Incorrect number of arguments\n" );
-    PRINT_USAGE();
-    return -1;
-  }
-
-  /*
-   *  Convert the string arguments into number values
-   */
-  if ( rtems_string_to_int( argv[1], &bit, NULL, 0 ) ) {
-    printf( "Bit (%s) is not a number\n", argv[1] );
-    fail = true;
-  }
-
-  if ( rtems_string_to_int(argv[2], &value, NULL, 0) ) {
-    printf( "Value (%s) is not a number\n", argv[2] );
-    fail = true;
-  }
-
-  /*
-   *  Validate the output bit and value.
-   */
-  if ( bit < 0 || bit > 47 ) {
-    printf( "Bit number must be 0-47\n" );
-    fail = true;
-  }
-
-  if ( value != 0 && value != 1 ) {
-    printf( "Value must be 0 or 1\n" );
-    fail = true;
-  }
-
-  if ( fail ) {
-    PRINT_USAGE();
-    return -1;
-  }
-
-  /*
-   *  Now write the value
-   */
-  printf( "Write %d to to bit %d\n", value, bit );
-  dio_write_bit(bit+1, value);
-
-  return 0;
-}
-
-rtems_shell_cmd_t Shell_PCMMIO_DOUT_Command = {
-  "pcmmio_dout",                                   /* name */
-  "Write PCMMIO Discrete Outputs",                 /* usage */
-  "pcmmio",                                        /* topic */
-  main_pcmmio_dout,                                /* command */
-  NULL,                                            /* alias */
-  NULL                                             /* next */
-};
-
-rtems_shell_alias_t Shell_PCMMIO_DOUT_Alias = {
-  "pcmmio_dout",         /* command */
-  "dout"                 /* alias */
-};
-
Index: mmio/original/main_pcmmio_irq.c
===================================================================
--- pcmmio/original/main_pcmmio_irq.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,263 +1,0 @@
-/*
- *  pcmmio_irq command
- *
- *  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 "pcmmio_commands.h"
-#include "mio_io.h"
-#include <rtems/stringto.h>
-#include <stdint.h>
-
-#define __need_getopt_newlib
-#include <getopt.h>
-
-char pcmmio_irq_usage[] =
-  "Usage: %s [-i iterations] [-p period] [-v] [-d|-D DAC|-a ADC]\n"
-  "Where: maximum iterations defaults to 1\n"
-  "       the period is in milliseconds and defaults to 1000\n";
-
-#define PRINT_USAGE() \
-   printf( pcmmio_irq_usage, argv[0] )
-
-/*
- *  pc386 BSP provided variables.
- */
-extern uint64_t pc586_tsc_per_tick;
-extern uint64_t pc586_nanoseconds_per_tick;
-
-/*
- *  Compute the number of TSC clicks per microsecond.
- */ 
-uint64_t tsc_per_microsecond()
-{
-  static uint64_t pcmmio_tsc_per_microsecond = 0;
-
-  if ( pcmmio_tsc_per_microsecond == 0 ) {
-    pcmmio_tsc_per_microsecond =
-      (pc586_tsc_per_tick * 1000) / pc586_nanoseconds_per_tick;
-  }
-
-  return pcmmio_tsc_per_microsecond;
-}
-
-/*
- *  Subtract two timestamps from the PCMMIO driver and convert that to 
- *  microseconds.
- */ 
-int din_timestamp_subtract(
-  uint64_t previousTimestamp,
-  uint64_t timestamp
-)
-{
-  uint64_t cycles;
-
-  if ( previousTimestamp == 0 )
-    return 0;
-
-  cycles = timestamp - previousTimestamp;
-  return (int) (cycles  / tsc_per_microsecond());
-}
-
-int main_pcmmio_irq(int argc, char **argv)
-{
-  int                 milliseconds;
-  int                 maximum;
-  int                 iterations;
-  int                 sc;
-  char                ch;
-  bool                verbose;
-  struct getopt_data  getopt_reent;
-  const  char        *s;
-  bool                do_dac = false;
-  bool                do_adc = false;
-  bool                do_din = false;
-  int                 dac = -1;
-  int                 adc = -1;
-  int                 selected;
-  const char         *irq = "";
-  int                 elapsed;
-  int                 interrupts;
-  uint64_t            previousTimestamp = 0;
-  uint64_t            timestamp;
-
-  /*
-   * Parse arguments here
-   */
-  milliseconds = 1000;
-  maximum = 1;
-  verbose = false;
-
-  memset(&getopt_reent, 0, sizeof(getopt_data));
-  while ((ch = getopt_r(argc, argv, "i:p:vdD:a:", &getopt_reent)) != -1) {
-    switch (ch) {
-      case 'i': /* maximum iterations */
-        s = getopt_reent.optarg;
-        if ( rtems_string_to_int( s, &maximum, NULL, 0 ) ) {
-          printf( "Maximum iterations (%s) is not a number\n", s );
-          PRINT_USAGE();
-          return -1;
-        }
-
-        break;
-      case 'p': /* sampling period */
-        s = getopt_reent.optarg;
-        if ( rtems_string_to_int( s, &milliseconds, NULL, 0 ) ) {
-          printf( "Sampling period (%s) is not a number\n", s );
-          PRINT_USAGE();
-          return -1;
-        }
-        if ( milliseconds == 0 ) {
-          printf( "Sampling period should not be 0\n" );
-          PRINT_USAGE();
-          return -1;
-        }
-        break;
-      case 'd': /* DIN enable */
-        do_din = true;
-        break;
-      case 'D': /* DAC enable */
-        s = getopt_reent.optarg;
-        if ( rtems_string_to_int( s, &dac, NULL, 0 ) ) {
-          printf( "DAC (%s) is not a number\n", s );
-          PRINT_USAGE();
-          return -1;
-        }
-
-	if ( dac < 0 || dac > 7 ) {
-	  puts( "DAC number must be 0-7" );
-          PRINT_USAGE();
-          return -1;
-	}
-
-        do_dac = true;
-        break;
-      case 'a': /* ADC enable */
-        s = getopt_reent.optarg;
-        if ( rtems_string_to_int( s, &adc, NULL, 0 ) ) {
-          printf( "ADC (%s) is not a number\n", s );
-          PRINT_USAGE();
-          return -1;
-        }
-
-	if ( adc < 0 || adc > 7 ) {
-	  puts( "ADC number must be 0-7" );
-          PRINT_USAGE();
-          return -1;
-	}
-        do_adc = true;
-        break;
-      case 'v': /* verbose */
-        verbose = true;
-        break;
-      default:
-        printf( pcmmio_irq_usage, argv[0] );
-        return -1;
-    }
-  }
-
-  /*
-   *  Did they select one item and ONLY one item?
-   */
-  selected = 0;
-  if ( do_din == true ) selected++;
-  if ( do_dac == true ) selected++;
-  if ( do_adc == true ) selected++;
-
-  if ( selected == 0 ) {
-    puts( "No IRQ Sources selected" );
-    return -1;
-  }
-
-  if ( selected > 1 ) {
-    puts( "More than 1 IRQ Sources selected" );
-    return -1;
-  }
-
-  /*
-   *  Set String to print for IRQ source
-   */
-  if ( do_din == true ) {
-    irq = "DIN";
-  } else if ( do_dac == true ) {
-    irq = "DAC";
-  } else if ( do_adc == true ) {
-    irq = "ADC";
-  }
-
-  /*
-   * Give some indication of what we are about to do
-   */
-  if ( maximum != 1 ) {
-    printf(
-      "Polling for %s IRQ for %d iterations with %d msec period\n",
-      irq,
-      maximum,
-      milliseconds
-    );
-  }
-
-  /*
-   *  Now sample in the loop
-   */
-  elapsed    = 0;
-  iterations = 1;
-  interrupts = 0;
-
-  flush_buffered_ints();
-  while (1) {
-    sc = 0;
-   
-    if ( do_din == true ) {
-      sc = wait_dio_int_with_timestamp(milliseconds, &timestamp);
-    } else if ( do_dac == true ) {
-      sc = wait_dac_int_with_timeout(dac, milliseconds);
-    } else if ( do_adc == true ) {
-      sc = wait_dac_int_with_timeout(adc, milliseconds);
-    }
-
-    if ( sc != -1 ) {
-      interrupts++;
-      if ( do_din == true ) {
-        printf(
-          "%d %s irq pin %d @ %llx (%d usecs since last)\n",
-          elapsed,
-          irq,
-          sc - 1,
-          timestamp,
-          din_timestamp_subtract( previousTimestamp, timestamp )
-        );
-        previousTimestamp = timestamp;
-      } else {
-        printf( "%d %s irq\n", elapsed, irq );
-      }
-    }
-
-    elapsed += milliseconds;
-    if (iterations++ >= maximum )
-      break;
-  }
-  printf(
-    "%d total interrupts from %s in %d milliseconds\n",
-    interrupts,
-    irq,
-    elapsed
-  );
-  return 0;
-}
-
-rtems_shell_cmd_t Shell_PCMMIO_IRQ_Command = {
-  "pcmmio_irq",                                    /* name */
-  "Wait for PCMMIO Interrupts",                    /* usage */
-  "pcmmio",                                        /* topic */
-  main_pcmmio_irq,                                 /* command */
-  NULL,                                            /* alias */
-  NULL                                             /* next */
-};
Index: pcmmio/original/mio_io.c
===================================================================
--- pcmmio/original/mio_io.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ pcmmio/original/mio_io.c	(revision 2bae2aa487be5c21a8eac5de5ba3c19d73b1651c)
@@ -1,11 +1,13 @@
-/* mio_io.c
- * WinSystems support module file for the PCM-MIO Linux and RTEMS drivers
- *
- *  $Id$
- *
- *  This file implements all of the supported 'C' language functions.
- *  Where necessary calls are made into a porting layer to access the
- *  actual hardware.
- */
+/* mio_io.c WinSystems support module file for the  PCM-MIO Linux driver */
+/*
+*  $Header$
+*
+*  $Id$
+*
+*  $Log$
+*
+*  This file implements all of the supported 'C' language functions. Where necessary
+*  ioctl call are made into the kernel driver to access the actual hardware.
+*/
 
 #define LIB_DEFINED
@@ -16,4 +18,7 @@
 
 #include <stdio.h>
+#include <fcntl.h>      /* open */ 
+#include <unistd.h>     /* exit */
+#include <sys/ioctl.h>  /* ioctl */
 
 /* These image variable help out where a register is not
@@ -72,4 +77,15 @@
 
 
+/**************************************************************************
+*
+*		USER LIBRARY FUNCTIONS
+*
+***************************************************************************
+*/
+
+int handle = 0;
+char *device_id ="pcmmio";
+char *dev_id    = "/dev/pcmmio";
+
 ///////////////////////////////////////////////////////////////////////////////
 //
@@ -82,5 +98,5 @@
 	mio_error_code = MIO_SUCCESS;
 
-	if(check_handle())   /* Check for chip available */
+    if(check_handle())   /* Check for chip available */
 		return -1;
 
@@ -328,4 +344,31 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
+//		MIO_READ_IRQ_ASSIGNED
+//
+//////////////////////////////////////////////////////////////////////////////
+
+int mio_read_irq_assigned(void)
+{
+unsigned char val;
+
+	mio_error_code = MIO_SUCCESS;
+
+	if(check_handle())   /* Check for chip available */
+		return -1;
+
+
+	/* All of our programming of the hardware is handled at this level so that 
+	   all of the routines that need to shove and IRQ value into hardware will 
+	   use this call.
+   */
+
+    val = ioctl(handle,READ_IRQ_ASSIGNED,NULL);
+
+	return val & 0xff;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+//
 //		SET_DAC_SPAN
 //
@@ -433,5 +476,5 @@
 int set_dac_voltage(int channel, float voltage)
 {
-unsigned short  value = 0;
+unsigned short  value;
 float bit_val;
 
@@ -501,4 +544,142 @@
 	return 0;
 }
+
+///////////////////////////////////////////////////////////////////////////////
+//
+//		READ_DIO_BYTE
+//
+//////////////////////////////////////////////////////////////////////////////
+
+unsigned char read_dio_byte(int offset)
+{
+int val;
+
+	mio_error_code = MIO_SUCCESS;
+
+	if(check_handle())   /* Check for chip available */
+		return -1;
+
+	/* All bit operations are handled at this level so we need only
+	read and write bytes from the actual hardware using the driver
+	to handle our ioctl call for it.
+	*/
+
+    val = ioctl(handle,READ_DIO_BYTE,offset);
+
+	return (unsigned char) (val & 0xff);;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+//		MIO_READ_REG
+//
+//////////////////////////////////////////////////////////////////////////////
+
+unsigned char mio_read_reg(int offset)
+{
+int val;
+
+	mio_error_code = MIO_SUCCESS;
+
+	if(check_handle())   /* Check for chip available */
+		return -1;
+
+
+	/* This is a catchall register read routine that allows reading of
+	   ANY of the registers on the PCM-MIO. It is used primarily for
+	   retreiving control and access values in the hardware.
+   */
+
+     val = ioctl(handle,MIO_READ_REG,offset);
+
+	return (unsigned char) (val & 0xff);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+//		MIO_WRITE_REG
+//
+//////////////////////////////////////////////////////////////////////////////
+
+int mio_write_reg(int offset, unsigned char value)
+{
+unsigned short param;
+int val;
+
+	mio_error_code = MIO_SUCCESS;
+
+	if(check_handle())   /* Check for chip available */
+		return -1;
+
+	param = offset & 0xff;
+
+	param = param | (value << 8);
+    
+	/* This function like the previous allow unlimited
+	   write access to ALL of the registers on the PCM-MIO
+   */
+
+	val = ioctl(handle,MIO_WRITE_REG,param);
+	
+	return 0;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+//
+//		WRITE_DIO_BYTE
+//
+//////////////////////////////////////////////////////////////////////////////
+
+int write_dio_byte(int offset, unsigned char value)
+{
+unsigned short param;
+int val;
+
+	mio_error_code = MIO_SUCCESS;
+
+	if(check_handle())   /* Check for chip available */
+		return -1;
+
+	param = offset & 0xff;
+
+	param = param | (value << 8);
+    
+	/* All bit operations for the DIO are handled at this level
+	   and we need the driver to allow access to the actual
+	   DIO registers to update the value.
+    */
+
+	val = ioctl(handle,WRITE_DIO_BYTE,param);
+	
+	return 0;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+//
+//		WRITE_DAC_COMMAND
+//
+//////////////////////////////////////////////////////////////////////////////
+
+int write_dac_command(int dac_num,unsigned char value)
+{
+unsigned short param;
+int val;
+
+	mio_error_code = MIO_SUCCESS;
+
+	if(check_handle())   /* Check for chip available */
+		return -1;
+
+	param = dac_num & 0xff;
+
+	param = param | (value << 8);
+
+	val = ioctl(handle,WRITE_DAC_COMMAND,param);
+
+	return 0;
+}
+
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -943,4 +1124,29 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
+//		WRITE_ADC_COMMAND
+//
+//////////////////////////////////////////////////////////////////////////////
+
+int write_adc_command(int adc_num,unsigned char value)
+{
+unsigned short param;
+int ret_val;
+
+	mio_error_code = MIO_SUCCESS;
+
+	if(check_handle())   /* Check for chip available */
+		return -1;
+
+	param = adc_num & 0xff;
+
+	param = param | (value << 8);
+
+    ret_val = ioctl(handle,WRITE_ADC_COMMAND,param);
+
+	return 0;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
 //		BUFFERED_DAC_OUTPUT
 //
@@ -966,4 +1172,69 @@
 		x++;
 	}
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+//		WRITE_DAC_DATA
+//
+//////////////////////////////////////////////////////////////////////////////
+
+int write_dac_data(int dac_num, unsigned short value)
+{
+int ret_val;
+unsigned char buffer[3];
+
+	mio_error_code = MIO_SUCCESS;
+
+	if(check_handle())   /* Check for chip available */
+		return -1;
+
+	buffer[0] = dac_num;
+	buffer[1] = value & 0xff;
+	buffer[2] = value >> 8;
+
+    ret_val = ioctl(handle,WRITE_DAC_DATA,buffer);
+	
+	return 0;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+//		DAC_READ_STATUS
+//
+//////////////////////////////////////////////////////////////////////////////
+
+unsigned char dac_read_status(int dac_num)
+{
+int ret_val;
+
+	mio_error_code = MIO_SUCCESS;
+
+	if(check_handle())   /* Check for chip available */
+		return -1;
+
+    ret_val = ioctl(handle,READ_DAC_STATUS,dac_num);
+
+	return ret_val & 0xff;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+//		ADC_READ_STATUS
+//
+//////////////////////////////////////////////////////////////////////////////
+
+unsigned char adc_read_status(int adc_num)
+{
+int ret_val;
+
+	mio_error_code = MIO_SUCCESS;
+
+	if(check_handle())   /* Check for chip available */
+		return -1;
+
+    ret_val = ioctl(handle,READ_ADC_STATUS,adc_num);
+
+	return (ret_val & 0xff);
 }
 
@@ -1058,4 +1329,31 @@
 }
 
+///////////////////////////////////////////////////////////////////////////////
+//
+//		ADC_READ_CONVERSION_DATA
+//
+//////////////////////////////////////////////////////////////////////////////
+
+unsigned short adc_read_conversion_data(int channel)
+{
+int ret_val;
+int adc_num;
+
+	mio_error_code = MIO_SUCCESS;
+
+	if(check_handle())   /* Check for chip available */
+		return -1;
+
+	if(channel > 7)
+		adc_num = 1;
+	else
+		adc_num = 0;
+
+    ret_val = ioctl(handle,READ_ADC_DATA,adc_num);
+	
+	return (ret_val & 0xffff);
+}
+
+
 ////////////////////////////////////////////////////////////////////////////////
 //
@@ -1496,2 +1794,96 @@
 }
 
+
+int dio_get_int(void)
+{
+int c;
+
+    c=ioctl(handle,DIO_GET_INT,NULL);
+
+    return (c & 0xff);
+
+}
+
+
+int wait_adc_int(int adc_num)
+{
+int c;
+
+
+    if(check_handle())   /* Check for chip available */
+		return -1;
+
+	if(adc_num)
+	    c=ioctl(handle,WAIT_A2D_INT_1,NULL);
+	else
+	    c=ioctl(handle,WAIT_A2D_INT_2,NULL);
+
+
+    return (c & 0xff);
+
+}
+
+
+int wait_dac_int(int dac_num)
+{
+int c;
+
+    if(check_handle())   /* Check for chip available */
+		return -1;
+
+	if(dac_num)
+	    c=ioctl(handle,WAIT_DAC_INT_1,NULL);
+	else
+	    c=ioctl(handle,WAIT_DAC_INT_2,NULL);
+
+    return (c & 0xff);
+
+}
+
+
+int wait_dio_int(void)
+{
+int c;
+
+
+    if(check_handle())   /* Check for chip available */
+		return -1;
+
+    c=ioctl(handle,WAIT_DIO_INT,NULL);
+
+    return (c & 0xff);
+
+}
+
+
+
+int check_handle(void)
+{
+    if(handle > 0)	/* If it's already a valid handle */
+		return 0;
+
+    if(handle == -1)	/* If it's already been tried */
+	{
+		mio_error_code = MIO_OPEN_ERROR;
+		sprintf(mio_error_string,"MIO - Unable to open device PCMMIO");
+		return -1;
+	}
+
+    /* Try opening the device file, in case it hasn't been opened yet */
+
+    handle = open(device_id,0);
+
+	/* Try an alternate open at /dev */
+
+	if(handle < 0)
+		handle = open(dev_id,0);
+
+    if(handle > 0)	/* If it's now a valid handle */
+		return 0;
+
+	mio_error_code = MIO_OPEN_ERROR;
+	sprintf(mio_error_string,"MIO - Unable to open device PCMMIO");
+    handle = -1;
+	return -1;
+}
+
Index: pcmmio/original/mio_io.h
===================================================================
--- pcmmio/original/mio_io.h	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ pcmmio/original/mio_io.h	(revision 2bae2aa487be5c21a8eac5de5ba3c19d73b1651c)
@@ -7,10 +7,11 @@
  */
 
-/* $Id$ */
+/* $Log$
+*
+*/
 
 #ifndef CHARDEV_H
 #define CHARDEV_H
 
-#if defined(__linux__)
 #include <linux/ioctl.h> 
 
@@ -57,9 +58,8 @@
 #define DEVICE_FILE_NAME "pcmmio"
 
+
 #endif
 
-#endif
-
-/* These are the error codes for mio_error_code */
+/* These are the error codes doe mio_error_code */
 
 #define MIO_SUCCESS 0
@@ -118,10 +118,10 @@
 char mio_error_string[128];
 float adc_bitval[16] = {.00, .00, .00, .00, .00, .00, 00, .00,
-		        .00, .00, .00, .00, .00, .00, .00, .00 };
+							   .00, .00, .00, .00, .00, .00, .00, .00 };
 
 unsigned short adc_adjust[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
 
 float adc_offset[16] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
-			 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
+						 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
 
 #else
@@ -143,7 +143,4 @@
 #endif
 
-/* part of the porting layer */
-int check_handle(void);
-int mio_read_irq_assigned(void);
 
 int disable_dio_interrupt(void);
@@ -156,4 +153,5 @@
 int wait_dac_ready(int channel);
 int set_dac_output(int channel, unsigned short dac_value);
+int set_dac_voltage(int channel, float voltage);
 int set_dac_voltage(int channel, float voltage);
 unsigned char read_dio_byte(int offset);
@@ -185,26 +183,47 @@
 int dio_clr_int(int bit_number);
 int dio_get_int(void);
-int dio_get_int_with_timestamp(
-  unsigned long long *timestamp
-);
 int wait_adc_int(int adc_num);
 int wait_dac_int(int dac_num);
 int wait_dio_int(void);
 
-#if defined(__rtems__)
-  void pcmmio_initialize(
-    unsigned short _base_port,
-    unsigned short _irq
-  );
-
-  void flush_buffered_ints(void);
-  int wait_adc_int_with_timeout(int adc_num, int milliseconds);
-  int wait_dac_int_with_timeout(int dac_num, int milliseconds);
-  int wait_dio_int_with_timeout(int milliseconds);
-  int wait_dio_int_with_timestamp(
-    int                 milliseconds,
-    unsigned long long *timestamp
-  );
-  int dio_get_missed_interrupts(void);
-#endif
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: mmio/original/mio_io_linux.c
===================================================================
--- pcmmio/original/mio_io_linux.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,405 +1,0 @@
-/* mio_io.c
- * WinSystems support module file for the  PCM-MIO Linux driver
- *
- *
- *  $Id$
- *
- *
- *  This file implements all of the supported 'C' language functions.
- *  Where necessary ioctl calls are made into the kernel driver to access
- *  the actual hardware.
- */
-
-/* #define DEBUG 1 */
-
-#include "mio_io.h"    
-
-#include <stdio.h>
-#include <fcntl.h>      /* open */ 
-#include <unistd.h>     /* exit */
-#include <sys/ioctl.h>  /* ioctl */
-
-/**************************************************************************
-*
-*		USER LIBRARY FUNCTIONS
-*
-***************************************************************************
-*/
-
-int handle = 0;
-char *device_id ="pcmmio";
-char *dev_id    = "/dev/pcmmio";
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		MIO_READ_IRQ_ASSIGNED
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int mio_read_irq_assigned(void)
-{
-unsigned char val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-
-	/* All of our programming of the hardware is handled at this level so that 
-	   all of the routines that need to shove and IRQ value into hardware will 
-	   use this call.
-   */
-
-    val = ioctl(handle,READ_IRQ_ASSIGNED,NULL);
-
-	return val & 0xff;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		READ_DIO_BYTE
-//
-//////////////////////////////////////////////////////////////////////////////
-
-unsigned char read_dio_byte(int offset)
-{
-int val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	/* All bit operations are handled at this level so we need only
-	read and write bytes from the actual hardware using the driver
-	to handle our ioctl call for it.
-	*/
-
-    val = ioctl(handle,READ_DIO_BYTE,offset);
-
-	return (unsigned char) (val & 0xff);;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		MIO_READ_REG
-//
-//////////////////////////////////////////////////////////////////////////////
-
-unsigned char mio_read_reg(int offset)
-{
-int val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-
-	/* This is a catchall register read routine that allows reading of
-	   ANY of the registers on the PCM-MIO. It is used primarily for
-	   retreiving control and access values in the hardware.
-   */
-
-     val = ioctl(handle,MIO_READ_REG,offset);
-
-	return (unsigned char) (val & 0xff);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		MIO_WRITE_REG
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int mio_write_reg(int offset, unsigned char value)
-{
-unsigned short param;
-int val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	param = offset & 0xff;
-
-	param = param | (value << 8);
-    
-	/* This function like the previous allow unlimited
-	   write access to ALL of the registers on the PCM-MIO
-   */
-
-	val = ioctl(handle,MIO_WRITE_REG,param);
-	
-	return 0;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		WRITE_DIO_BYTE
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int write_dio_byte(int offset, unsigned char value)
-{
-unsigned short param;
-int val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	param = offset & 0xff;
-
-	param = param | (value << 8);
-    
-	/* All bit operations for the DIO are handled at this level
-	   and we need the driver to allow access to the actual
-	   DIO registers to update the value.
-    */
-
-	val = ioctl(handle,WRITE_DIO_BYTE,param);
-	
-	return 0;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		WRITE_DAC_COMMAND
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int write_dac_command(int dac_num,unsigned char value)
-{
-unsigned short param;
-int val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	param = dac_num & 0xff;
-
-	param = param | (value << 8);
-
-	val = ioctl(handle,WRITE_DAC_COMMAND,param);
-
-	return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		WRITE_ADC_COMMAND
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int write_adc_command(int adc_num,unsigned char value)
-{
-unsigned short param;
-int ret_val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	param = adc_num & 0xff;
-
-	param = param | (value << 8);
-
-    ret_val = ioctl(handle,WRITE_ADC_COMMAND,param);
-
-	return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		WRITE_DAC_DATA
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int write_dac_data(int dac_num, unsigned short value)
-{
-int ret_val;
-unsigned char buffer[3];
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	buffer[0] = dac_num;
-	buffer[1] = value & 0xff;
-	buffer[2] = value >> 8;
-
-    ret_val = ioctl(handle,WRITE_DAC_DATA,buffer);
-	
-	return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		DAC_READ_STATUS
-//
-//////////////////////////////////////////////////////////////////////////////
-
-unsigned char dac_read_status(int dac_num)
-{
-int ret_val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-    ret_val = ioctl(handle,READ_DAC_STATUS,dac_num);
-
-	return ret_val & 0xff;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		ADC_READ_STATUS
-//
-//////////////////////////////////////////////////////////////////////////////
-
-unsigned char adc_read_status(int adc_num)
-{
-int ret_val;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-    ret_val = ioctl(handle,READ_ADC_STATUS,adc_num);
-
-	return (ret_val & 0xff);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//		ADC_READ_CONVERSION_DATA
-//
-//////////////////////////////////////////////////////////////////////////////
-
-unsigned short adc_read_conversion_data(int channel)
-{
-int ret_val;
-int adc_num;
-
-	mio_error_code = MIO_SUCCESS;
-
-	if(check_handle())   /* Check for chip available */
-		return -1;
-
-	if(channel > 7)
-		adc_num = 1;
-	else
-		adc_num = 0;
-
-    ret_val = ioctl(handle,READ_ADC_DATA,adc_num);
-	
-	return (ret_val & 0xffff);
-}
-
-
-int dio_get_int(void)
-{
-int c;
-
-    c=ioctl(handle,DIO_GET_INT,NULL);
-
-    return (c & 0xff);
-
-}
-
-
-int wait_adc_int(int adc_num)
-{
-int c;
-
-
-    if(check_handle())   /* Check for chip available */
-		return -1;
-
-	if(adc_num)
-	    c=ioctl(handle,WAIT_A2D_INT_1,NULL);
-	else
-	    c=ioctl(handle,WAIT_A2D_INT_2,NULL);
-
-
-    return (c & 0xff);
-
-}
-
-
-int wait_dac_int(int dac_num)
-{
-int c;
-
-    if(check_handle())   /* Check for chip available */
-		return -1;
-
-	if(dac_num)
-	    c=ioctl(handle,WAIT_DAC_INT_1,NULL);
-	else
-	    c=ioctl(handle,WAIT_DAC_INT_2,NULL);
-
-    return (c & 0xff);
-
-}
-
-
-int wait_dio_int(void)
-{
-int c;
-
-
-    if(check_handle())   /* Check for chip available */
-		return -1;
-
-    c=ioctl(handle,WAIT_DIO_INT,NULL);
-
-    return (c & 0xff);
-
-}
-
-
-
-int check_handle(void)
-{
-    if(handle > 0)	/* If it's already a valid handle */
-		return 0;
-
-    if(handle == -1)	/* If it's already been tried */
-	{
-		mio_error_code = MIO_OPEN_ERROR;
-		sprintf(mio_error_string,"MIO - Unable to open device PCMMIO");
-		return -1;
-	}
-
-    /* Try opening the device file, in case it hasn't been opened yet */
-
-    handle = open(device_id,0);
-
-	/* Try an alternate open at /dev */
-
-	if(handle < 0)
-		handle = open(dev_id,0);
-
-    if(handle > 0)	/* If it's now a valid handle */
-		return 0;
-
-	mio_error_code = MIO_OPEN_ERROR;
-	sprintf(mio_error_string,"MIO - Unable to open device PCMMIO");
-    handle = -1;
-	return -1;
-}
-
Index: mmio/original/mio_io_rtems.c
===================================================================
--- pcmmio/original/mio_io_rtems.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,906 +1,0 @@
-/* mio_io.c WinSystems support module file for the  PCM-MIO RTEMS driver
- *
- *  $Id$
- *
- *  This file implements the hardware access routines as implemented for RTEMS.
- *  This is very likely close to what is required with no OS.
- */
-
-/* #define DEBUG 1 */
-
-#include "mio_io.h"    
-
-#include <stdio.h>
-#include <fcntl.h>      /* open */ 
-#include <unistd.h>     /* exit */
-#include <sys/ioctl.h>  /* ioctl */
-#include <stdlib.h>     /* for exit */
-
-#include <rtems.h>
-#include <i386_io.h>
-#include <bsp/irq.h>
-
-/*
- *  These are configured by the initialization call.
- */
-
-/* IRQ source or 0 ==> polled */
-static unsigned short irq = 0;
-/* This holds the base addresses of the board */
-static unsigned short base_port = 0;
-
-/* Function prototypes for local functions */
-static int get_buffered_int(
-  unsigned long long *timestamp
-);
-static void init_io(unsigned short io_address);
-static void clr_int(int bit_number);
-static int get_int(void);
-
-/* RTEMS Ids for Wait Queues */
-rtems_id wq_a2d_1;
-rtems_id wq_a2d_2;
-rtems_id wq_dac_1;
-rtems_id wq_dac_2;
-rtems_id wq_dio;
-
-/*
- *  Limits on number of buffered discrete input interrupts in
- *  the message queue.
- */
-#define MAXIMUM_BUFFERED_DISCRETE_INTERRUPTS 1024
-
-///////////////////////////////////////////////////////////////////////////////
-typedef struct {
-  unsigned long long timestamp;
-  int                pin;
-} din_message_t;
-
-unsigned int pcmmio_dio_missed_interrupts;
-
-int interruptible_sleep_on(
-  rtems_id *id,
-  int       milliseconds
-);
-void wake_up_interruptible(
-  rtems_id *id
-);
-
-//
-//    MIO_READ_IRQ_ASSIGNED
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int mio_read_irq_assigned(void)
-{
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  /* All of our programming of the hardware is handled at this level so that 
-     all of the routines that need to shove and IRQ value into hardware will 
-     use this call.
-  */
-
-  return (irq & 0xff);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//    READ_DIO_BYTE
-//
-//////////////////////////////////////////////////////////////////////////////
-
-unsigned char read_dio_byte(int offset)
-{
-  unsigned char byte_val;
-  unsigned char offset_val;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  /* All bit operations are handled at this level so we need only
-     read and write bytes from the actual hardware.
-  */
-
-  offset_val = offset & 0xff;
-  byte_val = inb(base_port + 0x10 + offset_val);
-  return (byte_val & 0xff);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//    MIO_READ_REG
-//
-//////////////////////////////////////////////////////////////////////////////
-
-unsigned char mio_read_reg(int offset)
-{
-  unsigned char byte_val;
-  unsigned char offset_val;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-
-  /* This is a catchall register read routine that allows reading of
-     ANY of the registers on the PCM-MIO. It is used primarily for
-     retreiving control and access values in the hardware.
-   */
-
-  offset_val = offset & 0xff;
-  byte_val = inb(base_port + offset_val);
-  return (byte_val & 0xff);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//    MIO_WRITE_REG
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int mio_write_reg(int offset, unsigned char value)
-{
-  unsigned char byte_val;
-  unsigned char offset_val;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  /* This function like the previous allow unlimited
-     write access to ALL of the registers on the PCM-MIO
-   */
-
-  offset_val = offset & 0xff;
-  byte_val = value;
-  outb(byte_val, base_port + offset_val);
-  
-  return 0;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//    WRITE_DIO_BYTE
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int write_dio_byte(int offset, unsigned char value)
-{
-  unsigned char byte_val;
-  unsigned char offset_val;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  /* All bit operations for the DIO are handled at this level
-     and we need the driver to allow access to the actual
-     DIO registers to update the value.
-  */
-
-  offset_val = offset & 0xff;
-  byte_val = value;
-  outb(byte_val, base_port + 0x10 + offset_val);
-
-  return 0;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//    WRITE_DAC_COMMAND
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int write_dac_command(int dac_num,unsigned char value)
-{
-  unsigned char  byte_val;
-  unsigned char  offset_val;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  byte_val = dac_num & 0xff;		/* This is the DAC number */
-  offset_val = value;		        /* This is the data value */
-  if (byte_val)
-    outb(offset_val,base_port + 0x0e);
-  else
-    outb(offset_val,base_port + 0x0a);
-
-  return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//    WRITE_ADC_COMMAND
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int write_adc_command(int adc_num,unsigned char value)
-{
-  unsigned char byte_val;
-  unsigned char offset_val;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  byte_val = adc_num & 0xff;		/* This is the ADC number */
-  offset_val = value;		        /* This is the data value */
-
-  if(byte_val)
-    outb(offset_val,base_port + 0x06);
-  else
-    outb(offset_val,base_port + 0x02);
-  return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//    WRITE_DAC_DATA
-//
-//////////////////////////////////////////////////////////////////////////////
-
-int write_dac_data(int dac_num, unsigned short value)
-{
-  unsigned short word_val;
-  unsigned char byte_val;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  byte_val = dac_num;
-  word_val = value;
-
-  if(byte_val)		/* DAC 1 */
-    outw(word_val,base_port+0x0c);
-  else
-    outw(word_val,base_port+8);
-  
-  return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//    DAC_READ_STATUS
-//
-//////////////////////////////////////////////////////////////////////////////
-
-unsigned char dac_read_status(int dac_num)
-{
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  if (dac_num)
-    return inb(base_port + 0x0f);
-
-  return inb(base_port + 0x0b);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//    ADC_READ_STATUS
-//
-//////////////////////////////////////////////////////////////////////////////
-
-unsigned char adc_read_status(int adc_num)
-{
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  if (adc_num)
-    return inb(base_port + 7);
-  return inb(base_port + 3);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//    ADC_READ_CONVERSION_DATA
-//
-//////////////////////////////////////////////////////////////////////////////
-
-unsigned short adc_read_conversion_data(int channel)
-{
-  int adc_num;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  if (channel > 7)
-    adc_num = 1;
-  else
-    adc_num = 0;
-
-  if (adc_num)
-    return inw(base_port + 4);
-
-  return inw(base_port);
-}
-
-
-int dio_get_int_with_timestamp(
-  unsigned long long *timestamp
-)
-{
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  return get_buffered_int(timestamp) & 0xff;
-}
-
-int dio_get_int(void)
-{
-  mio_error_code = MIO_SUCCESS;
-
-  return dio_get_int_with_timestamp(NULL);
-}
-
-int wait_adc_int_with_timeout(int adc_num, int milliseconds)
-{
-  int sc;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  if (adc_num) {
-    sc = interruptible_sleep_on(&wq_a2d_1, milliseconds);
-  } else {
-    sc = interruptible_sleep_on(&wq_a2d_2, milliseconds);
-  }
-
-  return sc;
-}
-
-int wait_adc_int(int adc_num)
-{
-  return wait_adc_int_with_timeout(adc_num, 0);
-}
-
-int wait_dac_int_with_timeout(int dac_num, int milliseconds)
-{
-  int sc;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  if (dac_num) {
-    sc = interruptible_sleep_on(&wq_dac_1, milliseconds);
-  } else {
-    sc = interruptible_sleep_on(&wq_dac_2, milliseconds);
-  }
-
-  return sc;
-}
-
-int wait_dac_int(int dac_num)
-{
-  return wait_dac_int_with_timeout(dac_num, 0);
-}
-
-int wait_dio_int_with_timestamp(
-  int                 milliseconds,
-  unsigned long long *timestamp
-)
-{
-  rtems_status_code  rc;
-  din_message_t      din;
-  size_t             received;
-
-  mio_error_code = MIO_SUCCESS;
-
-  if (check_handle())   /* Check for chip available */
-    return -1;
-
-  rc = rtems_message_queue_receive(
-    wq_dio,
-    &din,
-    &received,
-    RTEMS_DEFAULT_OPTIONS,
-    RTEMS_MILLISECONDS_TO_TICKS(milliseconds)
-  );
-  if ( rc == RTEMS_UNSATISFIED ) {
-    mio_error_code = MIO_TIMEOUT_ERROR;
-    return -1;
-  }
-
-  if ( rc == RTEMS_TIMEOUT ) {
-    mio_error_code = MIO_READ_DATA_FAILURE;
-    return -1;
-  }
-
-  if ( rc != RTEMS_SUCCESSFUL ) {
-    printk( "wait_dio_int_with_timestamp - error %d\n", rc );
-    exit( 0 );
-  }
-
-  if (timestamp)
-    *timestamp = din.timestamp;
-  return din.pin;
-}
-
-int wait_dio_int_with_timeout(int milliseconds)
-{
-  return wait_dio_int_with_timestamp(milliseconds, NULL);
-}
-
-int wait_dio_int(void)
-{
-  return wait_dio_int_with_timestamp(0, NULL);
-}
-
-static int handle = 0; /* XXX move to lower */
-
-int check_handle(void)
-{
-  if (handle > 0)  /* If it's already a valid handle */
-    return 0;
-
-  if (handle == -1)  /* If it's already been tried */
-  {
-    mio_error_code = MIO_OPEN_ERROR;
-    sprintf(mio_error_string,"MIO - Unable to open device PCMMIO");
-    return -1;
-  }
-
-  /*
-   * 0  ==> not initialized
-   * 1+ ==> valid file handle, thus initialized
-   * -1 ==> already attempted to open
-   */
-  handle = 1;
-  return 0;
-
-  /* if an error happens, go here */
-  mio_error_code = MIO_OPEN_ERROR;
-  sprintf(mio_error_string,"MIO - Unable to open device PCMMIO");
-  handle = -1;
-  return -1;
-}
-
-/*
- *  RTEMS barrier create helper
- */
-void pcmmio_barrier_create(
-  rtems_name  name,
-  rtems_id   *id
-)
-{
-  rtems_status_code rc;
-
-  rc = rtems_barrier_create( name, RTEMS_BARRIER_MANUAL_RELEASE, 0, id );
-  if ( rc == RTEMS_SUCCESSFUL )
-    return;
-
- printk( "Unable to create PCMMIO Barrier\n" );
- exit(1);
-}
-
-/*
- *  RTEMS barrier create helper
- */
-void pcmmio_din_queue_create(
-  rtems_name  name,
-  rtems_id   *id
-)
-{
-  rtems_status_code rc;
-
-  rc = rtems_message_queue_create(
-    name,
-    MAXIMUM_BUFFERED_DISCRETE_INTERRUPTS,
-    sizeof(din_message_t),
-    RTEMS_DEFAULT_ATTRIBUTES,
-    id
-  );
-  if ( rc == RTEMS_SUCCESSFUL )
-    return;
-
-  printk( "Unable to create PCMMIO DIN IRQ Message Queue\n" );
-  exit(1);
-}
-
-int interruptible_sleep_on(
-  rtems_id *id,
-  int       milliseconds
-)
-{
-  rtems_status_code rc;
-
-  rc = rtems_barrier_wait(*id, RTEMS_MILLISECONDS_TO_TICKS(milliseconds));
-  if ( rc == RTEMS_SUCCESSFUL )
-    return 0;
-  return -1;
-}
-
-void wake_up_interruptible(
-  rtems_id *id
-)
-{
-  rtems_status_code rc;
-  uint32_t          unblocked;
-
-  rc = rtems_barrier_release(*id, &unblocked);
-}
-
-/*
- *  RTEMS specific interrupt handler
- */
-#include <bsp/irq.h>
-
-void common_handler(void);
-
-void pcmmio_irq_handler(
-  rtems_irq_hdl_param param
-)
-{
-  common_handler();
-}
-
-static void pcmmio_irq_disable(const rtems_irq_connect_data *irq)
-{
-  BSP_irq_disable_at_i8259s(irq->name);
-}
-static void pcmmio_irq_enable(const rtems_irq_connect_data *irq)
-{
-  BSP_irq_enable_at_i8259s(irq->name);
-}
-
-static int pcmmio_irq_is_on(const rtems_irq_connect_data *irq)
-{
-  return BSP_irq_enabled_at_i8259s( irq->name );
-}
-
-rtems_irq_connect_data pcmmio_irq = {
-  0,                            // name
-  pcmmio_irq_handler,           // handler
-  NULL,                         // parameter
-  pcmmio_irq_enable,            // enable IRQ
-  pcmmio_irq_disable,           // disable IRQ
-  pcmmio_irq_is_on,             // is IRQ enabled
-};
-
-/* from pcmmio.c - GNU/Linux driver */
-void init_io(unsigned short io_address)
-{
-  int x;
-  unsigned short port;
-
-  /* save the address for later use */
-  port = io_address + 0X10;
-
-  /* Clear all of the I/O ports. This also makes them inputs */
-  for(x=0; x < 7; x++)
-    outb(0,port+x);
-
-  /* Set page 2 access, for interrupt enables */
-  outb(0x80,port+7);
-
-  /* Clear all interrupt enables */
-  outb(0,port+8);
-  outb(0,port+9);
-  outb(0,port+0x0a);
-
-  /* Restore page 0 register access */
-  outb(0,port+7);
-}
-
-/*
- * RTEMS specific initialization routine
- */
-void pcmmio_initialize(
-  unsigned short _base_port,
-  unsigned short _irq
-)
-{
-  /* hardware configuration information */
-  base_port                    = _base_port;
-  irq                          = _irq;
-  pcmmio_dio_missed_interrupts = 0;
-
-  /* Create RTEMS Objects */
-  pcmmio_barrier_create( rtems_build_name( 'a', '2', 'd', '1' ), &wq_a2d_1 );
-  pcmmio_barrier_create( rtems_build_name( 'd', 'a', 'c', '1' ), &wq_dac_1 );
-  pcmmio_barrier_create( rtems_build_name( 'd', 'a', 'c', '2' ), &wq_dac_2 );
-  pcmmio_din_queue_create( rtems_build_name( 'd', 'i', 'o', ' ' ), &wq_dio );
-
-  if ( base_port )
-    init_io( base_port );
-
-  /* install IRQ handler */
-  if ( base_port && irq ) {
-    int status = 0;
-    pcmmio_irq.name = irq;
-    #if defined(BSP_SHARED_HANDLER_SUPPORT)
-      printk( "PCMMIO Installing IRQ handler as shared\n" );
-      status = BSP_install_rtems_shared_irq_handler( &pcmmio_irq );
-    #else
-      printk( "PCMMIO Installing IRQ handler as non-shared\n" );
-      status = BSP_install_rtems_irq_handler( &pcmmio_irq );
-    #endif
-    if ( !status ) {
-      printk("Error installing PCMMIO interrupt handler! status=%d\n", status );
-    }
-  }
-}
-
-#include <libcpu/cpuModel.h> /* for rdtsc */
-
-/*
- *  From this point down, we should be able to share easily with the Linux
- *  driver but I haven't gone to the trouble to do surgery on it.  I have
- *  no way to test it.
- */
-
-/* real copy is in mio_io.c */
-extern unsigned char adc2_port_image;
-
-/* This is the common interrupt handler. It is called by the
- * actual hardware ISR.
- */
-
-void common_handler(void)
-{
-  unsigned char status;
-  unsigned char int_num;
-
-  /* Read the interrupt ID register from ADC2 */
-
-  adc2_port_image = adc2_port_image | 0x20;
-  outb(adc2_port_image,base_port + 0x0f);
-
-  status = inb(base_port + 0x0f);
-  if (status & 1) {
-    /* Clear ADC1 interrupt */
-    inb(base_port+1);      /* Clear interrupt */
-
-    /* Wake up any holding processes */
-    wake_up_interruptible(&wq_a2d_1);
-  }
-
-  if (status & 2) {
-    /* Clear ADC1 interrupt */
-    inb(base_port+5);      /* Clear interrupt */
-
-    /* Wake up anybody waiting for ADC1 */
-    wake_up_interruptible(&wq_a2d_2);
-  }
-
-  if (status & 4) {
-    /* Clear DAC1 interrupt */
-    inb(base_port+9);    /* Clear interrupt */
-
-    /* Wake up if you're waiting on DAC1 */
-    wake_up_interruptible(&wq_dac_1);
-  }
-
-  if (status & 8) {
-
-    /* DIO interrupt. Find out which bit */
-    int_num = get_int();
-    if (int_num) {
-      rtems_status_code  rc;
-      din_message_t      din;
-
-      din.timestamp = rdtsc(); 
-      din.pin       = int_num; 
-
-      rc = rtems_message_queue_send( wq_dio, &din, sizeof(din_message_t) );
-      if ( rc != RTEMS_SUCCESSFUL ) {
-        pcmmio_dio_missed_interrupts++;
-        #ifdef DEBUG
-          printk("<1>Missed DIO interrupt\n" );
-        #endif
-     }
-     #ifdef DEBUG
-       printk("<1>Buffering DIO interrupt on bit %d\n",int_num);
-     #endif
-
-      /* Clear the interrupt */
-      clr_int(int_num);
-    }
-  }
-
-  if (status & 0x10) {
-    /* Clear DAC2 Interrupt */
-    inb(base_port+0x0d);    /* Clear interrupt */
-
-    /* Wake up DAC2 holding processes */
-    wake_up_interruptible(&wq_dac_2);
-  }
-
-  /* Reset the access to the interrupt ID register */
-  adc2_port_image = adc2_port_image & 0xdf;
-  outb(adc2_port_image,base_port+0x0f);
-}
-
-
-void clr_int(int bit_number)
-{
-  unsigned short port;
-  unsigned short temp;
-  unsigned short mask;
-  unsigned short dio_port;
-
-  dio_port = base_port + 0x10;
-
-  /* Also adjust bit number */
-  --bit_number;
-
-  /* Calculate the I/O address based upon bit number */
-  port = (bit_number / 8) + dio_port + 8;
-
-  /* Calculate a bit mask based upon the specified bit number */
-  mask = (1 << (bit_number % 8));
-
-  /* Turn on page 2 access */
-  outb(0x80,dio_port+7);
-
-  /* Get the current state of the interrupt enable register */
-  temp = inb(port);
-
-  /* Temporarily clear only our enable. This clears the interrupt */
-  temp = temp & ~mask;    /* Clear the enable for this bit */
-
-  /* Now update the interrupt enable register */
-  outb(temp,port);
-
-  /* Re-enable our interrupt bit */
-  temp = temp | mask;
-  outb(temp,port);
-
-  /* Set access back to page 0 */
-  outb(0x00,dio_port+7);
-}
-
-int get_int(void)
-{
-  int temp;
-  int x;
-  unsigned short dio_port;
-
-  dio_port = base_port + 0x10;
-
-  /* Read the master interrupt pending register,
-           mask off undefined bits */
-  temp = inb(dio_port+6) & 0x07;
-
-  /* If there are no pending interrupts, return 0 */
-  if ((temp & 7) == 0)
-    return 0;
-
-  /* There is something pending, now we need to identify it */
-
-  /* Set access to page 3 for interrupt id register */
-  outb(0xc0, dio_port + 7);
-
-  /* Read the interrupt ID register for port 0 */
-  temp = inb(dio_port+8);
-
-  /* See if any bit set, if so return the bit number */
-  if (temp != 0) {
-    for (x=0; x<=7; x++) {
-      if (temp & (1 << x)) {
-        outb(0,dio_port+7);
-        return(x+1);
-       }
-    }
-  }
-
-  /* None in port 0, read port 1 interrupt ID register */
-  temp = inb(dio_port+9);
-
-  /* See if any bit set, if so return the bit number */
-  if (temp != 0) {
-    for (x=0; x<=7; x++) {
-      if (temp & (1 << x)) {
-        outb(0,dio_port+7);
-        return(x+9);
-      }
-    }
-  }
-
-  /* Lastly, read the status of port 2 interrupt ID register */
-  temp = inb(dio_port+0x0a);
-
-  /* If any pending, return the appropriate bit number */
-  if (temp != 0) {
-    for (x=0; x<=7; x++) {
-      if (temp & (1 << x)) {
-         outb(0,dio_port+7);
-         return(x+17);
-      }
-    }
-  }
-
-  /* We should never get here unless the hardware is seriously
-     misbehaving, but just to be sure, we'll turn the page access
-     back to 0 and return a 0 for no interrupt found
-  */
-  outb(0,dio_port+7);
-  return 0;
-}
-
-void flush_buffered_ints(void)
-{
-  rtems_status_code  rc;
-  size_t             flushed;
-
-  rc = rtems_message_queue_flush( wq_dio, &flushed );
-  if ( rc != RTEMS_SUCCESSFUL ) {
-    printk( "flushed_buffered_int - error %d\n", rc );
-    exit( 0 );
-  }
-}
-
-int get_buffered_int(
-  unsigned long long *timestamp
-)
-{
-  rtems_status_code  rc;
-  din_message_t      din;
-  int                line;
-  size_t             received;
-
-  if (irq == 0) {
-    line = get_int();
-    if (line)
-      clr_int(line);
-    return line;
-  }
-
-  rc = rtems_message_queue_receive(
-    wq_dio,
-    &din,
-    &received,
-    RTEMS_NO_WAIT,
-    0
-  );
-  if ( rc == RTEMS_UNSATISFIED )
-    return 0;
-
-  if ( rc != RTEMS_SUCCESSFUL ) {
-    printk( "get_buffered_int - error %d\n", rc );
-    exit( 0 );
-  }
-
-  if (timestamp)
-    *timestamp = din.timestamp;
-  return din.pin;
-}
-
-int dio_get_missed_interrupts(void)
-{
-  int isrs;
-
-  isrs = pcmmio_dio_missed_interrupts;
-
-  pcmmio_dio_missed_interrupts = 0;
-
-  return isrs;
-}
Index: pcmmio/original/pcmmio.c
===================================================================
--- pcmmio/original/pcmmio.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ pcmmio/original/pcmmio.c	(revision 2bae2aa487be5c21a8eac5de5ba3c19d73b1651c)
@@ -1,6 +1,14 @@
-/*
+/* PCMMIO.C    WinSystems PCM-MIO Linux Driver */
+
+/* 
+ * $Header$
+ * $Id$
+ *
+ * Filename : $RCSfile$
+ * 
+ * $Log$
+ *
+ *
  * WinSystems PCM-MIO Linux Device Driver
- * 
- * $Id$
  */
 
@@ -1017,2 +1025,3 @@
 }
 
+	
Index: mmio/original/pcmmio_commands.h
===================================================================
--- pcmmio/original/pcmmio_commands.h	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
- *  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$
- */
-
-#ifndef __RTEMS_PCMMIO_COMMANDS_h
-#define __RTEMS_PCMMIO_COMMANDS_h
-
-#include <rtems.h>
-#include <rtems/shell.h>
-
-extern int main_pcmmio_din(int argc, char **argv);
-
-extern rtems_shell_cmd_t Shell_PCMMIO_DIN_Command;
-extern rtems_shell_cmd_t Shell_PCMMIO_DOUT_Command;
-extern rtems_shell_cmd_t Shell_PCMMIO_ADC_Mode_Command;
-extern rtems_shell_cmd_t Shell_PCMMIO_ADC_Command;
-extern rtems_shell_cmd_t Shell_PCMMIO_DAC_Command;
-extern rtems_shell_cmd_t Shell_PCMMIO_IRQ_Command;
-extern rtems_shell_cmd_t Shell_PCMMIO_Benchmark_Command;
-
-#define CONFIGURE_PCMMIO_COMMANDS \
-  &Shell_PCMMIO_DIN_Command, \
-  &Shell_PCMMIO_DOUT_Command, \
-  &Shell_PCMMIO_ADC_Command, \
-  &Shell_PCMMIO_ADC_Mode_Command, \
-  &Shell_PCMMIO_DAC_Command, \
-  &Shell_PCMMIO_IRQ_Command, \
-  &Shell_PCMMIO_Benchmark_Command \
-
-extern rtems_shell_alias_t Shell_PCMMIO_DIN_Alias;
-extern rtems_shell_alias_t Shell_PCMMIO_DOUT_Alias;
-extern rtems_shell_alias_t Shell_PCMMIO_ADC_Alias;
-extern rtems_shell_alias_t Shell_PCMMIO_ADC_Mode_Alias;
-extern rtems_shell_alias_t Shell_PCMMIO_DAC_Alias;
-
-#define CONFIGURE_PCMMIO_ALIASES \
-  &Shell_PCMMIO_DIN_Alias, \
-  &Shell_PCMMIO_DOUT_Alias, \
-  &Shell_PCMMIO_ADC_Alias, \
-  &Shell_PCMMIO_ADC_Mode_Alias, \
-  &Shell_PCMMIO_DAC_Alias
-  
-#endif
Index: mmio/original/pcmmio_shell.c
===================================================================
--- pcmmio/original/pcmmio_shell.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,117 +1,0 @@
-/*
- *  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 "pcmmio_commands.h"
-
-#include <stdlib.h>
-
-#include <rtems/untar.h>
-/*
- *  The tarfile image is built automatically externally.
- */
-#include "FilesystemImage.h"
-
-rtems_task Init(
-  rtems_task_argument ignored
-)
-{
-  int status;
-
-  /*
-   *  Initialize the PCMMIO module to use IRQ6.  Ours is jumpered for 0x300
-   *  base address.  We use discrete input interrupts so enable all of the
-   *  as edge triggered on 1.
-   */
-  pcmmio_initialize(0x300, 6);
-  enable_dio_interrupt();
-  { int i;
-    for (i=1 ; i<=48 ; i++ )
-      dio_enab_bit_int(i, 1);
-  }
-
-  /*
-   * Untar initial filesystem contents from program image
-   */
-  printk("Loading filesystem image\n");
-  status = Untar_FromMemory( (char *)FilesystemImage, FilesystemImage_size );
-  if ( status ) {
-    printf("Unable to untar initial filesystem contents\n");
-    exit(0);    
-  }
-
-  /*
-   *  Display a herald with some hints on usage
-   */
-  printf(
-    "\n"
-    "\n"
-    "*** Shell Configured with WinSystems PCMMIO Commands ***\n"
-    "Type \"help pcmmio\" for more information\n"
-    "\n"
-  );
-  rtems_shell_init(
-    "SHLL",                          /* task_name */
-    RTEMS_MINIMUM_STACK_SIZE * 4,    /* task_stacksize */
-    100,                             /* task_priority */
-    "/dev/console",                  /* devname */
-    false,                           /* forever */
-    true,                            /* wait */
-    NULL                             /* login */
-  );
-}
-
-/* RTEMS configuration */
-
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-#ifdef RTEMS_BSP_HAS_IDE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER
-#endif
-#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
-#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
-
-#define CONFIGURE_MICROSECONDS_PER_TICK     1000
-
-#define CONFIGURE_MAXIMUM_TASKS                  20
-#define CONFIGURE_MAXIMUM_SEMAPHORES             20
-#define CONFIGURE_MAXIMUM_BARRIERS                3
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES          1
-#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
-
-/*
- * discrete in messages are 12 bytes and there are 1024 of them 
- */
-#define CONFIGURE_MESSAGE_BUFFER_MEMORY \
-        CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(1024, 12)
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_EXTRA_TASK_STACKS         (6 * RTEMS_MINIMUM_STACK_SIZE)
-#define CONFIGURE_INIT_TASK_ATTRIBUTES      RTEMS_FLOATING_POINT
-
-/* We need the full IMFS to create initial files */
-#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
-
-#define CONFIGURE_STACK_CHECKER_ENABLED
-#define CONFIGURE_MALLOC_STATISTICS
-
-#define CONFIGURE_INIT
-#include <rtems/confdefs.h>
-
-#define CONFIGURE_SHELL_USER_COMMANDS \
-  CONFIGURE_PCMMIO_COMMANDS
-#define CONFIGURE_SHELL_USER_ALIASES \
-  CONFIGURE_PCMMIO_ALIASES
-
-#define CONFIGURE_SHELL_COMMANDS_INIT
-#define CONFIGURE_SHELL_COMMANDS_ALL
-
-#include <rtems/shellconfig.h>
-
Index: pcmmio/original/poll.c
===================================================================
--- pcmmio/original/poll.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ pcmmio/original/poll.c	(revision 2bae2aa487be5c21a8eac5de5ba3c19d73b1651c)
@@ -1,12 +1,19 @@
-/* poll.c
- * Demonstration program for WinSystems PCM-MIO Driver
- *
- * $Id$
- */
-
-/* This program demonstrates one manner in which an unprivileged 
- * application running in user space can synchronize to hardware events 
- * handled by a device driver running in Kernel space.
- */
+/* Poll.c Demonstration program for WinSystems PCM-MIO Driver */
+
+/*
+*
+* $Header$
+*
+* $Id$
+*
+* $Log$
+*
+*/
+
+/* This program demonstrates one manner in which an unprivledged 
+   application running in user space can sychronize to hardware events 
+   handled by a device driver running in Kernel space.
+*/
+
 
 #include "mio_io.h"    
@@ -20,5 +27,5 @@
 
 
-/* This function will be a sub-processes using the Posix threads 
+/* This function will be a sub-processe using the Posix threads 
    capability of Linux. This thread will simulate a type of 
    Interrupt service routine in that it will start up and then suspend 
Index: pcmmio/original/repeat.c
===================================================================
--- pcmmio/original/repeat.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ pcmmio/original/repeat.c	(revision 2bae2aa487be5c21a8eac5de5ba3c19d73b1651c)
@@ -1,15 +1,22 @@
-/* repeat.c
- * Demonstration program for WinSystems PCM-MIO Driver
- *
- * $Id$
- *
- * Compile for GNU/Linux with:
- *
- *    gcc repeat.c kbhit.c mio_io.o -o repeat
- *
- * This program demonstrates the adc_convert_single_repeated function
- * which allows for a sequence of conversions to be accomplished
- * with a single call on the same channel.
- */
+/* repeat.c Demonstration program for WinSystems PCM-MIO Driver */
+
+/*
+*
+* $Header$
+*
+* $Id$
+*
+* $Log$
+*
+*	Compile with :
+*
+*		gcc repeat.c kbhit.c mio_io.o -o repeat
+*
+*
+*	This program demonstrates the adc_convert_single_repeated function
+*	which allows for a sequence of conversions to be accomplished
+*	with a single call on the same channel.
+*
+*/
 
 #include "mio_io.h"    
Index: mmio/original/rootfs/set_adc_modes
===================================================================
--- pcmmio/original/rootfs/set_adc_modes	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,3 +1,0 @@
-#! joel
-echo "Setting all ADCs to +/-10V (bipolar) and single ended"
-pcmmio_adc_mode 0 15
Index: mmio/original/rootfs/test_adc
===================================================================
--- pcmmio/original/rootfs/test_adc	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,54 +1,0 @@
-#! joel
-
-echo "*** assume dac 4 is connected to ADC 0 ***"
-echo "Cycle from -5v to +5v with one second between on dac 4"
-
-pcmmio_dac 4 -5.0
-sleep 1
-pcmmio_adc 0
-
-pcmmio_dac 4 -4.0
-sleep 1
-pcmmio_adc 0
-
-pcmmio_dac 4 -3.0
-sleep 1
-pcmmio_adc 0
-
-pcmmio_dac 4 -2.0
-sleep 1
-pcmmio_adc 0
-
-pcmmio_dac 4 -1.0
-sleep 1
-pcmmio_adc 0
-
-pcmmio_dac 4 0.0
-sleep 1
-pcmmio_adc 0
-
-pcmmio_dac 4 1.0
-sleep 1
-pcmmio_adc 0
-
-pcmmio_dac 4 2.0
-sleep 1
-pcmmio_adc 0
-
-pcmmio_dac 4 3.0
-sleep 1
-pcmmio_adc 0
-
-pcmmio_dac 4 4.0
-sleep 1
-pcmmio_adc 0
-
-pcmmio_dac 4 5.0
-sleep 1
-pcmmio_adc 0
-
-echo "Write 0.0v to dac 4"
-pcmmio_dac 4 0.0
-sleep 1
-pcmmio_adc 0
-
Index: mmio/original/rtems_config.c
===================================================================
--- pcmmio/original/rtems_config.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,42 +1,0 @@
-/*
- *  RTEMS Configuration and Initialization for PCMMIO Demonstration Programs	
- *
- *  $Id$
- */
-
-#include <rtems.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include "mio_io.h"
-
-extern int main(int, char **);
-
-void *POSIX_Init(
-  void *ignored
-)
-{
-  printk( "Initializing PCMMIO\n" );
-  sleep(1);
-  /* default jumpers --> 0x300 and 0 --> no IRQ */
-  pcmmio_initialize(0x300, 0);
-
-  main(0,NULL);
-
-  exit(0);
-  return NULL;
-}
-
-/* configuration information */
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-#define CONFIGURE_MAXIMUM_POSIX_THREADS      3
-#define CONFIGURE_MAXIMUM_BARRIERS           4
-#define CONFIGURE_MICROSECONDS_PER_TICK      1000
-
-
-#define CONFIGURE_INIT
-#include <rtems/confdefs.h>
-
Index: mmio/original/simple_rtems.c
===================================================================
--- pcmmio/original/simple_rtems.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,39 +1,0 @@
-/*
- *  RTEMS Simple Application to verify we survive initialization
- *  of board and can see it. :)
- *
- *  $Id$
- */
-
-#include <rtems.h>
-#include <stdio.h>
-
-#include "mio_io.h"
-
-int main(
-  int argc,
-  char **argv
-)
-{ 
-  int bit;
-
-  while ( 1 ) {
-    for ( bit=0 ; bit<48 ; bit+=8 ) {
-       printf(
-          "%d-%d: %d%d%d%d %d%d%d%d %d%d%d%d %d%d%d%d\n",
-          bit,
-          bit + 15,
-          dio_read_bit(bit +  0), dio_read_bit(bit +  1),
-          dio_read_bit(bit +  2), dio_read_bit(bit +  3),
-          dio_read_bit(bit +  4), dio_read_bit(bit +  5),
-          dio_read_bit(bit +  6), dio_read_bit(bit +  7),
-          dio_read_bit(bit +  8), dio_read_bit(bit +  9),
-          dio_read_bit(bit + 10), dio_read_bit(bit + 11),
-          dio_read_bit(bit + 12), dio_read_bit(bit + 13),
-          dio_read_bit(bit + 14), dio_read_bit(bit + 15)
-      );
-    }
-    (void) rtems_task_wake_after( RTEMS_MILLISECONDS_TO_TICKS(1000) );
-  }
-  return 0;
-}
Index: mmio/pcmmio.c
===================================================================
--- pcmmio/pcmmio.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,1018 +1,0 @@
-/*
- * WinSystems PCM-MIO Linux Device Driver
- * 
- * $Id$
- */
-
- static char *RCSInfo = "$Id$";
-
-/* Portions of original code Copyright (C) 1998-99 by Ori Pomerantz */
-
-
-/* #define DEBUG 1 */
-
-#ifndef __KERNEL__
-#  define __KERNEL__
-#endif
-
-#ifndef MODULE
-#  define MODULE
-#endif
-
-#include <linux/config.h>
-#include <linux/module.h>
-
-#include <linux/sched.h>
-#include <linux/kernel.h>
-#include <linux/fs.h>
-#include <linux/errno.h>
-#include <linux/delay.h>
-#include <linux/mm.h>
-#include <linux/ioport.h>
-#include <linux/interrupt.h>
-
-#include <asm/io.h>
-#include <asm/uaccess.h>
-
-
-MODULE_LICENSE("GPL");
-
-/* Our own ioctl numbers */
-
-#include "mio_io.h"
-
-#define SUCCESS 0
-
-#define MAX_INTS 1024
-
-/* Function prototypes for local functions */
-
-int get_buffered_int(void);
-void init_io(unsigned short io_address);
-void clr_int(int bit_number);
-int get_int(void);
-
-
-/* Interrupt handler */
-
-irqreturn_t mio_handler(int, void *, struct pt_regs *);
-
-void common_handler(void);
-
-
-/* This holds the base addresses of the board */
-
-unsigned short base_port = 0;
-
-/* The name for our device, as it will appear in 
- * /proc/devices */
-
-#define MAJOR_NUM 115
-#define DEVICE_NAME "pcmmio"
-
-/* The maximum length of the message for the device */
-
-#define BUF_LEN 40
-
-/* The message the device will give when asked */
-
-static char Message[BUF_LEN];
-
-/* A message pointer for the device */
-
-int Message_Ptr = 0;
-
-/* Our insmod command line arguments */
-
-MODULE_PARM(io,"1-6i");
-MODULE_PARM(irq,"1-6i");
-
-static unsigned short io = 0;
-static unsigned short irq = 0;
-
-
-/* We will buffer up the transition interrupts and will pass them on
-   to waiting applications
-*/
-
-unsigned char int_buffer[MAX_INTS];
-int inptr = 0;
-int outptr = 0;
-
-
-/* These declarations create the wait queues. One for each supported
-   device.
-*/
-
-DECLARE_WAIT_QUEUE_HEAD(wq_a2d_1);
-DECLARE_WAIT_QUEUE_HEAD(wq_a2d_2);
-DECLARE_WAIT_QUEUE_HEAD(wq_dac_1);
-DECLARE_WAIT_QUEUE_HEAD(wq_dac_2);
-DECLARE_WAIT_QUEUE_HEAD(wq_dio);
-
-unsigned char adc2_port_image = 0;
-
-/* This is the common interrupt handler. It is called by the hctual hardware ISR.
-*/
-
-void common_handler()
-{
-unsigned char status;
-unsigned char int_num;
-
-
-			/* Read the interrupt ID register from ADC2 */
-
-			adc2_port_image = adc2_port_image | 0x20;
-			outb(adc2_port_image,base_port + 0x0f);	
-
-			status = inb(base_port + 0x0f);
-
-			if(status & 1)
-			{
-				/* Clear ADC1 interrupt */
-				inb(base_port+1);			/* Clear interrupt */
-
-				/* Wake up any holding processes */
-
-				wake_up_interruptible(&wq_a2d_1);
-			}
-
-			if(status & 2)
-			{			
-				/* Clear ADC1 interrupt */
-
-				inb(base_port+5);			/* Clear interrupt */
-
-				/* Wake up anybody waiting for ADC1 */
-
-				wake_up_interruptible(&wq_a2d_2);
-			}
-
-			if(status & 4)
-			{
-				/* Clear DAC1 interrupt */
-
-				inb(base_port+9);		/* Clear interrupt */
-
-				/* Wake up if you're waiting on DAC1 */
-
-				wake_up_interruptible(&wq_dac_1);
-			}
-
-			if(status & 8)
-			{
-
-				/* DIO interrupt. Find out which bit */
-
-				int_num = get_int();
-				if(int_num)
-				{
-#ifdef DEBUG
-					printk("<1>Buffering DIO interrupt on bit %d\n",int_num);
-#endif
-
-					/* Buffer the interrupt */
-
-					int_buffer[inptr++] = int_num;
-					if(inptr == MAX_INTS)
-						inptr = 0;
-				
-					/* Clear the interrupt */
-
-					clr_int(int_num);
-				}
-
-				/* Wake up anybody waiting for a DIO interrupt */
-
-				wake_up_interruptible(&wq_dio);
-			}
-
-			if(status & 0x10)
-			{
-				/* Clear DAC2 Interrupt */
-
-				inb(base_port+0x0d);		/* Clear interrupt */
-
-				/* Wake up DAC2 holding processes */
-
-				wake_up_interruptible(&wq_dac_2);
-			}
-
-
-			/* Reset the access to the interrupt ID register */
-
-			adc2_port_image = adc2_port_image & 0xdf;
-			outb(adc2_port_image,base_port+0x0f);	
-
-}
-
-
-
-/* This is the actual hadrware interrupt handler. It defers to another
-   functon for handling.
-*/
-
-irqreturn_t mio_handler(int pirq, void *dev_id, struct pt_regs *regs)
-{
-
-#ifdef DEBUG
-	printk("<1>MIO Interrupt received\n");
-#endif
-
-	common_handler();
-	return IRQ_HANDLED;
-}
-
-
-
-/***********************************************************************
-*
-*
-*			DEVICE OPEN
-*
-*
-************************************************************************
-*/
-
-
-/* This function is called whenever a process attempts 
- * to open the device file */
-
-static int device_open(struct inode *inode, struct file *file)
-{
-
-  if(base_port == 0)
-  {
-	printk("<1>**** OPEN ATTEMPT on uninitialized port *****\n");
-	return -1;
-  }
-
-#ifdef DEBUG
-  printk ("device_open(%p)\n", file);
-#endif
-
-  /* Rewind the message pointer for this device on a new open.
-
-     This could cause problems for applications that use file I/O
-     for talking to the device as we do not limit the number of
-     applications that can open the device. The solution is to use
-     IOCTL functions to control the device rather than file I/O
-     calls.
-  */
-
-  Message_Ptr = 0;
-
-
-  return SUCCESS;
-}
-
-
-/*************************************************************************
-*
-*
-*			DEVICE CLOSE
-*
-*
-**************************************************************************
-*/
-
-
-int device_release(struct inode *inode, struct file *file)
-{
-
-#ifdef DEBUG
-  printk ("device_release(%p,%p)\n", inode, file);
-#endif 
-
-
-  return 0;
-
-}
-
-
-/****************************************************************************
-*
-*			DEVICE READ
-*
-*
-*
-*****************************************************************************
-*/
-
-ssize_t device_read(struct file *file,char *buffer,size_t length,loff_t *offset)
-{
-unsigned short port;
-int bytes_read;
-int x;
-
-   /* We only allow reading of the 32 valid ports in the device. Beyond
-      that we return EOF.
-   */
-
-   if(Message_Ptr == 32)
- 	return 0;	/* EOF Condition */
-
-   port = base_port;
-
-   // Do a fresh read of the ports */
-
-   for(x=0; x<32; x++)
-       Message[x] = inb(port+x);
-
-
-  /* Number of bytes actually written to the buffer */
-
-   bytes_read = 0;
-
-#ifdef DEBUG
-  printk("device_read(%p,%p,%d)\n",file, buffer, length);
-#endif
-
-
-  /* Actually put the data into the buffer */
-
-  while (length && (Message_Ptr < 32))
-  {
-    /* Because the buffer is in the user data segment, 
-     * not the kernel data segment, assignment wouldn't 
-     * work. Instead, we have to use put_user which 
-     * copies data from the kernel data segment to the 
-     * user data segment. */
-
-    put_user((Message[Message_Ptr++]), buffer++);
-    length --;
-    bytes_read ++;
-  }
-
-#ifdef DEBUG
-   printk ("Read %d bytes, %d left\n",bytes_read, length);
-#endif
-
-   /* Read functions are supposed to return the number 
-    * of bytes actually inserted into the buffer */
-
-
-  /* By updating file->f_pos we can allow seeking of our Messge_Ptr
-     which will allow random access to the ports using file I/O
-  */
-
-  file->f_pos = (loff_t)Message_Ptr;
-
-  return bytes_read;
-}
-
-
-/****************************************************************************
-*
-*
-*				DEVICE WRITE
-*
-*****************************************************************************
-*/
-
-ssize_t device_write(struct file *file,const char *buffer,size_t length,loff_t *offset)
-{
-int i;
-unsigned short port;
-
-    port = base_port;
-
-#ifdef DEBUG
-  printk ("device_write(%p,%s,%d)",file, buffer, length);
-#endif
-
-  /* Read in the bytes to write, one at a time */
-
-  for(i=0; i<length && i<BUF_LEN; i++)
-  {
-    get_user(Message[i], buffer+i);
-
-    /* We output each byte to it's appropriate port as it comes in */
-
-	if(Message_Ptr == 32)
-	{
-         file->f_pos = (loff_t) Message_Ptr;
-	     return i;
-	}
-
-
-    outb(Message[i],port + Message_Ptr++);
-
-  }
-
-  /* As with device_read if we update the file position. Seeking will
-     work as expected.
-  */
-
-  file->f_pos = (loff_t) Message_Ptr;
-
-
-  /* Again, return the number of input characters used */
-
-    return i;
-}
-
-
-/****************************************************************************
-*
-*
-*
-*			DEVICE IOCTL
-*
-*
-*****************************************************************************
-*/
-
-
-int device_ioctl(struct inode *inode,struct file *file,
-     unsigned int ioctl_num, unsigned long ioctl_param)
-{
-int i;
-unsigned short word_val;
-unsigned char byte_val;
-unsigned char offset_val;
-unsigned char *arguments;
-
-#ifdef DEBUG
-//  printk("PCMMIO - IOCTL call IOCTL CODE %04X\n",ioctl_num);
-#endif
-
-
-  /* Switch according to the ioctl called */
-
-  switch (ioctl_num)
-	{
-
-	case WRITE_DAC_DATA:
-
-		arguments = (char *) ioctl_param;
-
-		if(!access_ok(VERIFY_WRITE,arguments,3))
-		{
-		    printk("<1>pcmmio : Unable to access IOCTL argument memory\n");
-		    return -EFAULT;
-		}
-
-		byte_val = arguments[0];
-
-		word_val = arguments[2];
-		word_val = word_val << 8;
-		word_val = word_val | arguments[1];
-
-		if(byte_val)		/* DAC 1 */
-			outw(word_val,base_port+0x0c);
-		else
-			outw(word_val,base_port+8);
-
-		break;
-
-
-	case	READ_DAC_STATUS:
-
-		byte_val = ioctl_param & 0xff;		/* This is the dac number */
-
-		if(byte_val)
-			i = inb(base_port + 0x0f);
-		else
-			i = inb(base_port + 0x0b);
-
-		return i;
-
-		break;
-
-
-	case	WRITE_DAC_COMMAND:
-
-		byte_val = ioctl_param & 0xff;		/* This is the DAC number */
-		offset_val = ioctl_param >> 8;		/* This is the data value */
-
-		if(byte_val)
-			outb(offset_val,base_port + 0x0e);
-		else
-			outb(offset_val,base_port + 0x0a);
-
-		break;
-
-
-	case	WRITE_ADC_COMMAND:
-
-		byte_val = ioctl_param & 0xff;		/* This is the ADC number */
-		offset_val = ioctl_param >> 8;		/* This is the data value */
-
-		if(byte_val)
-			outb(offset_val,base_port + 0x06);
-		else
-			outb(offset_val,base_port + 0x02);
-
-		break;
-
-
-
-	case	READ_ADC_DATA:
-
-		byte_val = ioctl_param & 0xff;	/* This is the ADC number */
-
-		if(byte_val)
-			word_val = inw(base_port + 4);
-		else
-			word_val = inw(base_port);
-
-		return word_val;
-
-		break;
-
-
-	case	READ_ADC_STATUS:
-
-		byte_val = ioctl_param & 0xff;		/* This is the ADC number */
-        
-		if(byte_val)
-			i = inb(base_port + 7);
-		else
-			i = inb(base_port + 3);
-
-		return i;
-
-		break;
-
-
-	case	WRITE_DIO_BYTE:
-
-		offset_val = ioctl_param & 0xff;
-		byte_val = ioctl_param >> 8;
-		outb(byte_val, base_port + 0x10 + offset_val);
-
-		break;
-
-
-	case	READ_DIO_BYTE:
-
-		offset_val = ioctl_param & 0xff;
-		byte_val = inb(base_port + 0x10 + offset_val);
-		return (byte_val & 0xff);
-
-		break;
-
-
-	case	MIO_WRITE_REG:
-
-		offset_val = ioctl_param & 0xff;
-		byte_val = ioctl_param >> 8;
-		outb(byte_val, base_port + offset_val);
-
-		break;
-
-
-	case	MIO_READ_REG:
-
-		offset_val = ioctl_param & 0xff;
-		byte_val = inb(base_port + offset_val);
-		return (byte_val & 0xff);
-
-		break;
-
-
-	case	WAIT_A2D_INT_1:
-
-#ifdef DEBUG
-		printk("<1>PCMMIO - IOCTL wait_ad1_int \n");
-		printk("<1>PCMMIO : current process %i (%s) going to sleep\n",
-		current->pid,current->comm);
-#endif
-
-		interruptible_sleep_on(&wq_a2d_1);
-		break;
-
-	case	WAIT_A2D_INT_2:
-
-
-#ifdef DEBUG
-		printk("<1>PCMMIO - IOCTL wait_ad2_int \n");
-		printk("<1>PCMMIO : current process %i (%s) going to sleep\n",
-		current->pid,current->comm);
-#endif
-
-		interruptible_sleep_on(&wq_a2d_2);
-		break;
-
-	case	WAIT_DAC_INT_1:
-
-#ifdef DEBUG
-		printk("<1>PCMMIO - IOCTL wait_dac1_int \n");
-		printk("<1>PCMMIO : current process %i (%s) going to sleep\n",
-		current->pid,current->comm);
-#endif
-		interruptible_sleep_on(&wq_dac_1);
-		break;
-
-	case	WAIT_DAC_INT_2:
-
-#ifdef DEBUG
-		printk("<1>PCMMIO - IOCTL wait_dac2_int \n");
-		printk("<1>PCMMIO : current process %i (%s) going to sleep\n",
-		current->pid,current->comm);
-#endif
-		interruptible_sleep_on(&wq_dac_2);
-		break;
-
-	case	WAIT_DIO_INT:
-
-		if((i = get_buffered_int()))
-			return i;
-
-#ifdef DEBUG
-		printk("<1>PCMMIO - IOCTL wait_dio_int \n");
-		printk("<1>PCMMIO : current process %i (%s) going to sleep\n",
-		current->pid,current->comm);
-#endif
-		interruptible_sleep_on(&wq_dio);
-
-		i = get_buffered_int();
-
-		return i;
-		break;
-
-	case READ_IRQ_ASSIGNED:
-
-		return(irq & 0xff);
-		break;
-
-	case DIO_GET_INT:
-
-		i = get_buffered_int();
-		return(i & 0xff);
-		break;
-
-
-	 }
-
-  return SUCCESS;
-}
-
-/***************************** DEVICE_LSEEK ***************************/
-
-loff_t device_lseek(struct file *filp, loff_t off, int whence)
-{
-unsigned short offset;
-
-    /* Convert the offset value to a more familiar size. After all
-       our device is a fixed size of 10 bytes.
-    */
-
-    offset = (unsigned short)off;
-
-#ifdef DEBUG
-    printk("<1>PCMMIO:lseek - offset %d mode %d\n",offset,whence);
-#endif
-
-    switch(whence)
-    {
-	case 0:   /* Seek set */
-	    Message_Ptr = offset;
-		if(Message_Ptr > 32)
-			Message_Ptr = 32;
-		break;
-
-	case 1:   /* Seek from Current */
-	    Message_Ptr += offset;
-		if(Message_Ptr > 32)
-			Message_Ptr = 32;
-
-		break;
-	
-	default:	  /* Seek from End */
-	    return -EINVAL;
-	    break;
-    }
-
-	if(Message_Ptr < 0)
-	{
-	    Message_Ptr = 0;
-	    filp->f_pos = (loff_t)Message_Ptr;
-	    return -EINVAL;
-	}
-
-	if(Message_Ptr > 32)
-	{
-	    Message_Ptr = 32;
-	    filp->f_pos = (loff_t)Message_Ptr;
-	    return -EINVAL;
-	}
-
-	filp->f_pos = (loff_t)Message_Ptr;
-	return (loff_t)Message_Ptr;
-}
-
-/* ******************* Module Declarations *************************** */
-
-
-/* This structure will hold the functions to be called 
- * when a process does something to the our device 
-*/
-
-struct file_operations Fops = {
-
-  owner:	THIS_MODULE,
-  llseek:	device_lseek,
-  read:		device_read, 
-  write:	device_write,
-  ioctl:	device_ioctl,
-  open:		device_open,
-  release:	device_release,
-};
-
-/****************************************************************************
-*
-*			INIT_MODULE
-*
-*
-*****************************************************************************
-*/
-
-/* Initialize the module - Register the character device */
-
-int init_module()
-{
-int ret_val;
-
-  /* Sign-on */
-
-   printk("<1>\nWinSystems PCM-MIO Driver. Copyright 2006. All rights reserved\n");
-   printk("<1>%s\n",RCSInfo);
-
-
-  /* Check and Map our I/O region requests */
-
-	if(io != 0)
-    {
-		if(request_region(io,0x20,"PCMMIO") == NULL)
-		{
-			printk("<1>PCMMIO - Unable to use I/O Address %04X\n",io);
-           	io = 0;
-		}
-  	/* Register the character device */
-
-  		ret_val = register_chrdev(MAJOR_NUM, DEVICE_NAME, &Fops);
-
-  		/* Negative values signify an error */
- 
- 		if (ret_val < 0)
-		{
-    		printk (" %s failed with %d\n",",registering the character device PCMMIO ", ret_val);
-    		return ret_val;
-  		}
-	
-		printk ("\nPCMMIO : The Base I/O Address = %04X\n",io);
-		base_port = io;
-		init_io(io);
-	}
-
-      if((io != 0) && (irq != 0))
-      {
-			if(request_irq(irq,mio_handler,SA_SHIRQ,"PCMMIO",RCSInfo))
-			printk("<1>PCMMIO - Unable to register IRQ %d\n",irq);
-		else
-			printk("<1>PCMMIO - IRQ %d registered ok Chip 1\n",irq);
-
-	  }
- 
-	return 0;
-}
-
-/***************************************************************************
-*
-*			CLEANUP_MODULE
-*
-****************************************************************************
-*/
-
-/* Cleanup - unregister the appropriate file from /proc */
-
-void cleanup_module()
-{
-  /* Unregister I/O Port usage */
-
-   	if(irq)
-		free_irq(irq,RCSInfo);
-     
-	if(io)
-      	release_region(io,0x20);
-
-  /* Unregister the device */
-
-	unregister_chrdev(MAJOR_NUM, DEVICE_NAME);
- 
-}  
-
-
-/* start of device subroutines */
-
-
-
-/* This array holds the image values of the last write to each I/O
-   port. This allows bit manipulation routines to work without having to actually do
-   a read-modify-write to the I/O port.
-*/
-
-unsigned char port_images[6];
-
-
-void init_io(unsigned short io_address)
-{
-int x;
-unsigned short port;
-
-	/* save the address for later use */
-
-	port = io_address + 0X10;
-
-	/* Clear all of the I/O ports. This also makes them inputs */
-
-	for(x=0; x < 7; x++)
-		outb(0,port+x);
-
-	/* Clear the image values as well */
-
-	for(x=0; x < 6; x++)
-		port_images[x] = 0;
-
-	/* Set page 2 access, for interrupt enables */
-
-	outb(0x80,port+7);
-
-	/* Clear all interrupt enables */
-
-	outb(0,port+8);
-	outb(0,port+9);
-	outb(0,port+0x0a);
-
-	/* Restore page 0 register access */
-
-	outb(0,port+7);
-}
-
-
-
-
-void clr_int(int bit_number)
-{
-unsigned short port;
-unsigned short temp;
-unsigned short mask;
-unsigned short dio_port;
-
-
-	dio_port = base_port + 0x10;
-
-	/* Also adjust bit number */
-
-	--bit_number;
-
-	/* Calculate the I/O address based upon bit number */
-
-	port = (bit_number / 8) + dio_port + 8;
-
-	/* Calculate a bit mask based upon the specified bit number */
-
-	mask = (1 << (bit_number % 8));
-
-	/* Turn on page 2 access */
-
-	outb(0x80,dio_port+7);
-
-	/* Get the current state of the interrupt enable register */
-
-	temp = inb(port);
-
-	/* Temporarily clear only our enable. This clears the interrupt */
-
-	temp = temp & ~mask;    /* Clear the enable for this bit */
-
-	/* Now update the interrupt enable register */
-
-	outb(temp,port);
-
-	/* Re-enable our interrupt bit */
-
-	temp = temp | mask;
-
-	outb(temp,port);
-
-	/* Set access back to page 0 */
-
-	outb(0x00,dio_port+7);
-}
-
-
-int get_int(void)
-{
-int temp;
-int x;
-unsigned short dio_port;
-
-	dio_port = base_port + 0x10;
-
-	/* Read the master interrupt pending register,
-           mask off undefined bits */
-
-	temp = inb(dio_port+6) & 0x07;
-
-	/* If there are no pending interrupts, return 0 */
-
-	if((temp & 7) == 0)
-	    return 0;
-
-	/* There is something pending, now we need to identify it */
-
-	/* Set access to page 3 for interrupt id register */
-
-	outb(0xc0, dio_port + 7);
-
-	/* Read the interrupt ID register for port 0 */
-
-	temp = inb(dio_port+8);
-
-	/* See if any bit set, if so return the bit number */
-
-	if(temp != 0)
-	{
-	    for(x=0; x<=7; x++)
-	    {
-            if(temp & (1 << x))
-	     	{
-		    outb(0,dio_port+7);
-		    return(x+1);
-            }
-         }
-     }
-
-	/* None in port 0, read port 1 interrupt ID register */
-
-	temp = inb(dio_port+9);
-
-	/* See if any bit set, if so return the bit number */
-
-	if(temp != 0)
-	{
-	    for(x=0; x<=7; x++)
-	    {
-		if(temp & (1 << x))
-		{
-		    outb(0,dio_port+7);
-		    return(x+9);
-		}
-	    }
-	}
-
-	/* Lastly, read the statur of port 2 interrupt ID register */
-
-	temp = inb(dio_port+0x0a);
-
-	/* If any pending, return the appropriate bit number */
-
-	if(temp != 0)
-	{
-	    for(x=0; x<=7; x++)
-	    {
-			if(temp & (1 << x))
-			{
-			   outb(0,dio_port+7);
-			   return(x+17);
-			}
-	    }
-	}
-
-	/* We should never get here unless the hardware is seriously
-	   misbehaving, but just to be sure, we'll turn the page access
-	   back to 0 and return a 0 for no interrupt found
-	*/
-
-	outb(0,dio_port+7);
-	return 0;
-}
-
-
-int get_buffered_int(void)
-{
-int temp;
-
-	if(irq == 0)
-	{
-	    temp = get_int();
-	    if(temp)
-			clr_int(temp);
-	    return temp;
-	}
-
-	if(outptr != inptr)
-	{
-	    temp = int_buffer[outptr++];
-	    if(outptr == MAX_INTS)
-			outptr = 0;
-	    return temp;
-	}
-
-	return 0;
-}
-
Index: mmio/pcmmio_shell.c
===================================================================
--- pcmmio/pcmmio_shell.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,86 +1,0 @@
-/*
- *  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 <rtems.h>
-#include <multiio_commands.h>
-#include <multiio.h>
-
-rtems_task Init(
-  rtems_task_argument ignored
-)
-{
-  /*
-   *  Display a herald with some hints on usage
-   */
-  printf(
-    "\n"
-    "\n"
-    "*** Shell Configured with Multi IO Commands ***\n"
-    "Multi IO Configuration: %s\n"
-    "Type \"help multiio\" for more information\n"
-    "\n",
-    rtems_multiio_get_name()
-  );
-  rtems_shell_init(
-    "SHLL",                          /* task_name */
-    RTEMS_MINIMUM_STACK_SIZE * 4,    /* task_stacksize */
-    100,                             /* task_priority */
-    "/dev/console",                  /* devname */
-    false,                           /* forever */
-    true,                            /* wait */
-    NULL                             /* login */
-  );
-}
-
-/* RTEMS configuration */
-
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-#ifdef RTEMS_BSP_HAS_IDE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER
-#endif
-#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
-#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
-
-#define CONFIGURE_MICROSECONDS_PER_TICK     1000
-
-#define CONFIGURE_MAXIMUM_TASKS                  20
-#define CONFIGURE_MAXIMUM_SEMAPHORES             20
-#define CONFIGURE_MAXIMUM_BARRIERS                3
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES          1
-#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
-
-/*
- * discrete in messages are 12 bytes and there are 1024 of them 
- */
-#define CONFIGURE_MESSAGE_BUFFER_MEMORY \
-        CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(1024, 12)
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_EXTRA_TASK_STACKS         (6 * RTEMS_MINIMUM_STACK_SIZE)
-#define CONFIGURE_INIT_TASK_ATTRIBUTES      RTEMS_FLOATING_POINT
-
-#define CONFIGURE_STACK_CHECKER_ENABLED
-#define CONFIGURE_MALLOC_STATISTICS
-
-#define CONFIGURE_INIT
-#include <rtems/confdefs.h>
-
-#define CONFIGURE_SHELL_USER_COMMANDS \
-  CONFIGURE_MULTIIO_COMMANDS
-#define CONFIGURE_SHELL_USER_ALIASES \
-  CONFIGURE_MULTIIO_ALIASES
-
-#define CONFIGURE_SHELL_COMMANDS_INIT
-#define CONFIGURE_SHELL_COMMANDS_ALL
-
-#include <rtems/shellconfig.h>
-
Index: mmio/rootfs/set_adc_modes
===================================================================
--- pcmmio/rootfs/set_adc_modes	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,3 +1,0 @@
-#! joel
-echo "Setting all ADCs to +/-10V (bipolar) and single ended"
-multiio_adc_mode 0 15
Index: mmio/rootfs/test_adc
===================================================================
--- pcmmio/rootfs/test_adc	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,54 +1,0 @@
-#! joel
-
-echo "*** assume dac 4 is connected to ADC 0 ***"
-echo "Cycle from -5v to +5v with one second between on dac 4"
-
-multiio_dac 4 -5.0
-sleep 1
-multiio_adc 0
-
-multiio_dac 4 -4.0
-sleep 1
-multiio_adc 0
-
-multiio_dac 4 -3.0
-sleep 1
-multiio_adc 0
-
-multiio_dac 4 -2.0
-sleep 1
-multiio_adc 0
-
-multiio_dac 4 -1.0
-sleep 1
-multiio_adc 0
-
-multiio_dac 4 0.0
-sleep 1
-multiio_adc 0
-
-multiio_dac 4 1.0
-sleep 1
-multiio_adc 0
-
-multiio_dac 4 2.0
-sleep 1
-multiio_adc 0
-
-multiio_dac 4 3.0
-sleep 1
-multiio_adc 0
-
-multiio_dac 4 4.0
-sleep 1
-multiio_adc 0
-
-multiio_dac 4 5.0
-sleep 1
-multiio_adc 0
-
-echo "Write 0.0v to dac 4"
-multiio_dac 4 0.0
-sleep 1
-multiio_adc 0
-
Index: mmio/wscript
===================================================================
--- pcmmio/wscript	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,52 +1,0 @@
-# Copyright 2013 Gedare Bloom (gedare@rtems.org)
-# Copyright 2014 Chirayu Desai (chirayudesai1@gmail.com)
-#
-# This file's license is 2-clause BSD as in this distribution's LICENSE.2 file.
-#
-
-import os
-
-import rtems_waf.rtems as rtems
-version = "1.0.0"
-
-## FilesystemImage processing
-from waflib.Task import Task
-from waflib.TaskGen import extension
-class bin2c(Task):
-  run_str = '${RTEMS_BIN2C} ${SRC} ${TGT[0].abspath()} && ' + \
-            'touch ${TGT[1].abspath()}'
-  ext_out = ['.h']
-
-@extension('FilesystemImage')
-def process_FilesystemImage(self, node):
-  c_node = node.change_ext('.c')
-  h_node = node.change_ext('.h')
-  self.create_task('bin2c', node, [c_node, h_node])
-  self.source.append(c_node)
-
-def build(bld):
-    rtems.build(bld)
-
-    bld.set_group('programs')
-    arch_bsp = bld.get_env()['RTEMS_ARCH_BSP']
-    arch = bld.get_env()['RTEMS_ARCH']
-    bsp = bld.get_env()['RTEMS_BSP']
-    cflags = bld.get_env()['CFLAGS']
-
-    #
-    # The include paths and defines.
-    #
-    bld.includes = ['.', '../include',  '../commands']
-    bld.defines = ['PACKAGE_VERSION="' + version + '"']
-    bld(rule='tar -C ' + bld.path.find_dir('rootfs').abspath() + \
-              ' -cf ${TGT} .',
-        target='FilesystemImage')
-
-    bld(features = 'c cprogram',
-        target = 'pcmmio_shell.exe',
-        includes = bld.includes,
-        defines = bld.defines,
-        cflags = cflags,
-        stlib = 'miocmds',
-        stlibpath= [os.path.join(bld.path.get_bld().abspath(), '../commands')],
-        source = 'pcmmio_shell.c mio_io.c mio_io_rtems.c multiio_pcmmio.c FilesystemImage')
Index: d6425/.cvsignore
===================================================================
--- rtd6425/.cvsignore	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,1 +1,0 @@
-o-optimize
Index: d6425/ChangeLog
===================================================================
--- rtd6425/ChangeLog	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,5 +1,0 @@
-2011-10-05	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* .cvsignore, ChangeLog, Makefile, multiio_rtd6425.c, rtd6425.c,
-	rtd6425.h: New files.
-
Index: d6425/Makefile
===================================================================
--- rtd6425/Makefile	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,36 +1,0 @@
-#
-#  Example Library Makefile
-#
-
-#
-#  RTEMS_MAKEFILE_PATH is typically set in an environment variable
-#
-
-VPATH=.:../stub
-LIB=${ARCH}/librtd6425.a
-
-# C source names
-CSRCS = multiio_rtd6425.c rtd6425.c
-COBJS = $(CSRCS:%.c=${ARCH}/%.o)
-
-EXTERNAL_H_FILES= rtd6425.h
-
-include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
-include $(RTEMS_CUSTOM)
-include $(PROJECT_ROOT)/make/leaf.cfg
-
-CLEAN_ADDITIONS += $(LIB)
-
-DEFINES += -I ../include
-
-OBJS= $(COBJS)
-
-all:    ${ARCH} $(LIB)
-
-$(LIB): $(OBJS)
-	$(AR) crv $(LIB) $(OBJS)
-
-install: all
-	$(INSTALL_VARIANT) -m 555 ${LIB} ${PROJECT_RELEASE}/lib
-	$(INSTALL_VARIANT) -m 555 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include
-
Index: d6425/multiio_rtd6425.c
===================================================================
--- rtd6425/multiio_rtd6425.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,122 +1,0 @@
-/*
- *  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 "multiio.h"
-#include "rtd6425.h"
-#include <stdint.h>
-#include <rtems.h>
-
-int rtems_multiio_initialize(void)
-{
-  /*
-   *  Initialize the RTD6425 module to use IRQ 11 and 7.  This is sofware
-   *  programmable.  Ours is jumpered for 0x300  base address.  
-   *  We use discrete input interrupts so enable all of the
-   *  as edge triggered on 1.
-   */
-  rtd6425_initialize(0x300, 10, 11);
-  rtd6425_enable_dio_interrupt();
-
-/*  XXX - Enabling all interrupts atm
-  { int i;
-    for (i=1 ; i<=RTD6425_DISCRETE_IO_BITS ; i++ )
-      rtd6425_dio_enab_bit_int(i, 1);
-  }
-*/
-  return 0;
-}
-
-const char *rtems_multiio_get_name(void)
-{
-  return "RTD6425";
-}
-
-/*
- *  ADC
- */
-int rtems_adc_get_maximum(void)
-{
-  return RTD6425_ADCs;
-}
-
-float rtems_adc_get_channel_voltage(int adc)
-{
-  return rtd6425_adc_get_channel_voltage(adc);
-}
-
-/*
- *  DAC
- */
-int rtems_dac_get_maximum(void)
-{
-  return RTD6425_DACs;
-}
-
-float rtems_dac_get_minimum_voltage(void)
-{
-  return RTD6425_VOLTAGE_MINIMUM;
-}
-
-float rtems_dac_get_maximum_voltage(void)
-{
-  return RTD6425_VOLTAGE_MAXIMUM;
-}
-
-int rtems_set_dac_voltage(int dac, float voltage)
-{
-  rtd6425_set_dac_voltage(dac, voltage);
-  return 0;
-}
-
-/*
- *  Discrete Outputs
- */
-int rtems_dout_get_maximum(void)
-{
-  return RTD6425_DISCRETE_IO_BITS;
-}
-
-int rtems_set_dout(int dout, int value)
-{
-  rtd6425_dio_write_bit(dout, value);
-  return 0;
-}
-
-/*
- *  Discrete Inputs
- */
-int rtems_din_get_maximum(void)
-{
-  return RTD6425_DISCRETE_IO_BITS;
-}
-
-int rtems_din_get(int din)
-{
-  return rtd6425_dio_read_bit(din);
-}
-
-int rtems_din_flush_buffered_interrupts(void)
-{
-  rtd6425_flush_buffered_ints();
-  return 0;
-}
-
-int rtems_din_wait_interrupt_with_timestamp(
-  int                milliseconds,
-  struct timespec   *timestamp
-)
-{
-  rtems_status_code sc;
-
-  sc = rtd6425_wait_dio_int_with_timestamp(milliseconds, timestamp);
-  return sc;
-}
-
Index: d6425/rtd6425.c
===================================================================
--- rtd6425/rtd6425.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,939 +1,0 @@
-/*
- *  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$
- */
-
-#define LIB_DEFINED
-
-/* #define DEBUG 1 */
-
-#include <bsp.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "rtd6425.h"
-#include <bsp/irq.h>
-
-/* RTEMS Ids for Wait Queues */
-rtems_id     rtd6425_dio_wq;
-unsigned int rtd6425_dio_missed_interrupts;
-
-
-typedef struct {
-  uint16_t  irq;
-  uint8_t   irqmask;
-  uint8_t   previous;
-} rtd6425_control_t;
-
-rtd6425_control_t rtd6425_info[2];
-
-/*
- *  Limits on number of buffered discrete input interrupts in
- *  the message queue.
- */
-#define MAXIMUM_BUFFERED_DISCRETE_INTERRUPTS 1024
-
-typedef struct {
-  struct timespec timestamp;
-  int             pin;
-} rtd6425_din_message_t;
-
-typedef struct {
-  uint8_t  p0_direction; /* each bit 1 == output, 0 == input */
-  bool     p1_direction; /* true when all output */
-  uint8_t  p2_direction; /* each bit 1 == output, 0 == input */
-  bool     p3_direction; /* true when all output */
-  uint16_t control_reg;  /* value to program the conrtol register */
-  uint16_t irq_reg;      /* value to program the irq register */
-} rtd6425_config_t;
-
-rtd6425_config_t rtd6425_configuration = {
-  0x00,   /* p0_direction - each bit 1 == output, 0 == input */
-  false,  /* p1_direction - true when all output */
-  0x00,   /* p2_direction - each bit 1 == output, 0 == input */
-  false,  /* p3_direction - true when all output */
-  0x00,
-  0x00
-};
-
-typedef enum  {
-  RTD6425_ADC_RANGE_NEG_5_TO_5   = 0x0,
-  RTD6425_ADC_RANGE_NEG_10_TO_10 = 0x1,
-  RTD6425_ADC_RANGE_0_TO_10      = 0x2
-} rtd6425_adc_range_t;
-
-typedef enum  {
-  RTD6425_ADC_GAIN_NONE = 0x0,
-  RTD6425_ADC_GAIN_X1   = 0x1,
-  RTD6425_ADC_GAIN_X2   = 0x2,
-  RTD6425_ADC_GAIN_X4   = 0x4,
-  RTD6425_ADC_GAIN_X8   = 0x8, 
-} rtd6425_adc_gain_t; 
-
-typedef enum {
-  RTD6425_ADC_SINGLE_ENDED = 0,
-  RTD6425_ADC_DIFFERENTIAL = 1
-} rtd6425_adc_se_diff_t;
-
-typedef struct {
-   rtd6425_adc_range_t   range;
-   rtd6425_adc_gain_t    gain;
-   rtd6425_adc_se_diff_t se_diff;
-} rtd6425_adc_config_t;
-
-#define RTD6425_ADC_DEFAULT_CONFIGURATION \
-  { RTD6425_ADC_RANGE_NEG_10_TO_10, RTD6425_ADC_GAIN_NONE, RTD6425_ADC_SINGLE_ENDED }
-
-rtd6425_adc_config_t rtd6425_adc_configuration[ RTD6425_ADCs ] = {
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 00 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 01 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 02 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 03 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 04 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 05 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 06 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 07 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 08 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 09 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 10 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 11 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 12 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 13 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 14 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 15 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 16 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 17 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 18 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 19 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 20 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 21 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 22 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 23 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 24 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 25 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 26 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 27 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 28 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 29 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 30 */
-  RTD6425_ADC_DEFAULT_CONFIGURATION,  /* ADC 31 */
-};
-
-bool rtd6425_is_writable( int pin )
-{
-  int      port;
-  int      position;
-  uint8_t  mask;
-
-  port  = pin / 8;
-
-  if ( port == 1 ) {
-    if ( rtd6425_configuration.p1_direction == true )
-      return false;
-    return true;
-  }
-
-  if ( port == 3 ) {
-    if ( rtd6425_configuration.p3_direction == true )
-      return false;
-    return true;
-  }
-
-  if ( port == 0 ) 
-    mask = rtd6425_configuration.p0_direction;
-  else
-    mask = rtd6425_configuration.p2_direction;
-
-  position = pin / 8;
-  if ( (mask & (1 << position)) != 0 )
-    return true;
-
-  return false;
-}
-
-#if 1
-  #define DEBUG_PRINT(...) printk( __VA_ARGS__ )
-#else
-  #define DEBUG_PRINT(...) 
-#endif
-
-#define rtd6425_outport_byte( _port, _value ) \
-  do { \
-    DEBUG_PRINT( "OUTB 0x%04x to 0x%04x\n", _value, _port ); \
-    outport_byte( _port, _value ); \
-  } while (0)
-
-#define rtd6425_inport_byte( _port, _value ) \
-  do { \
-    inport_byte( _port, _value ); \
-    DEBUG_PRINT( "INB 0x%04x from 0x%04x\n", _value, _port ); \
-  } while (0)
-
-#define rtd6425_outport_word( _port, _value ) \
-  do { \
-    DEBUG_PRINT( "OUTW 0x%04x to 0x%04x\n", _value, _port ); \
-    outport_word( _port, _value ); \
-  } while (0)
-
-#define rtd6425_inport_word( _port, _value ) \
-  do { \
-    inport_word( _port, _value ); \
-    DEBUG_PRINT( "INW 0x%04x from 0x%04x\n", _value, _port ); \
-  } while (0)
-
-uint16_t rtd6425_base;
-
-#define DIO_SELECT_CLEAR      0 
-#define DIO_SELECT_DIRECTION  1
-#define DIO_SELECT_MASK       2
-#define DIO_SELECT_COMPARE    3
-
-void rtd6425_DIO_select_register(uint8_t port, uint8_t reg)
-{
-  uint8_t value;
-
-  rtd6425_inport_byte(
-    rtd6425_base  + RTD6425_MODE_5812 + (port * 0x400),
-    value
-  );
-
-DEBUG_PRINT("select_reg1: port: %d, reg: %d, val: 0x%02x\n", port, reg, value);
-
-  value &= 0xFC;
-  value |= reg;
-  
-  rtd6425_outport_byte( rtd6425_base + RTD6425_MODE_5812 + (port * 0x400), value);
-
-  rtd6425_inport_byte(
-    rtd6425_base  + RTD6425_MODE_5812 + (port * 0x400),
-    value
-  );
-
-DEBUG_PRINT("select_reg2: port: %d, reg: %d, val: 0x%02x\n", port, reg, value);
-}
-
-void rtd6425_write_dio_status(uint8_t chip, uint8_t mask, uint8_t new)
-{
-  uint8_t value;
-
-  rtd6425_inport_byte(
-    rtd6425_base  + RTD6425_MODE_5812 + (chip * 0x400),
-    value
-  );
-
-  DEBUG_PRINT("write_dio_status1: chip: %d, mask: %d, val: 0x%02x\n", chip, mask, value);
-
-
-  value &= 0xFC;
-  value &= ~mask;
-  value |= new;
-
-  rtd6425_outport_byte( rtd6425_base + RTD6425_MODE_5812 + (chip * 0x400), value);
-
-  rtd6425_inport_byte(
-    rtd6425_base  + RTD6425_MODE_5812 + (chip * 0x400),
-    value
-  );
-
-  DEBUG_PRINT("write_dio_status2: chip: %d, mask: %d, val: 0x%02x\n", chip, mask, value);
-
-}
-
-uint8_t rtd6425_read_dio_status( uint8_t chip )
-{
-  uint8_t value;
-
-  rtd6425_inport_byte(
-    rtd6425_base  + RTD6425_MODE_5812 + (chip * 0x400),
-    value
-  );
-
-  DEBUG_PRINT("read_dio_status: chip: %d val: 0x%02x\n", chip, value);
-
-  return value;
-}
-
-void rtd6425_din_queue_create(
-  rtems_name  name,
-  rtems_id   *id
-)
-{
-  rtems_status_code rc;
-
-  rc = rtems_message_queue_create(
-    name,
-    MAXIMUM_BUFFERED_DISCRETE_INTERRUPTS,
-    sizeof(rtd6425_din_message_t),
-    RTEMS_DEFAULT_ATTRIBUTES,
-    id
-  );
-  if ( rc == RTEMS_SUCCESSFUL )
-    return;
-
-  DEBUG_PRINT( "Unable to create RTD6425 DIN IRQ Message Queue\n" );
-  exit(1);
-}
-
-void rtd6425_initialize(
-  unsigned short base_port,
-  unsigned short irq0,
-  unsigned short irq1
-)
-{
-  uint16_t ignored;
-  uint16_t value;
-  int      i;
-
-  /* Create RTEMS Objects */
-  rtd6425_din_queue_create(
-    rtems_build_name( 'd', 'i', 'o', ' ' ),
-    &rtd6425_dio_wq
-  );
-  rtd6425_dio_missed_interrupts = 0;
-
-printf( "RTD6426 Init( 0x%04x, 0x%04x, 0x%04x )\n", base_port, rtd6425_info[0].irq, rtd6425_info[1].irq );
-  rtd6425_base = base_port;
-  rtd6425_info[0].irq = irq0;
-  rtd6425_info[1].irq  = irq1;
-
-  /*
-   * Validate ADC Table.
-   */
-  for( i=0; i<RTD6425_ADCs; i=i+2 ) {
-    if ( rtd6425_adc_configuration[i].se_diff != 
-         rtd6425_adc_configuration[i].se_diff ) {
-      DEBUG_PRINT("Error==> ADC single ended mismatch\n");
-      exit (0);
-    } 
-
-    if ( rtd6425_adc_configuration[i].se_diff == RTD6425_ADC_DIFFERENTIAL ) {
-      if (rtd6425_adc_configuration[i].range != 
-         rtd6425_adc_configuration[i].range ) {
-        DEBUG_PRINT("Error==> ADC range mismatch - Either choose single ended or match the range of the twisted pair\n");
-        exit (0);
-      }
-    }
-  }
-
-  /*
-   *  Reset Board and clear it out
-   */
-  rtd6425_outport_word( rtd6425_base + RTD6425_CLEAR, 0x0001 );
-  rtd6425_inport_word( rtd6425_base + RTD6425_CLEAR, ignored );
-
-  /*
-   *  Clear ADDMADone
-   */
-  rtd6425_outport_word( rtd6425_base + RTD6425_CLEAR, 0x0004 );
-  rtd6425_inport_word( rtd6425_base + RTD6425_CLEAR, ignored );
-
-  /*
-   * Clear Gain Table
-   */
-  rtd6425_outport_word( rtd6425_base + RTD6425_CLEAR, 0x0008 );
-  rtd6425_inport_word( rtd6425_base + RTD6425_CLEAR, ignored );
-
-  /*
-   *  Clear ADC FIFOs
-   */
-  rtd6425_outport_word( rtd6425_base + RTD6425_CLEAR, 0x0002 );
-  rtd6425_inport_word( rtd6425_base + RTD6425_CLEAR, ignored );
-
-  /*
-   *  Clear DIN FIFOs
-   */
-  rtd6425_outport_word( rtd6425_base + RTD6425_CLEAR, 0x0020 );
-  rtd6425_inport_word( rtd6425_base + RTD6425_CLEAR, ignored );
-
-  /*
-   * Program Discrete I/O directions
-   */
-  rtd6425_DIO_select_register( 0, DIO_SELECT_DIRECTION ); 
-  rtd6425_outport_word(
-    rtd6425_base + RTD6425_PORT_DIR_5812 + (0*0x400),
-    rtd6425_configuration.p0_direction
-  );
-
-  rtd6425_write_dio_status(
-    0,
-    0x04, 
-    (rtd6425_configuration.p1_direction) ? 0x04 : 0x00
-  );
-
-  rtd6425_DIO_select_register( 1, DIO_SELECT_DIRECTION ); 
-  rtd6425_outport_word(
-    rtd6425_base + RTD6425_PORT_DIR_5812 + (1*0x400),
-    rtd6425_configuration.p2_direction
-  );
-
-  rtd6425_write_dio_status(
-    1,
-    0x04, 
-    (rtd6425_configuration.p1_direction) ? 0x04 : 0x00
-  );
-DEBUG_PRINT("END: Program discrete I/O directions\n");
-
-  rtd6425_outport_word( rtd6425_base + RTD6425_TRIGGER, 0x00 );
-
-  /*
-   * Set the
-   */
-  //Enable loading channel gain latch
-  rtd6425_configuration.control_reg  &= 0xFFFC;
-  rtd6425_outport_word( rtd6425_base + RTD6425_CONTROL, rtd6425_configuration.control_reg );
-  
-  for( i=0; i<RTD6425_ADCs; i++) {
-  value = (i) | 
-          (rtd6425_adc_configuration[i].gain << 5) | 
-          (rtd6425_adc_configuration[i].range << 8) | 
-          (rtd6425_adc_configuration[i].se_diff << 10);
-
-    rtd6425_outport_word( rtd6425_base + RTD6425_CHANNEL_GAIN, value );
-  }
-DEBUG_PRINT("End ADC setup\n");
-}
-
-void rtd6425_chip_mode_select( uint8_t chip )
-{
-    uint8_t value;
-    uint8_t mode = 0; /* Event Mode */ 
-
-    /* Clear Bit to set to event mode */
-    rtd6425_inport_byte(
-      rtd6425_base  + RTD6425_MODE_5812 + (chip * 0x400),
-      value
-    );
-    value  &= 0xf7;
-    value |= (mode << 3);
-    rtd6425_outport_byte( 
-      rtd6425_base + RTD6425_MODE_5812 + (chip * 0x400), 
-      value
-    );
-}
-
-void rtd6425_set_IRQ(uint8_t chip, uint16_t source, uint16_t channel)
-{
-  uint16_t value;
-
-  switch(channel) {
-      case 3:  channel = 1; break;
-      case 5:  channel = 2; break;
-      case 9:  channel = 3; break;
-      case 10: channel = 4; break;
-      case 11: channel = 5; break;
-      case 12: channel = 6; break;
-      case 15: channel = 7; break;
-      default: channel = 0; break;
-  }
-   
-  if (chip == 0) 
-    rtd6425_configuration.irq_reg = 
-      rtd6425_configuration.irq_reg & 0xff00;
-  else
-    rtd6425_configuration.irq_reg = 
-      rtd6425_configuration.irq_reg & 0x00ff;
-
-  value = source | (channel << 5);
-  rtd6425_configuration.irq_reg |= value << (chip*8);
-  rtd6425_outport_word( 
-    rtd6425_base + RTD6425_IRQ, 
-    rtd6425_configuration.irq_reg 
-  );
-}
-
-void rtd6425_enable_interrupt(uint8_t chip, uint8_t enable)
-{
-  uint8_t value;
-
-  rtd6425_info[chip].irqmask  = (enable) ? 0xff : 0;
-  rtd6425_inport_byte(
-    rtd6425_base + (chip * 0x400) + RTD6425_PORT_0_5812,
-    rtd6425_info[chip].previous
-  );
-
-  /* Clear Bit to set to event mode */
-  rtd6425_inport_byte(
-    rtd6425_base  + RTD6425_MODE_5812 + (chip * 0x400),
-    value
-  );
-  value &= 0xef;
-  value |= (enable << 4);
-  rtd6425_outport_byte( 
-    rtd6425_base + RTD6425_MODE_5812 + (chip * 0x400), 
-    value
-  );
-}
-
-void rtd6425_dio_check_pin_change(
-  uint8_t                 base_bit,
-  uint8_t                 previous,
-  uint8_t                 current,
-  uint8_t                 mask,
-  rtd6425_din_message_t  *din
-)
-{
-  uint8_t            changed;
-  int                pin;
-  int                pin_mask;
-  rtems_status_code  rc;
-
-  /*
-   * Calculate which bits changed that we care about
-   */
-  changed = (previous ^ current) & mask;
-
-  // printk( "check: %d prev=0x%02x curr=0x%02x mask=0x%02x\n", 
-  //    base_bit, previous, current, mask );
-
-  for ( pin=0 ; changed != 0 && pin<8 ; pin++ ) {
-    pin_mask = 1 << pin;
-    if ( (changed & pin_mask) == 0 )
-      continue;
-
-    din->pin = base_bit + pin;
-    // printk( "check: %d changed\n", din->pin );
-    rc = rtems_message_queue_send(
-      rtd6425_dio_wq,
-      din,
-      sizeof(rtd6425_din_message_t)
-    );
-    if ( rc != RTEMS_SUCCESSFUL ) {
-      rtd6425_dio_missed_interrupts++;
-      DEBUG_PRINT("<1>Missed DIO interrupt %d\n", rc );
-    }
-    changed &= ~pin_mask;
-  }
-}
-
-void  rtd6425_clear_Irq6425( void )
-{
-    uint16_t value;
-
-    /* ClearIRQ16425 */
-    rtd6425_outport_word( rtd6425_base  + RTD6425_CLEAR, 0x00C0 );
-    rtd6425_inport_word( rtd6425_base  + RTD6425_CLEAR, value );
-}
-
-void  rtd6425_clear_Irq5812(uint8_t chip)
-{
-  uint8_t value;
-
-  rtd6425_DIO_select_register(chip, 0);
-  rtd6425_inport_byte(
-    rtd6425_base  + RTD6425_CLEAR_5812 + (chip * 0x400),
-    value
-  );
-}
-
-rtems_isr rtd6425_dio_handler(void *arg);
-
-rtems_irq_connect_data rtd6425_dio_cd0 = {
- 0, rtd6425_dio_handler, (void *) &rtd6425_dio_cd0, NULL, NULL, NULL, NULL
-};
-rtems_irq_connect_data rtd6425_dio_cd1 = {
- 0, rtd6425_dio_handler, (void *) &rtd6425_dio_cd1, NULL, NULL, NULL, NULL
-};
-
-int rtd6425_enable_dio_interrupt(void)
-{
-     int i;
-     uint8_t mask, status;
-  uint8_t v8;
-DEBUG_PRINT("Start  rtd6425_enable_dio_interrupt\n");
-
-  /* Set IRQ Source Digital IO. */
-  /* XXX - Verify this */
-  rtd6425_set_IRQ(0, 10, rtd6425_info[0].irq );
-  rtd6425_set_IRQ(1, 16, rtd6425_info[1].irq );
-
-  rtd6425_dio_cd0.name = rtd6425_info[0].irq;
-  rtd6425_dio_cd1.name = rtd6425_info[1].irq;
-
-  /* Install handler for each irq */
-  BSP_install_rtems_shared_irq_handler( &rtd6425_dio_cd0 );
-  BSP_install_rtems_shared_irq_handler( &rtd6425_dio_cd1 );
-
-  // insure there won't be any interrupts from preset values on ports 0/1
-  rtd6425_outport_byte(
-    rtd6425_base + RTD6425_PORT_0_5812 + (0 * 0x400) + (1 * 2),
-    0Xff
-  );
-  rtd6425_outport_byte( 
-    rtd6425_base + RTD6425_PORT_0_5812 + (1 * 0x400) + (1 * 2), 
-    0Xff
-  );
-
-  // set event mode for port interrupt
-  rtd6425_chip_mode_select( 0 );
-  rtd6425_chip_mode_select( 1 );
-
-  // insures that no bits will be masked for interrupts
-  DEBUG_PRINT("Set Mask for chip\n");
-  rtd6425_DIO_select_register(0, 2 );
-  rtd6425_outport_byte( 
-    rtd6425_base + RTD6425_PORT_MASK_5812 + (0  * 0x400) , 
-    0x00
-  );
-  rtd6425_DIO_select_register(1, 2 );
-  rtd6425_outport_byte( 
-     rtd6425_base + RTD6425_PORT_MASK_5812 + (1  * 0x400) , 
-    0x00
-  );
-
-  DEBUG_PRINT("Turn interrupts on\n");
-  rtd6425_enable_interrupt(0, 1);         // enable interrupt circuit at Port
-  rtd6425_enable_interrupt(1, 1);         // enable interrupt circuit at Port
-  
-  /* ClearIrq5812(PORTSELECT01); */
-  rtd6425_DIO_select_register( 0, 0 );
-  rtd6425_inport_byte( rtd6425_base + (0 * 0x400)  + RTD6425_CLEAR_5812, v8 );
-  rtd6425_DIO_select_register( 1, 0 );
-  rtd6425_inport_byte( rtd6425_base + (1 * 0x400)  + RTD6425_CLEAR_5812, v8 );
-   rtd6425_clear_Irq6425();
-
-  rtd6425_clear_Irq5812(0);
-  rtd6425_clear_Irq5812(1);
-
-  
-  for (i=0; i<2;i++){
-     rtd6425_inport_byte( 
-      rtd6425_base + RTD6425_PORT_MASK_5812 + (i  * 0x400), 
-      mask
-    );
-     rtd6425_inport_byte( 
-      rtd6425_base + RTD6425_STATUS_5812 + (i  * 0x400), 
-      status
-    ); 
-    printk( "chip %d Mask: 0x%x Status: 0x%x IRQ: 0x%x\n",
-      i,mask, status, rtd6425_configuration.irq_reg
-    );
-  }
-
-  DEBUG_PRINT("Return from rtd6425_enable_dio_interrupt\n");
-
-  return 0;
-}
-
-int rtd6425_dio_enab_bit_int(int bit_number, int polarity)
-{
-  int       dio_port;
-  uint8_t   value;
-  uint8_t   mask;
-  uint16_t  io_port;
-  uint8_t   new;
-
-  if ( bit_number > RTD6425_DISCRETE_IO_BITS )
-    return -1;
-
-  dio_port = bit_number / 8;
-  mask     = 1 << (bit_number % 8);
-  new      = ((polarity) ? mask : 0);
-  mask     = ~mask;
-
-  switch ( dio_port ) {
-    case 0: io_port = RTD6425_PORT_0_5812;         break;
-    case 1: io_port = RTD6425_PORT_1_5812;         break;
-    case 2: io_port = RTD6425_PORT_0_5812 + 0x400; break;
-    case 3: io_port = RTD6425_PORT_1_5812 + 0x400; break;
-    default: return -1;
-  }
-
-  rtd6425_DIO_select_register(0, 2 );
-
-  // read the mask register and calculate the field
-  rtd6425_inport_byte( 
-    rtd6425_base + RTD6425_PORT_MASK_5812 + (0  * 0x400), 
-    value
-  );
-
-DEBUG_PRINT("read interrupt mask 0x%x\n", value);
-  value &= mask;
-  value |= ~mask;
-DEBUG_PRINT("write interrupt mask 0x%x\n", value);
-
-  // write the value to the mask register
-  rtd6425_DIO_select_register(0, 2 );
-  rtd6425_outport_byte( 
-    rtd6425_base + RTD6425_PORT_MASK_5812 + (0  * 0x400) , 
-    value
-  );
-
-
-  return 0;
-}
-
-void rtd6425_flush_buffered_ints(void)
-{
-}
-
-int  rtd6425_wait_dac_int_with_timeout(int dac_num, int milliseconds)
-{
-  return 0;
-}
-
-int  rtd6425_wait_dio_int_with_timeout(int milliseconds)
-{
-  return 0;
-}
-
-int  rtd6425_wait_dio_int_with_timestamp(
-  int              milliseconds,
-  struct timespec *timestamp
-)
-{
-  rtems_status_code      rc;
-  rtd6425_din_message_t  din;
-  size_t                 received;
-
-  mio_error_code = MIO_SUCCESS;
-
-  rc = rtems_message_queue_receive(
-    rtd6425_dio_wq,
-    &din,
-    &received,
-    RTEMS_DEFAULT_OPTIONS,
-    RTEMS_MILLISECONDS_TO_TICKS(milliseconds)
-  );
-  if ( rc == RTEMS_UNSATISFIED ) {
-    mio_error_code = MIO_READ_DATA_FAILURE;
-    return -1;
-  }
-
-  if ( rc == RTEMS_TIMEOUT ) {
-    mio_error_code = MIO_TIMEOUT_ERROR;
-    return -1;
-  }
-
-  if ( rc != RTEMS_SUCCESSFUL ) {
-    DEBUG_PRINT( "wait_dio_int_with_timestamp - error %d\n", rc );
-    exit( 0 );
-  }
-
-  if (timestamp)
-    *timestamp = din.timestamp;
-  return din.pin;
-}
-
-int rtd6425_dio_get_missed_interrupts(void)
-{
-  return 0;
-}
-
-float rtd6425_adc_get_channel_voltage(int channel)
-{ 
-  int16_t  value;
-  float    result = 0;
-
-  rtd6425_outport_word( rtd6425_base + RTD6425_CLEAR, 0x0002 );
-  rtd6425_inport_word( rtd6425_base + RTD6425_CLEAR, value );
-
-  rtd6425_configuration.control_reg  &= 0xFFFC;    //Enable loading channel gain latch
-  rtd6425_outport_word( rtd6425_base + RTD6425_CONTROL, rtd6425_configuration.control_reg );
- 
-  value = (channel) | 
-          (rtd6425_adc_configuration[channel].gain << 5) | 
-          (rtd6425_adc_configuration[channel].range << 8) | 
-          (rtd6425_adc_configuration[channel].se_diff << 10);
-
-  rtd6425_outport_word( rtd6425_base + RTD6425_CHANNEL_GAIN, value );
-
-  /* Start Conversion */
-  rtd6425_inport_word( rtd6425_base +  RTD6425_START_CONVERSION, value );
-  
-  /* Wait on Fifo to not be empty */
-   while ( ( value & 0x1 ) == 0 )
-     rtd6425_inport_word( rtd6425_base +  RTD6425_STATUS, value );
-    
-   rtd6425_inport_word( rtd6425_base +  RTD6425_AD, value );
-   value = value >> 3;
-   printf("ADC Read: 0x%03x\n", value );
-
-   switch( rtd6425_adc_configuration[channel].range ) {
-    case RTD6425_ADC_RANGE_NEG_5_TO_5:
-      result = (( 10.0 / 4095.0) * value);
-      break;
-    case RTD6425_ADC_RANGE_NEG_10_TO_10:
-      result = (( 20.0 / 4095.0) * value);
-      break;
-    case RTD6425_ADC_RANGE_0_TO_10:
-      result = (( 10.0 / 4095.0) * value);
-      break;
-   };
-
-   return result;
-}
-
-int rtd6425_set_dac_voltage(int channel, float voltage)
-{
-  uint16_t  value;
-  float     per_bit;
-  uint16_t  dac_setup;
-  uint16_t  range_select;
-
-  // printf( "Write DAC %d %fV\n", channel, voltage );
-  /*
-   * Read DAC Setup, clean out bits indicating DAC selected
-   */
-  rtd6425_inport_word( rtd6425_base + RTD6425_DA_SETUP, dac_setup );
-  dac_setup &= ~(3 << (channel * 2));
-
-  /*
-   *  Do some magic per range
-   */
-  if ( voltage >= 0.0 && voltage <= 5.0 ) {
-    per_bit      = 5.0 / 4095;
-    value        = (uint16_t) (voltage / per_bit);
-    range_select = RTD6425_DAC_0V_to_5V;
-  } else if ( voltage >= -5.0 && voltage <= 5.0 ) {
-    per_bit      = 10.0 / 4095;
-    value        = (uint16_t) ((voltage + 5.0) / per_bit);
-    range_select = RTD6425_DAC_MINUS_5V_TO_5V;
-  } else if ( voltage >= 0.0 && voltage <= 10.0 ) {
-    per_bit      = 10.0 / 4095;
-    value        = (uint16_t) (voltage / per_bit);
-    range_select = RTD6425_DAC_0V_TO_10V;
-  } else if ( voltage >= -10.0 && voltage <= 10.0 ) {
-    per_bit      = 20.0 / 4095;
-    value        = (uint16_t) ((voltage + 10.0) / per_bit);
-    range_select = RTD6425_DAC_MINUS_10_TO_10V;
-  } else {
-    printf( "Voltage is out of range %f\n", voltage );
-    return -1;
-  }
-
-  /*
-   * Select voltage range needed
-   */
-  dac_setup |= range_select << (channel * 2); 
-  rtd6425_outport_word( rtd6425_base + RTD6425_DA_SETUP, dac_setup );
-
-  /*
-   * Now write the selected voltage
-   */
-  rtd6425_outport_word( rtd6425_base + RTD6425_DAC_BASE + (channel * 2), value );
-  return 0;
-}
-
-int rtd6425_dio_read_bit(int bit_number)
-{
-  int       dio_port;
-  uint8_t   value;
-  uint8_t   mask;
-  uint16_t  io_port;
-
-  if ( bit_number > RTD6425_DISCRETE_IO_BITS )
-    return -1;
-
-  dio_port = bit_number / 8;
-  mask     = 1 << (bit_number % 8);
-
-  switch ( dio_port ) {
-    case 0: io_port = RTD6425_PORT_0_5812;         break;
-    case 1: io_port = RTD6425_PORT_1_5812;         break;
-    case 2: io_port = RTD6425_PORT_0_5812 + 0x400; break;
-    case 3: io_port = RTD6425_PORT_1_5812 + 0x400; break;
-    default: return -1;
-  }
-
-  rtd6425_inport_byte( rtd6425_base + io_port, value );
-  return ((value & mask) ? 1 : 0);
-}
-
-int rtd6425_dio_write_bit(int bit_number, int val)
-{
-  int       dio_port;
-  uint8_t   value;
-  uint8_t   mask;
-  uint16_t  io_port;
-  uint8_t   new;
-
-  if ( bit_number > RTD6425_DISCRETE_IO_BITS )
-    return -1;
-
-  dio_port = bit_number / 8;
-  mask     = 1 << (bit_number % 8);
-  new      = ((val) ? mask : 0);
-  mask     = ~mask;
-
-  switch ( dio_port ) {
-    case 0: io_port = RTD6425_PORT_0_5812;         break;
-    case 1: io_port = RTD6425_PORT_1_5812;         break;
-    case 2: io_port = RTD6425_PORT_0_5812 + 0x400; break;
-    case 3: io_port = RTD6425_PORT_1_5812 + 0x400; break;
-    default: return -1;
-  }
-
-  rtd6425_inport_byte( rtd6425_base + io_port, value );
-  value = (value & mask) | new;
-  rtd6425_outport_byte( rtd6425_base + io_port, value );
-  return 0;
-}
-
-bool rtd6425_is_chip_irq( uint8_t chip )
-{
-  uint8_t value;
-
-  rtd6425_inport_word( rtd6425_base +  RTD6425_STATUS, value );
-  if ( (value & 0x40) == 0 )    /* XXX - Validate this is correct bit. */
-    return false;
-
-  return true; 
-}
-
-/*
- * This is the RTD6425 DIO interrupt handler. It is called by the
- * actual hardware ISR.
- */
-rtems_isr rtd6425_dio_handler(void *arg)
-{
-  uint8_t                 chip;
-  uint8_t                 v8;
-  uint16_t                v16;
-  rtd6425_din_message_t   din;
-  rtems_irq_connect_data *irq_conn = (rtems_irq_connect_data *)arg;
-  uint16_t                base;
-
-  rtems_clock_get_uptime( &din.timestamp );
-
-printk("DIO ISR\n");
-
-  chip = (irq_conn == & rtd6425_dio_cd0) ? 0 : 1;
-  base = rtd6425_base + (chip * 0x400);
-
-  /* check pins changed for chip n, port 1 */
-  rtd6425_inport_word( base + RTD6425_PORT_0_5812, v8 );
-  rtd6425_dio_check_pin_change(
-    (chip == 0) ? 0 : 16,                 /* pins 0-7 or 16-23 */
-    rtd6425_info[chip].previous,          /* last value we saw */
-    v8,                                   /* current value */
-    rtd6425_info[chip].irqmask,           /* pins we care about */
-    &din                                  /* message */
-  );
-  rtd6425_info[chip].previous = v8;
-
-  /* ClearIRQ16425 */
-  rtd6425_outport_word( base + RTD6425_CLEAR, (0x0040<<chip) );
-  rtd6425_inport_word( base + RTD6425_CLEAR, v16 );
-
-  /* ClearIrq5812(PORTSELECT01); */
-  rtd6425_DIO_select_register( chip, 0 );
-  rtd6425_inport_byte( base  + RTD6425_CLEAR_5812, v8 );
-
-  rtd6425_clear_Irq5812(chip);
-  rtd6425_clear_Irq6425();
-
-  if ( irq_conn->name >= 8 ) {
-    rtd6425_outport_byte( 0x20, 0x20 );
-  } else {
-    rtd6425_outport_byte( 0xA0, 0x20 );
-  }
-
-  #ifdef DEBUG
-    DEBUG_PRINT("<1>Buffering DIO interrupt on bit %d\n",int_num);
-  #endif
-}
Index: d6425/rtd6425.h
===================================================================
--- rtd6425/rtd6425.h	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,135 +1,0 @@
-/*
- *  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$
- */
-
-#ifndef __RTD6425_h
-#define __RTD6425_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* These are the error codes for mio_error_code */
-
-#define MIO_SUCCESS 0
-#define MIO_OPEN_ERROR 1
-#define MIO_TIMEOUT_ERROR 2
-#define MIO_BAD_CHANNEL_NUMBER 3
-#define MIO_BAD_MODE_NUMBER 4
-#define MIO_BAD_RANGE 5
-#define MIO_COMMAND_WRITE_FAILURE 6
-#define MIO_READ_DATA_FAILURE 7
-#define MIO_MISSING_IRQ 8
-#define MIO_ILLEGAL_VOLTAGE 9
-
-/*
- *  Configuration information for multiio interface
- */
-#define RTD6425_DISCRETE_IO_BITS 31
-#define RTD6425_ADCs             32  /* 0 based for single ended */
-#define RTD6425_DACs             3   /* 0 based for 4 DACs */
-
-#define RTD6425_VOLTAGE_MAXIMUM  10.0
-#define RTD6425_VOLTAGE_MINIMUM  -10.0
-
-/*
- *  Register offsets
- */
-#define RTD6425_CLEAR                0  // Clear Register (Read/Write)
-#define RTD6425_STATUS               2  // Status Register (Read)
-#define RTD6425_CONTROL              2  // Control Register (Write)
-#define RTD6425_AD                   4  // AD Data (Read)
-#define RTD6425_CHANNEL_GAIN         4  // Channel/Gain Register (Write)
-#define RTD6425_AD_TABLE             4  // AD Table (Write)
-#define RTD6425_DIGITAL_TABLE        4  // Digital Table (Write)
-#define RTD6425_START_CONVERSION     6  // Start Conversion (Read)
-#define RTD6425_TRIGGER              6  // Trigger Register (Write)
-#define RTD6425_IRQ                  8  // IRQ Register (Write)
-#define RTD6425_DIN_FIFO             10 // Digital Input FIFO Data (Read)
-#define RTD6425_DIN_CONFIG           10 // Config Digital Input FIFO (Write)
-#define RTD6425_LOAD_AD_SAMPLE_COUNT 14 // Load A/D Sample Counter (Read)
-#define RTD6425_TIMER_CLCK0          16 // Timer/Counter 0 (Read/Write)
-#define RTD6425_TIMER_CLCK1          18 // Timer/Counter 1 (Read/Write)
-#define RTD6425_TIMER_CLCK2          20 // Timer/Counter 2 (Read/Write)
-#define RTD6425_TIMER_CTRL           22 // Timer/Counter Control Word (Write)
-
-#define RTD6425_PORT_0_5812          24 // Digital I/O Port 0 Register
-#define RTD6425_PORT_1_5812          26 // Digital I/O Port 1 Register
-#define RTD6425_PORT_DIR_5812        28 // Digital I/O Port 0 Direction Register
-#define RTD6425_PORT_MASK_5812       28 // Digital I/O Port 0 Mask Register
-#define RTD6425_PORT_COMP_5812       28 // Digital I/O Port 0 Compare Register
-#define RTD6425_CLEAR_5812           28 // Digital I/O Clear Register
-#define RTD6425_STATUS_5812          30 // Digital I/O Status Register
-#define RTD6425_MODE_5812            30 // Digital I/O Mode Register
-
-
-#define RTD6425_DA_SETUP             0x400
-#define RTD6425_DA_SIMULT            0x402
-#define RTD6425_DAC_BASE             0x404
-#define RTD6425_ANTRIG_SETUP         0x410
-
-#define RTD6425_RTD_ID_BA            0x800   // base address of RTD ID hardware
-#define RTD6425_SRAM                 0xC00
-
-/*
- *  DAC Range Select Constants
- */
-#define RTD6425_DAC_MINUS_5V_TO_5V    0
-#define RTD6425_DAC_0V_to_5V          1
-#define RTD6425_DAC_MINUS_10_TO_10V   2
-#define RTD6425_DAC_0V_TO_10V         3
-
-
-#ifdef LIB_DEFINED
-
-/* These are used by the library functions */
-
-int mio_error_code;
-char mio_error_string[128];
-#endif
-
-void rtd6425_initialize(
-  unsigned short _base_port,
-  unsigned short _irq1,
-  unsigned short  irq2
-);
-
-int rtd6425_enable_dio_interrupt(void);
-
-int rtd6425_dio_enab_bit_int(int bit_number, int polarity);
-
-void rtd6425_flush_buffered_ints(void);
-
-int  rtd6425_wait_dac_int_with_timeout(int dac_num, int milliseconds);
-
-int  rtd6425_wait_dio_int_with_timeout(int milliseconds);
-
-int  rtd6425_wait_dio_int_with_timestamp(
-  int              milliseconds,
-  struct timespec *timestamp
-);
-
-int rtd6425_dio_get_missed_interrupts(void);
-
-float rtd6425_adc_get_channel_voltage(int channel);
-
-int rtd6425_set_dac_voltage(int channel, float voltage);
-
-int rtd6425_dio_read_bit(int bit_number);
-
-int rtd6425_dio_write_bit(int bit_number, int val);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
Index: d6425/wscript
===================================================================
--- rtd6425/wscript	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,16 +1,0 @@
-# Copyright 2014 Chirayu Desai (chirayudesai1@gmail.com)
-#
-# This file's license is 2-clause BSD as in this distribution's LICENSE.2 file.
-#
-
-# Waf build script for an RTEMS Hello
-import rtems_waf.rtems as rtems
-
-def build(bld):
-    rtems.build(bld)
-
-    bld.set_group('libraries')
-    bld(features = 'c cstlib',
-        target = 'rtd6425',
-        includes = '../include',
-        source = ['multiio_rtd6425.c', 'rtd6425.c'])
Index: d6425_shell/.cvsignore
===================================================================
--- rtd6425_shell/.cvsignore	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,1 +1,0 @@
-o-optimize
Index: d6425_shell/ChangeLog
===================================================================
--- rtd6425_shell/ChangeLog	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,5 +1,0 @@
-2011-10-05	Joel Sherrill <joel.sherrill@oarcorp.com>
-
-	* .cvsignore, ChangeLog, Makefile, rtd6425_shell.c,
-	rootfs/set_adc_modes, rootfs/test_adc: New files.
-
Index: d6425_shell/Makefile
===================================================================
--- rtd6425_shell/Makefile	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,45 +1,0 @@
-#
-#  $Id$
-#
-
-#
-#  RTEMS_MAKEFILE_PATH is typically set in an environment variable
-#
-
-
-PGM=${ARCH}/rtd6425_shell.exe
-
-# optional managers required
-MANAGERS=all
-
-#DEFINES += -DTESTING
-CSRCS = rtd6425_shell.c FilesystemImage.c
-COBJS = $(CSRCS:%.c=${ARCH}/%.o)
-
-DEFINES += -I../include -I../commands -I../rtd6425
-LD_LIBS += ../commands/${ARCH}/libmiocmds.a
-LD_LIBS += ../rtd6425/${ARCH}/librtd6425.a
-
-CLEAN_ADDITIONS += FilesystemImage FilesystemImage.c FilesystemImage.h
-
-include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
-include $(RTEMS_CUSTOM)
-include $(PROJECT_ROOT)/make/leaf.cfg
-
-OBJS= $(COBJS) $(CXXOBJS) $(ASOBJS)
-
-all:    ${ARCH} FilesystemImage.c FilesystemImage.h $(OBJS) $(PGM)
-
-${PGM}: $(OBJS)
-	$(make-exe)
-
-FilesystemImage: rootfs/test_adc rootfs/set_adc_modes
-	(cd rootfs ; tar cf - --exclude=.svn \
-	  --exclude=CVS --exclude=.cvsignore .) >$(@)
-
-FilesystemImage.c FilesystemImage.h: FilesystemImage
-	$(PROJECT_ROOT)/bin/rtems-bin2c FilesystemImage FilesystemImage
-
-FilesystemImage.o: FilesystemImage.c
-	$(CC) $(CFLAGS) $(CPU_CFLAGS) -c $<
-
Index: d6425_shell/rootfs/set_adc_modes
===================================================================
--- rtd6425_shell/rootfs/set_adc_modes	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,3 +1,0 @@
-#! joel
-echo "Setting all ADCs to +/-10V (bipolar) and single ended"
-multiio_adc_mode 0 15
Index: d6425_shell/rootfs/test_adc
===================================================================
--- rtd6425_shell/rootfs/test_adc	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,54 +1,0 @@
-#! joel
-
-echo "*** assume dac 4 is connected to ADC 0 ***"
-echo "Cycle from -5v to +5v with one second between on dac 4"
-
-multiio_dac 4 -5.0
-sleep 1
-multiio_adc 0
-
-multiio_dac 4 -4.0
-sleep 1
-multiio_adc 0
-
-multiio_dac 4 -3.0
-sleep 1
-multiio_adc 0
-
-multiio_dac 4 -2.0
-sleep 1
-multiio_adc 0
-
-multiio_dac 4 -1.0
-sleep 1
-multiio_adc 0
-
-multiio_dac 4 0.0
-sleep 1
-multiio_adc 0
-
-multiio_dac 4 1.0
-sleep 1
-multiio_adc 0
-
-multiio_dac 4 2.0
-sleep 1
-multiio_adc 0
-
-multiio_dac 4 3.0
-sleep 1
-multiio_adc 0
-
-multiio_dac 4 4.0
-sleep 1
-multiio_adc 0
-
-multiio_dac 4 5.0
-sleep 1
-multiio_adc 0
-
-echo "Write 0.0v to dac 4"
-multiio_dac 4 0.0
-sleep 1
-multiio_adc 0
-
Index: d6425_shell/rtd6425_shell.c
===================================================================
--- rtd6425_shell/rtd6425_shell.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,89 +1,0 @@
-/*
- *  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 <rtems.h>
-#include <multiio_commands.h>
-#include <multiio.h>
-
-rtems_task Init(
-  rtems_task_argument ignored
-)
-{
-  /*
-   *  Display a herald with some hints on usage
-   */
-  printf(
-    "\n"
-    "\n"
-    "*** Shell Configured with Multi IO Commands ***\n"
-    "Multi IO Configuration: %s\n"
-    "Type \"help multiio\" for more information\n"
-    "\n",
-    rtems_multiio_get_name()
-  );
-
-  rtems_multiio_initialize();
-
-  rtems_shell_init(
-    "SHLL",                          /* task_name */
-    RTEMS_MINIMUM_STACK_SIZE * 4,    /* task_stacksize */
-    100,                             /* task_priority */
-    "/dev/console",                  /* devname */
-    false,                           /* forever */
-    true,                            /* wait */
-    NULL                             /* login */
-  );
-}
-
-/* RTEMS configuration */
-
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-#ifdef RTEMS_BSP_HAS_IDE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER
-#endif
-#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
-#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
-
-#define CONFIGURE_MICROSECONDS_PER_TICK     1000
-
-#define CONFIGURE_MAXIMUM_TASKS                  20
-#define CONFIGURE_MAXIMUM_SEMAPHORES             20
-#define CONFIGURE_MAXIMUM_BARRIERS                3
-#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES          1
-#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
-
-/*
- * discrete in messages are 12 bytes and there are 1024 of them 
- */
-#define CONFIGURE_MESSAGE_BUFFER_MEMORY \
-        CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(1024, 12)
-
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-#define CONFIGURE_EXTRA_TASK_STACKS         (6 * RTEMS_MINIMUM_STACK_SIZE)
-#define CONFIGURE_INIT_TASK_ATTRIBUTES      RTEMS_FLOATING_POINT
-
-#define CONFIGURE_STACK_CHECKER_ENABLED
-#define CONFIGURE_MALLOC_STATISTICS
-
-#define CONFIGURE_INIT
-#include <rtems/confdefs.h>
-
-#define CONFIGURE_SHELL_USER_COMMANDS \
-  CONFIGURE_MULTIIO_COMMANDS
-#define CONFIGURE_SHELL_USER_ALIASES \
-  CONFIGURE_MULTIIO_ALIASES
-
-#define CONFIGURE_SHELL_COMMANDS_INIT
-#define CONFIGURE_SHELL_COMMANDS_ALL
-
-#include <rtems/shellconfig.h>
-
Index: d6425_shell/wscript
===================================================================
--- rtd6425_shell/wscript	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,52 +1,0 @@
-# Copyright 2013 Gedare Bloom (gedare@rtems.org)
-# Copyright 2014 Chirayu Desai (chirayudesai1@gmail.com)
-#
-# This file's license is 2-clause BSD as in this distribution's LICENSE.2 file.
-#
-
-import os
-
-import rtems_waf.rtems as rtems
-version = "1.0.0"
-
-## FilesystemImage processing
-from waflib.Task import Task
-from waflib.TaskGen import extension
-class bin2c(Task):
-  run_str = '${RTEMS_BIN2C} ${SRC} ${TGT[0].abspath()} && ' + \
-            'touch ${TGT[1].abspath()}'
-  ext_out = ['.h']
-
-@extension('FilesystemImage')
-def process_FilesystemImage(self, node):
-  c_node = node.change_ext('.c')
-  h_node = node.change_ext('.h')
-  self.create_task('bin2c', node, [c_node, h_node])
-  self.source.append(c_node)
-
-def build(bld):
-    rtems.build(bld)
-
-    bld.set_group('programs')
-    arch_bsp = bld.get_env()['RTEMS_ARCH_BSP']
-    arch = bld.get_env()['RTEMS_ARCH']
-    bsp = bld.get_env()['RTEMS_BSP']
-    cflags = bld.get_env()['CFLAGS']
-
-    #
-    # The include paths and defines.
-    #
-    bld.includes = ['.', '../include', '../commands', '../rtd6425']
-    bld.defines = ['PACKAGE_VERSION="' + version + '"']
-    bld(rule='tar -C ' + bld.path.find_dir('rootfs').abspath() + \
-              ' -cf ${TGT} .',
-        target='FilesystemImage')
-
-    bld(features = 'c cprogram',
-        target = 'rtd6425_shell.exe',
-        includes = bld.includes,
-        defines = bld.defines,
-        cflags = cflags,
-        stlib = 'miocmds rtd6425',
-        stlibpath= [os.path.join(bld.path.get_bld().abspath(), '../commands'), os.path.join(bld.path.get_bld().abspath(), '../rtd6425')],
-        source = 'rtd6425_shell.c FilesystemImage')
Index: ub/multio_stub.c
===================================================================
--- stub/multio_stub.c	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,87 +1,0 @@
-#include "multi_io.h"
-
-int rtems_multiio_initialize(void)
-{
-  return 0;
-}
-
-const char *rtems_multiio_get_name(void)
-{
-  return "MultiIO Stub";
-}
-
-/*
- *  ADC
- */
-int rtems_adc_get_maximum(void)
-{
-  return 16;
-}
-
-float rtems_adc_get_channel_voltage(int adc)
-{
-  return adc * 1.5;
-}
-
-/*
- *  DAC
- */
-int rtems_dac_get_maximum(void)
-{
-  return 8;
-}
-
-float rtems_dac_get_minimum_voltage(void)
-{
-  return -10.0;
-}
-
-float rtems_dac_get_maximum_voltage(void)
-{
-  return 10.0;
-}
-
-int rtems_set_dac_voltage(int dac, float voltage)
-{
-  return 0;
-}
-
-/*
- *  Discrete Outputs
- */
-int rtems_dout_get_maximum(void)
-{
-  return 0;
-}
-
-int rtems_set_dout(int dout, int value)
-{
-  return 0;
-}
-
-/*
- *  Discrete Inputs
- */
-int rtems_din_get_maximum(void)
-{
-  return 48;
-}
-
-int rtems_din_get(int din)
-{
-  return 0;
-}
-
-int rtems_din_flush_buffered_interrupts(void)
-{
-  return 0;
-}
-
-int rtems_din_wait_interrupt_with_timestamp(
-  int                milliseconds,
-  struct timespec   *timestamp
-)
-{
-  return 0;
-}
-
Index: cript
===================================================================
--- wscript	(revision dc256a455be7910f1b9e84fd51f47ae623a42509)
+++ 	(revision )
@@ -1,44 +1,0 @@
-# Copyright 2013 Chris Johns (chrisj@rtems.org)
-# Copyright 2014 Chirayu Desai (chirayudesai1@gmail.com)
-#
-# This file's license is 2-clause BSD as in this distribution's LICENSE.2 file.
-#
-
-# Waf build script for RTEMS examples
-#
-# To configure, build and run do:
-#
-# $ waf configure --rtems=/Users/chris/Development/rtems/build/4.11 \
-#                 --rtems-tools=/Users/chris/Development/rtems/4.11 \
-#                 --rtems-bsps=sparc/sis
-# $ waf
-# $ /Users/chris/Development/rtems/4.11/bin/sparc-rtems4.11-run ./build/sparc-rtems4.11-sis/hello
-#
-# You can use '--rtems-archs=sparc,i386' or '--rtems-bsps=sparc/sis,i386/pc586'
-# to build for more than BSP at a time.
-#
-
-try:
-    import rtems_waf.rtems as rtems
-except:
-    print 'error: no rtems_waf git submodule; see README.waf'
-    import sys
-    sys.exit(1)
-
-def init(ctx):
-    rtems.init(ctx)
-
-def options(opt):
-    rtems.options(opt)
-
-def configure(conf):
-    rtems.configure(conf)
-
-def build(bld):
-    rtems.build(bld)
-    bld.add_group('libraries')
-    bld.add_group('programs')
-    bld.recurse('commands')
-    bld.recurse('pcmmio')
-    bld.recurse('rtd6425')
-    bld.recurse('rtd6425_shell')
