next up previous contents
Next: Write request Up: Read request Previous: Read request

Input data

The inputs to this function are the absolute MCB address, the data address, and the SIB port file descriptor. The address and the data address are packaged up in the mcbTransaction structure, as shown below.

/* declare the variables */
unsigned short int myMonitor = 0
unsigned short int myAddress = 0x10;

struct mcbTransaction {
unsigned short int address;
unsigned short int *data;
} mcbTransaction ;

/* fill in the structure */
mcbTrasaction myTransaction.address = myAddress;
mcbTrasaction myTransaction.data = &myMonitor;

/* post the call */

int status = ioctl(port_fd,MCB_READ, &myTransaction);
Then the user issues an ioctl to to retrieve the status. In the event that the data is not available, the user drops into a select() call, and waits for the data to arrive. When the data arrives, the status my be retreived using ioctl().

int status = ioctl(port_fd,MCB_STATUS, &myTransaction);



John Ford
1998-10-23