rtems_status_code rtems_io_register_driver( rtems_device_major_number major, rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major );
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
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.
The Device Driver Table size is specified in the Configuration Table condiguration. This needs to be set to maximum size the application requires.
Copyright © 1988-2008 OAR Corporation