RTEMS Logo

RTEMS 4.9.2 On-Line Library


I/O Manager IO_REGISTER_DRIVER - Register a device driver

PREV UP NEXT Bookshelf RTEMS Ada User's Guide

16.4.1: IO_REGISTER_DRIVER - Register a device driver

CALLING SEQUENCE:

No Ada implementation.

DIRECTIVE STATUS CODES:

RTEMS.SUCCESSFUL - successfully registered
RTEMS.INVALID_ADDRESS - invalid registered major pointer
RTEMS.INVALID_ADDRESS - invalid driver table
RTEMS.INVALID_NUMBER - invalid major device number
RTEMS.TOO_MANY - no available major device table slot
RTEMS.RESOURCE_IN_USE - major device number entry in use

DESCRIPTION:

This directive attempts to add a new device driver to the Device Driver Table. The user can specify a specific major device number via the directive's major parameter, or let the registration routine find the next available major device number by specifing a major number of 0. The selected major device number is returned via the registered_major directive parameter. The directive automatically allocation major device numbers from the highest value down.

This directive automatically invokes the IO_INITIALIZE directive if the driver address table has an initialization and open entry.

The directive returns RTEMS.TOO_MANY if Device Driver Table is full, and RTEMS.RESOURCE_IN_USE if a specific major device number is requested and it is already in use.

NOTES:

The Device Driver Table size is specified in the Configuration Table condiguration. This needs to be set to maximum size the application requires.


PREV UP NEXT Bookshelf RTEMS Ada User's Guide

Copyright © 1988-2008 OAR Corporation