In protected operating systems such as Windows and Linux, a programmer
cannot access hardware directly from the application level (user mode), where
development work is usually done. Hardware can only be accessed from within the
operating system itself (kernel mode or Ring-0), utilizing software modules
called device drivers. In order to access a custom hardware device from the
application level, a programmer must do the following:
Learn the internals of the operating system he is working on.
Learn how to write a device driver.
Learn new tools for developing/debugging in kernel mode (WDK, ETK,
Write the kernel-mode device driver that does the basic hardware
Write the application in user mode that accesses the hardware
through the device driver written in kernel mode.
Repeat the first four steps for each new operating system on which
the code should run.