Adaptation/GUID-67CFF27B-55AF-42AC-95AF-E71A7C54039E.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-67CFF27B-55AF-42AC-95AF-E71A7C54039E" xml:lang="en"><title>Sample
Device Drivers</title><shortdesc>This document describes the steps and options for coding a device
driver, and how to use APIs to access the services provided by the Symbian
platform kernel.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>Illustrations of the use of APIs are taken from a number of example device
drivers. These are summarised below. All of the drivers implement support
for serial communications over a UART. They are designed to show a number
of different implementation techniques. </p>
<table id="GUID-6AD1B279-724D-5EBD-9372-66400B8C9465">
<tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
<tbody>
<row>
<entry><p> <b>Name</b>  </p> </entry>
<entry><p> <b>Key functionality</b>  </p> </entry>
</row>
<row>
<entry><p> <filepath> exdriver_pio</filepath>  </p> </entry>
<entry><p>Shows a simple driver running on a kernel DFC thread. It polls for
data using a timer. </p> <p><xref href="GUID-1AFAD1C4-340B-4119-94A8-F50E9D8DA8E6.dita">Timers</xref> discusses
timers in detail. </p> </entry>
</row>
<row>
<entry><p> <filepath> exdriver_int</filepath>  </p> </entry>
<entry><p>Illustrates the use of interrupts and asynchronous request handling. </p> <p><xref href="GUID-4DAC39E0-2EC2-40F7-9AEF-4FDA09F1A151.dita">Asynchronous Requests</xref> describes
how to implement handling of asynchronous requests. </p> <p><xref href="GUID-8FA1B2B0-5842-4D5D-BD61-C2D79B56ADC6.dita">Interrupt
Service Routine (ISR)</xref> describes how to write ISRs to handle interrupts
from hardware devices. </p> </entry>
</row>
<row>
<entry><p> <filepath> exdriver_dma</filepath>  </p> </entry>
<entry><p>Illustrates the use of DMA (Direct Memory Access). </p> <p><xref href="GUID-D1F7D21F-BA9D-482C-9B58-7C53A680145A.dita">DMA</xref> describes how
to use DMA for fast copying of data from memory to memory, and between memory
and peripherals. </p> </entry>
</row>
<row>
<entry><p> <filepath>exdriver_chnk</filepath>  </p> </entry>
<entry><p>Illustrates shared chunks and synchronization in a multi-thread
context. </p> <p><xref href="GUID-132349A6-9A5F-4866-A54D-F01B6F58ABDD.dita">Shared
Chunks</xref> describes how to share data efficiently without the overhead
of memory copy operations. </p> </entry>
</row>
<row>
<entry><p> <filepath> exdriver_sync</filepath>  </p> </entry>
<entry><p>Illustrates synchronous request handling, and the use of the <xref href="GUID-E7550422-5121-3393-A85E-BB797969CD2A.dita"><apiname>DLogicalChannelBase</apiname></xref> base
class for LDDs. </p> <p><xref href="GUID-CFE0A4EB-845C-43B6-A732-AA155AFD99D6.dita">User
Requests and Synchronisation</xref> discusses the options for how LDDs can
handle requests. </p> </entry>
</row>
</tbody>
</tgroup>
</table>
<p>The source code for the example device drivers is delivered as part of
the Symbian platform source code on kits, using the directory structure described
previously in the <xref href="GUID-2ADB873A-1580-476A-9642-AB47D13D4A98.dita">Source
Directory Structure</xref> section. </p>
</conbody></concept>