06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

de_init Initializes an I/O device and its driver.<br />

#include <br />

unsigned long de_init(<br />

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

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

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

void **data_area /* device data area */<br />

)<br />

Description<br />

Arguments<br />

The de_init() call invokes the device initialization routine of the pSOS+ device<br />

driver specified by the dev argument.<br />

The drive init routine can perform one-time device initialization functions such as:<br />

■ Resetting the devices<br />

■ Setting the necessary programmable registers<br />

■ Allocating and/or initializing the driver's data area (for pointers, counters, and<br />

so on)<br />

■ Creating the messages queues, semaphores, and so on, that are needed for<br />

communication and synchronization<br />

■ Installing the interrupt vectors, if necessary<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.<br />

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

1

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

Saved successfully!

Ooh no, something went wrong!