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.
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.
Name |
Key functionality |
exdriver_pio |
Shows a simple driver running on a kernel DFC thread. It polls for data using a timer. Timers discusses timers in detail. |
exdriver_int |
Illustrates the use of interrupts and asynchronous request handling. Asynchronous Requests describes how to implement handling of asynchronous requests. Interrupt Service Routine (ISR) describes how to write ISRs to handle interrupts from hardware devices. |
exdriver_dma |
Illustrates the use of DMA (Direct Memory Access). DMA describes how to use DMA for fast copying of data from memory to memory, and between memory and peripherals. |
exdriver_chnk |
Illustrates shared chunks and synchronization in a multi-thread context. Shared Chunks describes how to share data efficiently without the overhead of memory copy operations. |
exdriver_sync |
Illustrates synchronous request handling, and the use of the DLogicalChannelBase base class for LDDs. User Requests and Synchronisation discusses the options for how LDDs can handle requests. |
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 Source Directory Structure section.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.