]> sigrok.org Git - sigrok-util.git/blame - source/README.new-driver
sigrok-cross-mingw: Add required libusb patch for MXE.
[sigrok-util.git] / source / README.new-driver
CommitLineData
a65d66c0
BV
1The 'new-driver' script is meant to reduce the "red tape" involved in creating
2a new hardware driver for sigrok. It checks out a new copy of libsigrok from
3the git repository, makes entries in the build system for your device, and
4creates source code stubs to help you get started.
5
6If you're writing a driver for a new multimeter (DMM) called the
7'Flupe Goodluck', invoke the script like this:
8
9 ./new-driver Flupe Goodluck
10
11The output will show something like this:
12
13Cloning into 'libsigrok'...
14[master d5f915f] flupe-goodluck: initial driver skeleton
15 6 files changed, 321 insertions(+)
a65d66c0
BV
16 create mode 100644 hardware/flupe-goodluck/api.c
17 create mode 100644 hardware/flupe-goodluck/protocol.c
18 create mode 100644 hardware/flupe-goodluck/protocol.h
190001-flupe-goodluck-initial-driver-skeleton.patch
20
21The last line shows the name of the patch file that's created for you. It's
22a proper git mail patch, and can be applied to your tree like this:
23
24cd /some/path/libsigrok
25git am /some/place/0001-flupe-goodluck-initial-driver-skeleton.patch
26