rciBus(3)

NAME
rciBus, rciIOpage -- RCI bus access pointers.

USAGE
extern unsigned char *rciBus;

extern unsigned char *rciIOpage;

DESCRIPTION
These variables provide the user with direct access to the system physical I/O space. Some or all of this I/O space is mapped into memory regions whose base addresses are given by these two variables.

On MicroVAX-II systems, rciBus points to the 4 Mbyte Q-22 bus space, and rciIOpage points to the 8 Kbyte I/O page.

On systems using the VME bus, rciIOpage points to the 64 Kbyte short I/O (A16D16) space. What rciBus points to tends to depend on the system: on Sun4 systems, it is a 2 Mbyte region starting at offset 0x800000 in the A24D16 space; on SGI systems, it is the upper 8 Mbytes of the A24D16 space, and on VxWorks systems, it is the entire A24D16 space. The reasons for these differences involve various constraints such as available memory, reserved address spaces, etc.

These pointers can be used to perform I/O operations directly without having to go through the operating system. For instance, suppose a device exists at I/O page address 0x1f70, and we wish to read the contents of the second (16 bit) word belonging to that device. This could be done with the following code fragment:
   unsigned short *device = (unsigned short *)(rciIOpage+0x1f70);
   unsigned short value;

   value = device[1];

rciIOpage and rciBus are not set up until the first call is made to rciCreate(). They are used principally by the RCI I/O drivers.

BUGS
The definition of these variables is very system dependent.

SEE ALSO
controlFxns(7), robotComfxns(7), IOdevice(7).