Adaptation/GUID-B94FFCA4-1EB3-46A7-9FF9-54C55D67FFE8.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-B94FFCA4-1EB3-46A7-9FF9-54C55D67FFE8" xml:lang="en"><title>Entry
Points</title><shortdesc>This document describes the entry points for each type of device
driver.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<section id="GUID-EC57B8B7-3E77-4A64-B9AC-CBED913D2957">       <title>Driver
entry points</title>       <p>The Device Driver framework supports the following
device driver models: </p> <ul>
<li id="GUID-FB4AE82F-9C3F-50D0-A200-3CC9A71C9906"><p>The <i>LDD-PDD</i> model:
drivers of this type must be loaded by a user application. </p> </li>
<li id="GUID-DCF980DE-5FDE-50E1-AC31-5D6B3B399DFB"><p>The <i>kernel extension</i> model:
drivers of this type are loaded by the Kernel at boot up. </p> </li>
<li id="GUID-F39C7C76-7AA5-5627-8800-42DCE485EABB"><p>The <i>combined</i> model
is a combination of the kernel extension and LDD-PDD models. This is used
when the driver must perform some initialization at the time of boot up. </p> </li>
</ul> <p>For each model, the Kernel provides a standard API for the entry
points to the driver. </p>     </section>
<section id="GUID-66F7B632-038B-495C-9915-7AB9B395919E"><title>Standard LDD</title><p>For a standard LDD-PDD driver, the
driver entry points are defined by the following macros: </p><p>For LDDs,
use <xref href="GUID-B5DA78FD-07CA-3C9F-9154-D29A04E5E1E7.dita"><apiname>DECLARE_STANDARD_LDD</apiname></xref>. For example: </p> <codeblock id="GUID-DD6FC801-02BF-5754-AE4B-F62308849A88" xml:space="preserve">// LDD entry point
DECLARE_STANDARD_LDD()
    {
    // create LDD factory object
    return new DExDriverLogicalDevice;
    }</codeblock></section>
<section id="GUID-D82513D8-BC48-4547-A519-3C2B1FEC4717"><title>Standard PDD</title><p>For PDDs, use <xref href="GUID-73947402-2F32-35C7-94C4-22B4D63D5FB3.dita"><apiname>DECLARE_STANDARD_PDD</apiname></xref>.
For example: </p><codeblock id="GUID-55E287D4-40A3-55FD-A0F5-6428078BFE55" xml:space="preserve">// PDD entry point
DECLARE_STANDARD_PDD()
    {
    // create PDD factory object
    return new DExH4PhysicalDevice;
    }</codeblock> </section>
<section id="GUID-362A4BF6-D882-4626-9F67-69E29737F27A"><title>Kernel extension</title><p>For a kernel extension, the entry
point is defined by the macro <xref href="GUID-8B6DF6D7-4995-3564-9303-272500D7E747.dita"><apiname>DECLARE_STANDARD_EXTENSION</apiname></xref>. </p></section>
<section id="GUID-1556D0A6-B997-4365-9B6F-419676EF25F8"><title>Combined model</title><p>For drivers with a combined model,
the entry points are defined by the following macros: </p> <ul>
<li id="GUID-5F50D02B-7DFB-54CB-9C2E-F416938BD424"><p>For LDDs, use <xref href="GUID-38771B51-195D-3148-A462-277DA3696117.dita"><apiname>DECLARE_EXTENSION_LDD</apiname></xref>. </p> </li>
<li id="GUID-25600E44-0C16-571E-B087-4DB08A3C9A40"><p>For PDDs, use <xref href="GUID-52853C0D-CA98-3B92-B7D4-FF1C1F06C1A6.dita"><apiname>DECLARE_EXTENSION_PDD</apiname></xref>. </p> </li>
</ul> <p>A driver creates factory objects in the entry point routines. </p></section>
</conbody></concept>