Sample Device Drivers

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.


Key functionality


Shows a simple driver running on a kernel DFC thread. It polls for data using a timer.

Timers discusses timers in detail.


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.


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.


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.


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.