Changeset 6d00095 in rtems


Ignore:
Timestamp:
03/27/02 14:39:06 (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
9b02fa65
Parents:
f4c118d
Message:

2002-03-22 Chris Johns <ccj@…>

  • io.t, conf.t: PR 160. Added the IO Manager's register and unregister interface documentation.
Location:
doc/user
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • doc/user/ChangeLog

    rf4c118d r6d00095  
     12002-03-22      Chris Johns <ccj@acm.org>
     2
     3        * io.t, conf.t: PR 160. Added the IO Manager's register and
     4        unregister interface documentation.
     5
    162002-03-15      Eric Norum <eric.norum@usask.ca>
    27
  • doc/user/conf.t

    rf4c118d r6d00095  
    256256device driver table.
    257257
     258@findex CONFIGURE_MAXIMUM_DRIVERS
     259@item @code{CONFIGURE_MAXIMUM_DRIVERS} is defined
     260as the number of device drivers per node.  By default, this is
     261set to 10.
     262
    258263@findex CONFIGURE_MAXIMUM_DEVICES
    259264@item @code{CONFIGURE_MAXIMUM_DEVICES} is defined
     
    717722  rtems_unsigned32                  ticks_per_timeslice;
    718723  rtems_unsigned32                  maximum_devices;
     724  rtems_unsigned32                  maximum_drivers;
    719725  rtems_unsigned32                  number_of_device_drivers;
    720726  rtems_driver_address_table       *Device_driver_table;
     
    801807to the setting of the macro @code{CONFIGURE_MAXIMUM_DEVICES}.
    802808
     809@item maximum_drivers
     810is the maximum number of device drivers that can be registered.
     811When using the @code{confdefs.h} mechanism for configuring
     812an RTEMS application, the value for this field corresponds
     813to the setting of the macro @code{CONFIGURE_MAXIMUM_DRIVERS}.
     814This value is set to @code{maximum_devices} if it is greater
     815than @code{maximum_drivers}.
     816
    803817@item number_of_device_drivers
    804818is the number of device drivers for the system.  There should be
     
    13981412@cindex Device Driver Table
    13991413
    1400 The Device Driver Table is used to inform the I/O
    1401 Manager of the set of entry points for each device driver
    1402 configured in the system.  The table contains one entry for each
    1403 device driver required by the application.  The number of
    1404 entries is defined in the number_of_device_drivers entry in the
    1405 Configuration Table.  The format of each entry in the Device
    1406 Driver Table is defined in
    1407 the following @value{LANGUAGE} @value{STRUCTURE}:
     1414The Device Driver Table is used to inform the I/O Manager of the set of
     1415entry points for each device driver configured in the system.  The table
     1416contains one entry for each device driver required by the application.
     1417The number of entries is defined in the number_of_device_drivers entry
     1418in the Configuration Table.  This table is copied to the Device Drive
     1419Table during the IO Manager's initialization giving the entries in this
     1420table the lower major numbers.  The format of each entry in the Device
     1421Driver Table is defined in the following @value{LANGUAGE}
     1422@value{STRUCTURE}:
    14081423
    14091424@ifset is-C
  • doc/user/io.t

    rf4c118d r6d00095  
    3636@cindex Device Driver Table
    3737
    38 Each application utilizing the RTEMS I/O manager must
    39 specify the address of a Device Driver Table in its
    40 Configuration Table.  This table contains each device driver's
    41 entry points.  Each device driver may contain the following
    42 entry points:
     38Each application utilizing the RTEMS I/O manager must specify the
     39address of a Device Driver Table in its Configuration Table. This table
     40contains each device driver's entry points that is to be initialised by
     41RTEMS during initialization.  Each device driver may contain the
     42following entry points:
    4343
    4444@itemize @bullet
     
    5858driver entry points.
    5959
     60Applications can register and unregister drivers with the RTEMS I/O
     61manager avoiding the need to have all drivers statically defined and
     62linked into this table.
     63
     64The @file{confdefs.h} entry @code{CONFIGURE_MAXIMUM_DRIVERS} configures
     65the number of driver slots available to the application.
     66
    6067@subsection Major and Minor Device Numbers
    6168
     
    116123for device drivers, it makes no assumptions regarding the
    117124construction or operation of a device driver.
     125
     126@sybsection Runtime Driver Registration
     127
     128@cindex runtime driver registration
     129
     130Board support package and application developers can select wether a
     131device driver is statically entered into the default device table or
     132registered at runtime.
     133
     134Dynamic registration helps applications where:
     135
     136@enumerate
     137@item The BSP and kernel libraries are common to a range of applications
     138for a specific target platform. An application may be built upon a
     139common library with all drivers. The application selects and registers
     140the drivers. Uniform driver name lookup protects the application.
     141@item The type and range of drivers may vary as the application probes a
     142bus during initialization.
     143@item Support for hot swap bus system such as Compact PCI.
     144@item Support for runtime loadable driver modules.
     145@end enumerate
    118146
    119147@subsection Device Driver Interface
     
    222250@c
    223251@page
     252@subsection IO_REGISTER_DRIVER - Register a device driver
     253
     254@cindex register a device driver
     255
     256@subheading CALLING SEQUENCE:
     257
     258@ifset is-C
     259@findex rtems_io_register_driver
     260@example
     261rtems_status_code rtems_io_register_driver(
     262  rtems_device_major_number   major,
     263  rtems_driver_address_table *driver_table,
     264  rtems_device_major_number  *registered_major
     265);
     266@end example
     267@end ifset
     268
     269@ifset is-Ada
     270@example
     271No Ada implementation.
     272@end example
     273@end ifset
     274
     275@subheading DIRECTIVE STATUS CODES:
     276@code{@value{RPREFIX}SUCCESSFUL} - successfully registered@*
     277@code{@value{RPREFIX}INVALID_NUMBER} - invalid major device number@*
     278@code{@value{RPREFIX}TOO_MANY} - no available major device table slot@*
     279@code{@value{RPREFIX}RESOURCE_IN_USE} - major device number entry in use
     280
     281@subheading DESCRIPTION:
     282
     283This directive attempts to add a new device driver to the Device Driver
     284Table. The user can specify a specific major device number via the
     285directive's @code{major} parameter, or let the registration routine find
     286the next available major device number by specifing a major number of
     287@code{0}. The selected major device number is returned via the
     288@code{registered_major} directive parameter. The directive automatically
     289allocation major device numbers from the highest value down.
     290
     291This directive automatically invokes the IO_INITIALIZE directive if
     292the driver address table has an initialization and open entry.
     293
     294The directive returns @value{RPREFIX}TOO_MANY if Device Driver Table is
     295full, and @value{RPREFIX}RESOURCE_IN_USE if a specific major device
     296number is requested and it is already in use.
     297
     298@subheading NOTES:
     299
     300The Device Driver Table size is specified in the Configuration Table
     301condiguration. This needs to be set to maximum size the application
     302requires.
     303
     304
     305@c
     306@c
     307@c
     308@page
     309@subsection IO_UNREGISTER_DRIVER - Unregister a device driver
     310
     311@cindex unregister a device driver
     312
     313@subheading CALLING SEQUENCE:
     314
     315@ifset is-C
     316@findex rtems_io_unregister_driver
     317@example
     318rtems_status_code rtems_io_register_driver(
     319  rtems_device_major_number   major
     320);
     321@end example
     322@end ifset
     323
     324@ifset is-Ada
     325@example
     326No Ada implementation.
     327@end example
     328@end ifset
     329
     330@subheading DIRECTIVE STATUS CODES:
     331@code{@value{RPREFIX}SUCCESSFUL} - successfully registered@*
     332@code{@value{RPREFIX}INVALID_NUMBER} - invalid major device number
     333
     334@subheading DESCRIPTION:
     335
     336This directive removes a device driver from the Device Driver Table.
     337
     338@subheading NOTES:
     339
     340Currently no specific checks are made and the driver is not closed.
     341
     342
     343@c
     344@c
     345@c
     346@page
    224347@subsection IO_INITIALIZE - Initialize a device driver
    225348
Note: See TracChangeset for help on using the changeset viewer.