Device Drivers Witawas Srisa-an

Yüklə 452 b.
ölçüsü452 b.

Device Drivers

Device Drivers

  • What are device drivers?

    • What are they used for?
    • Why are they important?

Why Do We Need Drivers?

  • Custom platforms

    • Contain many peripheral devices and kernel (e.g. CE) supported CPU
      • OAL development to get kernel to boot on the board
      • Device drivers to allow applications to access peripheral devices

An Example

  • To access a serial port in Windows CE

    • calls CreateFile( ) on COMx
    • calls WriteFile( ) to write some bytes of data to the serial port
    • calls CloseHandle( ) to close the serial port.

Drivers in CE

  • A driver is simply a dynamic-link library (DLL)

    • DLLs are loaded into a parent process address space
    • Run in user mode (different than most OSs)
    • the parent process can then call any of the interfaces exposed from the DLL

Writing Device Drivers

  • Most of the time spent on system integration is in this process

    • Some devices have support on standard CE release and some don’t
      • Onboard or installable
        • Onboard devices may require platform dependent modification to the kernel image
        • Installable devices may require code to be more platform independent
    • Drivers APIs can also be used to provide application-level services

Device Driver Models

  • Device drivers, over the years, have become very complex

    • Drivers are separated into classes
      • Serial, network, audio, video, touch panel, etc.
    • Layer approach is used
      • To support a new device, a layer is modified instead of rewriting the entire driver
      • Processing functions required for a given class often do not require modification

Device Driver Architecture


  • Allow accesses to an array of devices through basic file I/O interfaces

    • Often used for installable devices
    • The device manager (DM) manages stream-interface drivers

Other Driver Models

Device Driver Labs


  • Download lab tools from the course website

  • Create a simple Internet Appliance Windows CE project

  • Create a device driver workspace and build the workspace

  • Build OS image

  • Attach the device

  • Open prompt through build OS | Open Release Directory

    • dumpbin –exports StreamDrv.dll

Yüklə 452 b.

Dostları ilə paylaş:

Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur © 2023
rəhbərliyinə müraciət

    Ana səhifə