This sample project contains a Fuchsia driver for a composite device node. The driver binds with multiple parent device nodes that the controller driver creates.
To build the composite_sample
driver and related components, run the following command:
tools/bazel build //src/composite_sample/controller:pkg tools/bazel build //src/composite_sample/driver:pkg
Use the following commands to load the driver component on a target device:
Add a test node for the controller:
tools/ffx driver test-node add controller-node examples.driver.test.property=controller
Load the controller
driver component:
tools/bazel run //src/composite_sample/controller:pkg.component
Open the device log viewer to confirm the test nodes were added:
tools/ffx log --tags controller_driver
Load the composite_sample
driver component:
tools/bazel run //src/composite_sample/driver:pkg.component
Open the device log viewer:
tools/ffx log --tags composite-sample
You should see the driver component print after the driver has successfully bound:
[composite-sample,driver][I]: [src/composite_sample/composite_sample.cc:10] Hello from the composite driver!