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;
rtems.io_initialize
to initialize a device driver and its associated devices.
rtems.io_open
.
rtems.io_close
.
rtems.io_read
.
rtems.io_write
.
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.
Copyright © 1988-2004 OAR Corporation