RTEMS Logo

RTEMS 4.7.99.2 On-Line Library


Configuring a System Driver Address Table

PREV UP NEXT Bookshelf RTEMS Ada User's Guide

23.8: Driver Address Table

The Device Driver Table is used to inform the I/O Manager of the set of entry points for each device driver configured in the system. The table contains one entry for each device driver required by the application. The number of entries is defined in the number_of_device_drivers entry in the Configuration Table. This table is copied to the Device Drive Table during the IO Manager's initialization giving the entries in this table the lower major numbers. The format of each entry in the Device Driver Table is defined in the following Ada record:

type Driver_Address_Table_Entry is
   record
      Initialization : RTEMS.Device_Driver_Entry;
      Open           : RTEMS.Device_Driver_Entry;
      Close          : RTEMS.Device_Driver_Entry;
      Read           : RTEMS.Device_Driver_Entry;
      Write          : RTEMS.Device_Driver_Entry;
      Control        : RTEMS.Device_Driver_Entry;
   end record;

type Driver_Address_Table is array ( RTEMS.Unsigned32 range <> ) of
  RTEMS.Driver_Address_Table_Entry;

type Driver_Address_Table_Pointer is access all Driver_Address_Table;
initialization
is the address of the entry point called by rtems.io_initialize to initialize a device driver and its associated devices.
open
is the address of the entry point called by rtems.io_open.
close
is the address of the entry point called by rtems.io_close.
read
is the address of the entry point called by rtems.io_read.
write
is the address of the entry point called by rtems.io_write.
control
is the address of the entry point called by rtems.io_control.

Driver entry points configured as NULL will always return a status code of RTEMS.SUCCESSFUL. No user code will be executed in this situation.

A typical declaration for a Device Driver Table might appear as follows:


More information regarding the construction and operation of device drivers is provided in the I/O Manager chapter.


PREV UP NEXT Bookshelf RTEMS Ada User's Guide

Copyright © 1988-2004 OAR Corporation