index.rst 906 B

1234567891011121314151617181920212223242526272829303132
  1. ==============
  2. Device Drivers
  3. ==============
  4. NuttX supports a variety of device drivers, which can be broadly
  5. divided in three classes:
  6. .. toctree::
  7. :maxdepth: 1
  8. character/index.rst
  9. block/index.rst
  10. special/index.rst
  11. .. note::
  12. Device driver support depends on the *in-memory*, *pseudo*
  13. file system that is enabled by default.
  14. Lower-half and upper-half
  15. =========================
  16. Drivers in NuttX generally work in two distinct layers:
  17. * An *upper half* which registers itself to NuttX using
  18. a call such as :c:func:`register_driver` or
  19. :c:func:`register_blockdriver` and implements the corresponding
  20. high-level interface (`read`, `write`, `close`, etc.).
  21. implements the interface. This *upper half* calls into
  22. the *lower half* via callbacks.
  23. * A "lower half" which is typically hardware-specific. This is
  24. usually implemented at the architecture or board level.