Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

pcioDrv.c File Reference

#include <stdio.h>
#include "pcioDrv.h"
#include "iodev.h"

Include dependency graph for pcioDrv.c:

Include dependency graph

Go to the source code of this file.

Functions

void pcioInit ()
unsigned char inputb (unsigned short port)
void outputb (unsigned short port, unsigned char data)
unsigned short inputw (unsigned short port)
void outputw (unsigned short port, unsigned short data)
unsigned long inputl (unsigned short port)
void outputl (unsigned short port, unsigned long data)

Variables

int pcioDrvId = 0


Function Documentation

void pcioInit  
 

Definition at line 41 of file pcioDrv.c.

Referenced by inputb(), inputl(), inputw(), outputb(), outputl(), and outputw().

00042 {
00043   if ((pcioDrvId = open("/dev/pcio", 0)) < 0)
00044   {
00045     fprintf(stderr, "pcioInit: can't open /dev/pcio");
00046   }
00047 }

unsigned char inputb unsigned short    port
 

Definition at line 50 of file pcioDrv.c.

00051 {
00052   struct _ioValStruct arg;
00053   arg.address = port;
00054   if (0 == pcioDrvId)
00055     pcioInit();
00056   ioctl( pcioDrvId, READ_8, &arg );
00057   return arg.value;
00058 }

void outputb unsigned short    port,
unsigned char    data
 

Definition at line 61 of file pcioDrv.c.

00062 {
00063   struct _ioValStruct arg;
00064   arg.address = port;
00065   arg.value = data;
00066   if (0 == pcioDrvId)
00067     pcioInit();
00068   ioctl( pcioDrvId, WRITE_8, &arg );
00069 }

unsigned short inputw unsigned short    port
 

Definition at line 72 of file pcioDrv.c.

00073 {
00074   struct _ioValStruct arg;
00075   arg.address = port;
00076   if (0 == pcioDrvId)
00077     pcioInit();
00078   ioctl( pcioDrvId, READ_16, &arg );
00079   return arg.value;
00080 }

void outputw unsigned short    port,
unsigned short    data
 

Definition at line 83 of file pcioDrv.c.

00084 {
00085   struct _ioValStruct arg;
00086   arg.address = port;
00087   arg.value = data;
00088   if (0 == pcioDrvId)
00089     pcioInit();
00090   ioctl( pcioDrvId, WRITE_16, &arg );
00091 }

unsigned long inputl unsigned short    port
 

Definition at line 94 of file pcioDrv.c.

00095 {
00096   struct _ioValStruct arg;
00097   arg.address = port;
00098   if (0 == pcioDrvId)
00099     pcioInit();
00100   ioctl( pcioDrvId, READ_32, &arg );
00101   return arg.value;
00102 }

void outputl unsigned short    port,
unsigned long    data
 

Definition at line 105 of file pcioDrv.c.

00106 {
00107   struct _ioValStruct arg;
00108   arg.address = port;
00109   arg.value = data;
00110   if (0 == pcioDrvId)
00111     pcioInit();
00112   ioctl( pcioDrvId, WRITE_32, &arg );
00113 }


Variable Documentation

int pcioDrvId = 0 [static]
 

Definition at line 37 of file pcioDrv.c.


Generated on Sun Dec 2 15:57:25 2001 for rcslib by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001