Selecting the best driver for a given system depends on several different factors:
- How is the calling code designed?
- How much delay is acceptable?
- How fast is data moving?
- What type of device is it?
Let's answer these questions one by one.
Selecting the best driver for a given system depends on several different factors:
Let's answer these questions one by one.
What is the intended design of higher-level code using the driver? Will it operate on individual characters or bytes as they come in? Or does it make more sense for the higher-level code to batch transfers into blocks/frames of bytes?
Queue-based drivers are very useful when dealing with unknown amounts (or streams) of data that can come in at any point in time. They are also a very natural fit for code that processes individual...