Search code examples
device-driverdrivers

What does a device driver look like?


When a manufacturer designs a hardware device, they obviously have someone who is in charge of writing a driver for that device for different platforms.

While I know that there are probably more than one "type" of driver for different types of devices, a driver for a device by it's nature must be very different from a normal application or script.

I've always wanted to pick apart a driver just to find out how it allows an OS to interface with hardware, but my programming knowledge is lacking.

Out of curiosity, I'd just like to know:

  • How does a device driver work, exactly?
  • When designing a driver for a device, what things do programmers consider?
  • What languages are drivers written in?
  • What is the overall process for designing a driver?

Solution

  • When designing a device driver, programmers look at the functionalities of the device that are to be implemented and write the driver accordingly

    I prefer C / C++ for writing a device driver but have seen driver in assembly language also

    overall process is dependent on device itself