Index: pcmmio/original/ChangeLog
===================================================================
--- pcmmio/original/ChangeLog	(revision 32eca41c4599089b00fffd56d95458842f071e24)
+++ pcmmio/original/ChangeLog	(revision 352ac8d01f492a09a0851764be0ec285ea6d6afb)
@@ -1,2 +1,7 @@
+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>
 
Index: pcmmio/original/Makefile
===================================================================
--- pcmmio/original/Makefile	(revision 32eca41c4599089b00fffd56d95458842f071e24)
+++ pcmmio/original/Makefile	(revision 352ac8d01f492a09a0851764be0ec285ea6d6afb)
@@ -17,4 +17,6 @@
 # C source names
 SHARED_CSRCS = rtems_config.c mio_io.c kbhit.c
+SHARED_CSRCS += mio_io_linux.c
+
 SHARED_COBJS = $(SHARED_CSRCS:%.c=${ARCH}/%.o)
 
Index: pcmmio/original/mio_io.c
===================================================================
--- pcmmio/original/mio_io.c	(revision 32eca41c4599089b00fffd56d95458842f071e24)
+++ pcmmio/original/mio_io.c	(revision 352ac8d01f492a09a0851764be0ec285ea6d6afb)
@@ -6,4 +6,11 @@
 *
 *  $Log$
+*  Revision 1.2  2009/06/08 18:21:56  joel
+*  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.
+*
 *  Revision 1.1.1.1  2009/06/08 14:52:43  joel
 *  Initial import.
@@ -11,5 +18,5 @@
 *
 *  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.
+*  call are made into a porting layer to access the actual hardware.
 */
 
@@ -21,7 +28,4 @@
 
 #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
@@ -79,15 +83,4 @@
 
 
-
-/**************************************************************************
-*
-*		USER LIBRARY FUNCTIONS
-*
-***************************************************************************
-*/
-
-int handle = 0;
-char *device_id ="pcmmio";
-char *dev_id    = "/dev/pcmmio";
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -347,31 +340,4 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-//		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
 //
@@ -479,5 +445,5 @@
 int set_dac_voltage(int channel, float voltage)
 {
-unsigned short  value;
+unsigned short  value = 0;
 float bit_val;
 
@@ -547,142 +513,4 @@
 	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;
-}
-
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -1127,29 +955,4 @@
 ///////////////////////////////////////////////////////////////////////////////
 //
-//		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
 //
@@ -1175,69 +978,4 @@
 		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);
 }
 
@@ -1332,31 +1070,4 @@
 }
 
-///////////////////////////////////////////////////////////////////////////////
-//
-//		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);
-}
-
-
 ////////////////////////////////////////////////////////////////////////////////
 //
@@ -1797,96 +1508,2 @@
 }
 
-
-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 32eca41c4599089b00fffd56d95458842f071e24)
+++ pcmmio/original/mio_io.h	(revision 352ac8d01f492a09a0851764be0ec285ea6d6afb)
@@ -8,4 +8,11 @@
 
 /* $Log$
+ * Revision 1.2  2009/06/08 18:21:56  joel
+ * 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.
+ *
  * Revision 1.1.1.1  2009/06/08 14:52:43  joel
  * Initial import.
@@ -124,10 +131,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
@@ -149,4 +156,7 @@
 #endif
 
+/* part of the porting layer */
+int check_handle(void);
+int mio_read_irq_assigned(void);
 
 int disable_dio_interrupt(void);
Index: pcmmio/original/mio_io_linux.c
===================================================================
--- pcmmio/original/mio_io_linux.c	(revision 352ac8d01f492a09a0851764be0ec285ea6d6afb)
+++ pcmmio/original/mio_io_linux.c	(revision 352ac8d01f492a09a0851764be0ec285ea6d6afb)
@@ -0,0 +1,415 @@
+/* mio_io.c WinSystems support module file for the  PCM-MIO Linux driver */
+/*
+*  $Header$
+*
+*  $Id$
+*
+*  $Log$
+*  Revision 1.2  2009/06/08 18:21:56  joel
+*  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.
+*
+*  Revision 1.1.1.1  2009/06/08 14:52:43  joel
+*  Initial import.
+*
+*
+*  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 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;
+}
+
