DFv2 driver development documentation

The documentation in this section is designed to help driver developers create new drivers using Fuchsia's driver framework version 2 (DFv2).

How-to

Tutorials

  • Bind rules tutorial: Learn how to write bind rules for DFv2 drivers to discover and match devices.
  • Bind library code generation tutorial: Learn how to use bind libraries to auto-generate code for DFv2 drivers.
  • FIDL tutorial: Learn how to define FIDL protocols, export them from a driver, and use them in another driver.
  • Metadata tutorial: Learn how to pass metadata from one driver to another using the metadata library in DFv2.

Debugging

Testing

  • DriverTestRealm: Learn how to use the DriverTestRealm framework for running driver integration tests.
  • Threading tips in tests: Understand best practices for handling threading in driver tests to avoid crashes.

Best practices

Guidelines

Concepts

  • DMA (Direct Memory Access): Understand DMA and its importance in DFv2 driver development.
  • For more information on DFv2-specific concepts, see Drivers under the Fundamentals section.

Additional information

See the following tutorials under the SDK section: