Adaptation/GUID-B94FFCA4-1EB3-46A7-9FF9-54C55D67FFE8.dita
changeset 15 307f4279f433
equal deleted inserted replaced
14:578be2adaf3e 15:307f4279f433
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-B94FFCA4-1EB3-46A7-9FF9-54C55D67FFE8" xml:lang="en"><title>Entry
       
    13 Points</title><shortdesc>This document describes the entry points for each type of device
       
    14 driver.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    15 <section id="GUID-EC57B8B7-3E77-4A64-B9AC-CBED913D2957">       <title>Driver
       
    16 entry points</title>       <p>The Device Driver framework supports the following
       
    17 device driver models: </p> <ul>
       
    18 <li id="GUID-FB4AE82F-9C3F-50D0-A200-3CC9A71C9906"><p>The <i>LDD-PDD</i> model:
       
    19 drivers of this type must be loaded by a user application. </p> </li>
       
    20 <li id="GUID-DCF980DE-5FDE-50E1-AC31-5D6B3B399DFB"><p>The <i>kernel extension</i> model:
       
    21 drivers of this type are loaded by the Kernel at boot up. </p> </li>
       
    22 <li id="GUID-F39C7C76-7AA5-5627-8800-42DCE485EABB"><p>The <i>combined</i> model
       
    23 is a combination of the kernel extension and LDD-PDD models. This is used
       
    24 when the driver must perform some initialization at the time of boot up. </p> </li>
       
    25 </ul> <p>For each model, the Kernel provides a standard API for the entry
       
    26 points to the driver. </p>     </section>
       
    27 <section id="GUID-66F7B632-038B-495C-9915-7AB9B395919E"><title>Standard LDD</title><p>For a standard LDD-PDD driver, the
       
    28 driver entry points are defined by the following macros: </p><p>For LDDs,
       
    29 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
       
    30 DECLARE_STANDARD_LDD()
       
    31     {
       
    32     // create LDD factory object
       
    33     return new DExDriverLogicalDevice;
       
    34     }</codeblock></section>
       
    35 <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>.
       
    36 For example: </p><codeblock id="GUID-55E287D4-40A3-55FD-A0F5-6428078BFE55" xml:space="preserve">// PDD entry point
       
    37 DECLARE_STANDARD_PDD()
       
    38     {
       
    39     // create PDD factory object
       
    40     return new DExH4PhysicalDevice;
       
    41     }</codeblock> </section>
       
    42 <section id="GUID-362A4BF6-D882-4626-9F67-69E29737F27A"><title>Kernel extension</title><p>For a kernel extension, the entry
       
    43 point is defined by the macro <xref href="GUID-8B6DF6D7-4995-3564-9303-272500D7E747.dita"><apiname>DECLARE_STANDARD_EXTENSION</apiname></xref>. </p></section>
       
    44 <section id="GUID-1556D0A6-B997-4365-9B6F-419676EF25F8"><title>Combined model</title><p>For drivers with a combined model,
       
    45 the entry points are defined by the following macros: </p> <ul>
       
    46 <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>
       
    47 <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>
       
    48 </ul> <p>A driver creates factory objects in the entry point routines. </p></section>
       
    49 </conbody></concept>