Device Driver Specification

Home Schedule Grading Resources Design Notebooks

Notebook section:  Software technical documents
Purpose: Specify the interfaces to and operation of the device drivers for your system.

Device drivers should be provided for almost every external component connected to your system. (SRAMs and PROMs are about the only exceptions.) This document specifies the details of each device driver needed in your system. This document should go into much more depth of description than the device driver section of the Software Architecture Document - a high-level software developer should be able to write bug-free code that uses your device drivers using only information supplied in this document.

If you are using a system with built-in drivers, such as the PSoC : If you are using built in configurable modules (such as PSoC modules), some or all of the device driver will be written for you. You still need to document these drivers in the same was as all other drivers. You may need to add additional functionality to the built in drivers.

If some of your modules communicate using standard protocols (RS232, I2C, SPI, etc.): Your system may have some devices that communicate using standard protocols. You need to write higher-level drivers on top of the bus drivers. For instance, if you are using an SPI-based A/D, you'll need to write driver routines such as get_sample and config_adc that communicate using the lower-level SPI drivers.

Document Structure

Your document should include an introduction and separate sections for each device driver.

Introduction

Describe the purpose of this document and give a listing of all the the systems that require device drivers.

Device Driver Description and Specification

Each device driver should have a separate section that describes how the software interacts with the hardware and gives a detailed description of the software interface. It should include the following:

bullet

Overview - Describe the hardware system and the functions that it does. For example, if you were describing a real-time clock, you would explain how it is necessary to set the clock, get the current time, set alarms, and configure interrupts.

bullet

Hardware interface - Describe the function all of the relevant pins used to interface with the hardware.

bullet

Data structures and variables - Describe the function of any variables and/or data structures needed for your device driver. For example, if you are writing an LCD driver, you might have an LCD screen buffer, and variables that point to the character currently being displayed and the end of the buffer.

bullet

Driver routines and interface - Fully describe the function and structure of each driver routine (i.e. init_RTC, get_time, set_time, etc.). Include precise details on how each routine is called (pre-conditions, parameters, return values, and post-conditions). 

 

Kevin Bolding October 09, 2006