-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Mastering Embedded Linux Programming
By :

Eventually, when you have exhausted all the user-space options above, you will find yourself having to write a device driver to access a piece of hardware attached to your device. While this is not the time or place to delve into details, it is worth considering the options. Character drivers are the most flexible and should cover 90% of all your needs; network devices apply if you are working with a network interface, and block devices are for mass storage. The task of writing a kernel driver is complex and beyond the scope of this book. There are some references at the end that will help you on your way. In this section, I want to outline the options available for interacting with a driver—a topic not normally covered—and show you the basic bones of a driver.
The main character device interface is based on a stream of bytes, as you would have with a serial port. However, many devices don't fit this description: a controller...