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

Discussion

A driver's initialisation returns an error code rather than halting because

  • A.the caller may be able to continue without that device
  • B.halting is forbidden by the C standard in a library
  • C.the error code carries the register contents back to the caller
  • D.initialisation cannot fail on a correctly built board

Answer: A

A missing optional sensor should degrade the product rather than prevent it starting, and only the application knows which devices are essential. A driver that decides to halt takes that judgement away from the layer entitled to make it.

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

Post your comment

Please log in or register to post a comment.