ABSTRACT

Computers use many peripheral devices to either provide inputs to the computer or to receive outputs from the computer. Present-day peripheral devices are all driven by software. Devices can be printers, machines, rockets, airplanes, washing machines, or any machine that can be controlled by the computer. The device comes with a set of programmable primitives and an interface to interact with the computer. Basically, writing device drivers involves translating the computer commands to the corresponding primitives of the device. Additionally, we need to monitor the health of the device, which includes checking if the device is powered up, if there is any error condition on the device, if the consumables such as paper or workpieces are mounted on the device, if the buffer of the device is full, and so on. We need to program the core functionality of the device and the ancillary functionality of the device. All these aspects are discussed in this chapter.