From 730020c24704cf372686b363fff8dfea6e9a649a Mon Sep 17 00:00:00 2001 From: nick Date: Wed, 16 Jan 2002 08:43:22 +0000 Subject: en(dis)able app io should be exported too git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4193 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libdha/libdha.h | 10 +++++++--- libdha/pci.c | 10 ++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/libdha/libdha.h b/libdha/libdha.h index b418d7da2f..7456457a70 100644 --- a/libdha/libdha.h +++ b/libdha/libdha.h @@ -27,9 +27,9 @@ extern "C" { 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_config_read(unsigned char bus, unsigned char dev, unsigned char o 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); diff --git a/libdha/pci.c b/libdha/pci.c index bb40fe14e5..21ee1b749b 100644 --- a/libdha/pci.c +++ b/libdha/pci.c @@ -720,3 +720,13 @@ int pci_config_read(unsigned char bus, unsigned char dev, 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 -- cgit v1.2.3