Machine-translated by Google. Questions are authored in English.
Top

Discussion

A well designed driver interface exposes

  • A.the interrupt vector the device uses
  • B.the DMA channel the driver has been allocated
  • C.operations in terms of the device's function
  • D.the addresses of the device's registers to the caller

Answer: C

Correct answer: operations in terms of the device's function

A driver exists to hide the hardware, so its interface should speak of reading a temperature or sending a frame rather than of registers, vectors and channels. Exposing those ties every caller to the particular device, and a change of part then propagates through the whole application instead of stopping at the driver.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.