A device driver is software that lies between the application and
the device. These device drivers provide a uniform interface to interact
with the hardware. In UNIX specifically, hardware devices are accessed
through device files, hence the the common linux-ism,
everything is a file
.
int main(void) {
int handle = open("/dev/fb0", O_RDONLY);
if (handle == -1)
perror("unable to open '/dev/fb0'");
}
As seen above, the method in which you interact with a device file is the same as you would a normal file.
Imagine a