This document discusses the template code from which device drivers are created.
To help enable a base port be produced quickly, Symbian platform provides template source code for drivers for most peripherals. The template implements a framework and protocols for the type of peripheral; the base port implementer then supplies additional implementation for the particular hardware device. For example, for the UART driver, the PDD template implements the standard hardware abstraction interfaces for serial communication, such as the DComm class. It leaves some sections marked as "TBD", which are specific to the device. Driver developers can start with these templates and fill in the "TBD" functions to create a basic driver. If required, additional functionality can then be added to this.
The template drivers are located in the sf\os\kernelhwsrv\bsptemplate\asspandvariant\template_variant source directory. The template directory provides a variant base port that includes all the drivers required to do the minimal base port for any variant.
Details of the templates for particular drivers are discussed in the relevant sections of the Base Porting Guide. This tutorial presents an additional example device driver.
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.