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.