tree: 5aaf2aa670f5d7fdbe75342a5dd36f198d1aa138 [path history] [tgz]
  1. meta/
  3. component-info.json
  5. skeleton_driver.bind
  7. skeleton_driver.h

Skeleton Driver

Reviewed on: 2024-02-06

Skeleton driver is an minimal driver written in DFv2.


To include the driver to your build, append --with //examples/drivers:drivers to your fx set command. For example:

$ fx set core.x64 --with //examples/drivers:drivers
$ fx build


Register the driver by running this command

$ ffx driver register fuchsia-pkg://

Verify that fuchsia-pkg:// shows up in the list after running this command

ffx driver list

Add a test node that binds to the driver:

$ ffx driver test-node add my_node gizmo.example.TEST_NODE_ID=skeleton_driver

Run the following command to verify that the driver is bound to the node:

$ ffx driver list-devices -v my_node

You should see something like this:

Name     : my_node
Moniker  : dev.my_node
Driver   : fuchsia-pkg://
2 Properties
[ 1/  2] : Key "gizmo.example.TEST_NODE_ID"   Value "skeleton_driver"
[ 2/  2] : Key "fuchsia.platform.DRIVER_FRAMEWORK_VERSION" Value 0x000002
0 Offers

Source layout

The core implementation is in