changeset 4192:fb092b45c9cc

en(dis)able app io should be exported too
author nick
date Wed, 16 Jan 2002 08:43:22 +0000
parents 62a6135d090e
children ae28646a3568
files libdha/libdha.h libdha/pci.c
diffstat 2 files changed, 17 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libdha/libdha.h	Wed Jan 16 08:33:17 2002 +0000
+++ b/libdha/libdha.h	Wed Jan 16 08:43:22 2002 +0000
@@ -27,9 +27,9 @@
 
 typedef struct pciinfo_s
 {
-  int	bus,card,func ;			/* PCI/AGP bus:card:func */
-  unsigned short vendor,device ;			/* Card vendor+device ID */
-  unsigned	base0,base1,base2,baserom ;	/* Memory and I/O base addresses */
+  int		bus,card,func;			/* PCI/AGP bus:card:func */
+  unsigned short vendor,device;			/* Card vendor+device ID */
+  unsigned	base0,base1,base2,baserom;	/* Memory and I/O base addresses */
 }pciinfo_t;
 
 /* needed for mga_vid */
@@ -40,6 +40,10 @@
 extern int  pci_scan(pciinfo_t *pci_list,unsigned *num_card);
 
 
+	    /* Enables/disables accessing to IO space from application side.
+	       Should return 0 if o'k or errno on error. */
+extern int enable_app_io( void );
+extern int disable_app_io( void );
 
 extern unsigned char  INPORT8(unsigned idx);
 extern unsigned short INPORT16(unsigned idx);
--- a/libdha/pci.c	Wed Jan 16 08:33:17 2002 +0000
+++ b/libdha/pci.c	Wed Jan 16 08:43:22 2002 +0000
@@ -720,3 +720,13 @@
     
     return(0);
 }
+
+int enable_app_io( void )
+{
+  return enable_os_io();  
+}
+
+int disable_app_io( void )
+{
+  return disable_os_io();
+}
\ No newline at end of file