⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 drivertut7.html

📁 What is this ``device driver stuff anyway? Here s a very short introduction to the concept.
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut10.html#WriteCallbackRtn">Section 6.6.6</a>
shows how to specify device connectivity information by calling the
<tt>create_controller_struct</tt>
and
<tt>create_device_struct</tt>
interfaces.
<a name="PortIssueMethodConfUnconfCtlrs"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="drivertut7_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="drivertut7_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#PortUNIXDrvs"><img src="drivertut7_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#PortIssueChangesconfigfile"><img src="drivertut7_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#PortIssueMethodIdenBusContDev"><img src="drivertut7_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut8.html"><img src="drivertut7_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="drivertut7_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="drivertut7_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
4.2.9&nbsp;&nbsp;&nbsp;&nbsp;Method for Configuring and Unconfiguring Controllers
</h3>
<p>
<a name="nx_id_171"></a>
In previous versions of the operating system, you typically called the
following kernel support interfaces:
</p><ul>
<p></p><li>
<tt>ldbl_ctlr_configure</tt>
<p>
Configures the specified controller
</p><p></p></li><li>
<tt>ldbl_stanza_resolver</tt>
<p>
Merges the configuration data
</p><p></p></li><li>
<tt>ldbl_ctlr_unconfigure</tt>
<p>
Unconfigures the specified controller
</p></li></ul><p>
Digital recommends that you replace these interfaces as follows:
</p><ul>
<p></p><li>
Replace calls to
<tt>ldbl_ctlr_configure</tt>
with calls to
<tt>configure_driver</tt>.
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut10.html#DetermineConfigState">Section 6.6.3</a>
shows an example of a call to the
<tt>configure_driver</tt>
interface.
<p></p></li><li>
Replace calls to
<tt>ldbl_ctlr_unconfigure</tt>
with calls to
<tt>unconfigure_driver</tt>.
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut10.html#DetermineConfigState">Section 6.6.3</a>
shows an example of a call to the
<tt>unconfigure_driver</tt>
interface.
<p></p></li><li>
You no longer need to call the
<tt>ldbl_stanza_resolver</tt>
interface.
Thus, remove calls to
<tt>ldbl_stanza_resolver</tt>
from your device drivers.
</li></ul><p>
<a name="PortIssueMethodIdenBusContDev"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="drivertut7_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="drivertut7_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#PortUNIXDrvs"><img src="drivertut7_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#PortIssueMethodConfUnconfCtlrs"><img src="drivertut7_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#PortIssueUseofdatacFiles"><img src="drivertut7_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut8.html"><img src="drivertut7_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="drivertut7_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="drivertut7_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
4.2.10&nbsp;&nbsp;&nbsp;&nbsp;Method for Identifying Bus, Controller, and Device Information
</h3>
<p>
<a name="nx_id_172"></a>
In previous versions of the operating system,
you identified bus, controller, and device information as follows:
</p><ul>
<p></p><li>
The
<tt>config.file</tt>
file fragment
<p>
For drivers that are statically configured, you identify bus, controller,
and device information by specifying an appropriate syntax in the
<tt>config.file</tt>
file fragment.
For this version of Digital UNIX, the
<tt>config.file</tt>
file fragment is no longer used.
</p><p></p></li><li>
The
<tt>stanza.loadable</tt>
file fragment
<p>
For drivers that are dynamically configured, you identify bus, controller,
and device information
by specifying an appropriate syntax in the
<tt>stanza.loadable</tt>
file fragment.
For this version of Digital UNIX, the
<tt>stanza.loadable</tt>
file fragment is replaced by the
<tt>sysconfigtab</tt>
file fragment.
You do not identify bus, controller, and device information in the
<tt>sysconfigtab</tt>
file fragment.
</p></li></ul><p>
</p><p>
Digital UNIX
provides the
<tt>create_controller_struct</tt>
and
<tt>create_device_struct</tt>
interfaces.
These interfaces create the
<tt>controller</tt>
and
<tt>device</tt>
structures associated with your device driver.
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut10.html#UsingCreRtnstoRegContrlDevInfo">Section 6.6.4.3</a>
shows you how to use these interfaces.
</p><p>
</p><p>
As a result of these changes, you no longer need to supply bus,
controller, and device specification information in the
<tt>sysconfigtab</tt>
file fragment.
(This means that the
<tt>Module_Config</tt>
stanza field will not be supported in a future release of
Digital UNIX.)
<a name="PortIssueUseofdatacFiles"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="drivertut7_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="drivertut7_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#PortUNIXDrvs"><img src="drivertut7_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#PortIssueMethodIdenBusContDev"><img src="drivertut7_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#PortIssueMethodSpecDevSpecFiles"><img src="drivertut7_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut8.html"><img src="drivertut7_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="drivertut7_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="drivertut7_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
4.2.11&nbsp;&nbsp;&nbsp;&nbsp;Use of name_data.c Files
</h3>
<p>
<a name="nx_id_173"></a>
Digital no longer recommends that you use
<tt><var>name</var>_data.c </tt>files to size the data structures and data structure arrays for
drivers that are statically configured into the kernel.
All references to
<tt><var>name</var>_data.c </tt>files have been deleted.
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut5.html#DynamicAlloc2">Section 2.6.2</a>
describes how to dynamically allocate data structures.
<a name="PortIssueMethodSpecDevSpecFiles"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="drivertut7_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="drivertut7_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#PortUNIXDrvs"><img src="drivertut7_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#PortIssueUseofdatacFiles"><img src="drivertut7_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#PortIssueUseofDevDrvHeadFile"><img src="drivertut7_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut8.html"><img src="drivertut7_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="drivertut7_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="drivertut7_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
4.2.12&nbsp;&nbsp;&nbsp;&nbsp;Method for Specifying Device Special File Information
</h3>
<p>
<a name="nx_id_174"></a>
In previous versions of the operating system, you specified device
special file information in the
<tt>stanza.static</tt>
file fragment for statically configured drivers and in the
<tt>stanza.loadable</tt>
file fragment for dynamically configured drivers. 
You specified device special file informtion by using the device special
file-related attribute fields.
</p><p>
For this version of Digital UNIX, the
<tt>stanza.static</tt>
and
<tt>stanza.loadable</tt>
file fragments are replaced by the
<tt>sysconfigtab</tt>
file fragment.
You use the device special file-related attribute fields in the
<tt>sysconfigtab</tt>
file fragment to identify device special files.
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut18.html#ThesysconfigtabFileFragment">Section 13.4</a>
describes the
<tt>sysconfigtab</tt>
file fragment and
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut19.html#StaticConfigCresysconfigtab">Section 14.1.5</a>
describes the syntax for the attribute fields associated with the
<tt>sysconfigtab</tt>
file fragment. 
<a name="PortIssueUseofDevDrvHeadFile"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="drivertut7_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="drivertut7_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#PortUNIXDrvs"><img src="drivertut7_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#PortIssueMethodSpecDevSpecFiles"><img src="drivertut7_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#PortIssueListofRtnsRetired"><img src="drivertut7_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut8.html"><img src="drivertut7_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="drivertut7_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="drivertut7_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
4.2.13&nbsp;&nbsp;&nbsp;&nbsp;Use of the Device Driver Header File
</h3>
<p>
<a name="nx_id_175"></a>
The device driver header file contains
<tt>#define</tt>
statements for as many devices as are configured into the system.
This file is generated by the
<tt>config</tt>
program during static configuration of the device driver.
The
<tt>config</tt>
program creates a compile-time variable,
which defines how many devices exist on the system.
Many existing ULTRIX-based drivers use this compile-time variable in
device driver code to refer to the number of this type of device on the system.
This usage most frequently occurs in structure array declarations and in
condition (for example,
<tt>if</tt>
and
<tt>while</tt>)
statements.
In previous versions of Digital UNIX
device drivers could use this
device driver header file.
</p><p>
For this version of Digital UNIX, the device driver header file is no
longer used.
<a name="PortIssueListofRtnsRetired"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="drivertut7_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="drivertut7_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#PortUNIXDrvs"><img src="drivertut7_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#PortIssueUseofDevDrvHeadFile"><img src="drivertut7_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#PortIssueListofStructsRetired"><img src="drivertut7_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut8.html"><img src="drivertut7_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="drivertut7_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="drivertut7_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
4.2.14&nbsp;&nbsp;&nbsp;&nbsp;List of Interfaces to be Retired
</h3>
<p>
<a name="nx_id_176"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut7.html#tblPortIssueListofRtnsRetired">Table 4-3</a>
lists the interfaces that will be retired in a future release of
Digital UNIX.
The table also identifies a replacement for the retired interface (if
applicable).
<a name="tblPortIssueListofRtnsRetired"></a>
</p><h3>
Table 4-3: Interfaces to be Retired in a Future Release of Digital UNIX
</h3>
<a name="nx_id_177"></a>
<table border="4" cellpadding="4">
<tbody><tr>
<td align="left" valign="top">
<strong>
Retired Interface
</strong>
</td>
<td align="left" valign="top">
<strong>
Replacement
</str

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -