0% found this document useful (0 votes)
225 views14 pages

Device Drivers in Embedded Systems

Uploaded by

Priyanshu Yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
225 views14 pages

Device Drivers in Embedded Systems

Uploaded by

Priyanshu Yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

DR.

APJ ABDUL KALAM TECHNICAL UNIVERSITY

Branch - All Branches


Embedded System
(KOE-062)
Lecture – 12

Need for device drivers


By

Tukur Gupta
Assistant Professor
Department of Electronics & Communication Engineering
Ajay Kumar Garg Engineering College, Ghaziabad
DEVICE DRIVERS
• Device Driver or Hardware Driver refers to a special kind of software
program or a specific type of software application which controls a
specific hardware device that enables different hardware devices for
communication with the computer’s Operating System.
• A device driver communicates with the computer hardware by computer
subsystem or computer bus connected to the hardware.
• Device Drivers are very essential for a computer system to work properly
because without device driver the particular hardware fails to perform a
particular function/action for which it has been created.
Need for Device Drivers
• Most embedded hardware requires some type of software initialization
and management. The software that directly interfaces with and
controls this hardware is called a device driver.
• All embedded system that require software have, at the very least,
device driver software in their system software layer.
• Device drivers are the software libraries that initialize the hardware
and manage access to the hardware by higher layers of software.
Working of Device Drivers
• Device Drivers depend upon the Operating System’s instruction to
access the device and performing any particular action.
• After the action they also shows their reactions by delivering output or
status/message from hardware device to the Operating system.
• For Example a printer driver tells the printer in which format to print
after getting instruction from OS. Similarly a sound card driver is there
due to which 1’s and 0’s data of MP3 file is converted to audio signals
and you enjoy the music.
• Card reader, modem, network card, sound card, printer, video card,
USB devices, RAM, Speakers etc. need Device Drivers to operate.
Working of Device Drivers
The following figure illustrates the interaction between user, OS, Device
driver and the devices:

The following figure illustrates the interaction


between user, OS, Device driver and the
devices:
Types of Device Drivers
For almost every device associated with the computer system there
exist Device Driver for the particular hardware. But it can be
broadly classified into two types i.e.,
1. Kernel-mode Device Driver
The following figure illustrates the interaction
2. User-mode
betweenDevice Driver
user, OS, Device driver and the
devices:
Types of Device Drivers
1. Kernel-mode Device Driver –

• This Kernel-mode device driver includes some generic


hardwares which loads with
The following operating
figure illustrates System as part of OS,
the interaction
these are BIOS,between user, OS, Device driver
motherboard, and the
processor and some other
devices:
hardwares which are part of kernel software.
• These includes the minimum system requirement device
drivers for each operating system.
Types of Device Drivers
2. User-mode Device Driver –

• Other than the devices which are brought by kernel for


working of theThe
system the
following user
figure also the
illustrates bring some devices for use
interaction
during the use between
of a system, that devices
user, OS, Device needs device drivers to
driver and the
devices:
function properly. Those drivers falls under User mode device
driver.
• For example user needs any plug and play action that comes
under this.
Types of Device Drivers
Virtual Device Driver -
• There are also virtual device drivers (VxD), which manages the virtual
device.
• Sometimes we use same hardware virtually, at that time virtual driver
controls/managesThethe datafigure
following flow from
illustrates different application used by
the interaction
different users to the same
between user, hardware.
OS, Device driver and the
devices:
• It is essential for a computer to have the required device drivers for all its
parts to keep the system running efficiently.
• Many device drivers are provided by manufactures from beginning and
also we can later include any required device driver for our system.
Device Drivers Features
Device driver-
• has different code in different operating system.
• Same device may have different code for the driver when system is
using different operating system.
• Does the interrupt service for any event related to the device and use
the system and IO buses required for the device service.
• Device driver can be considered software layer between an application
program and the device.
Interrupt Service Routines
(ISR) in Device Drivers
• An Interrupt service routine (ISR) accesses a device for
service (configuring, initializing, activating, opening,
attaching, reading, writing, resetting, deactivating or closing).
• Interrupt service routines thus implements the device
functions of the device driver.
ISR in Device Drivers
Example
• Application program commands to write on the display screen of a mobile
the contact names from the contact database. It sends an SWI to call LCD
display device-driver.
• The driver run short code and executes another SWI to call the ISR related
to write function at the LCD.
• The device-driver does that without the application programmer knowing
how does LCD device interface in the system, what are the addresses by
which it is used, what and where and how used are the control (command)
registers and status registers in that.
ISR in Device Drivers
First level ISR and second level ISR approach to handle the device
hardware interrupts followed by software interrupt
THANK YOU

You might also like