06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

pSOS+ <strong>System</strong> <strong>Calls</strong> de_write<br />

de_write Writes to an I/O device.<br />

#include <br />

unsigned long de_write(<br />

unsigned long dev, /* major/minor device number */<br />

void *iopb, /* I/O parameter block address */<br />

void *retval /* return value */<br />

)<br />

Description<br />

Arguments<br />

Return Code<br />

The de_write() call is used to write to a device. It invokes the device write routine<br />

of a pSOS+ device driver specified by the dev argument. This service normally<br />

requires the additional parameters contained in the I/O parameter block, such as<br />

the address of the user's output data and the number of data units to write.<br />

dev Specifies the major and minor device numbers, which are<br />

stored in the upper and lower 16 bits, respectively.<br />

iopb Points to an I/O parameter block, the contents of which are<br />

driver-specific.<br />

retval Points to a variable that receives a driver-specific value<br />

returned by the driver (the actual number of data units<br />

written, for example.)<br />

This call returns 0 on success, or an error code on failure. Besides the error codes<br />

listed below, other driver-specific errors can be returned.<br />

<strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong> 1-21<br />

1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!