next up previous contents
Next: MCB Software layer Design Up: Write request Previous: Write request

Input data

The inputs to this function are the absolute MCB address, the address of the data, and the SIB port file descriptor.

/* declare the variables */
unsigned short int myControl = 0xa5a5;
unsigned short int myAddress = 0x50;

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

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

/* post the call */

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

 /* select() on the port_fd to wait until it is ready for writing. */

When select() shows the port is ready for writing, then the write is done and the status may be retrieved by another ioctl call.



John Ford
1998-10-23