libusbgx: Add example to show how to create ffs functions.
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Mon, 9 Jun 2014 11:06:15 +0000 (13:06 +0200)
committerKrzysztof Opasiak <k.opasiak@samsung.com>
Tue, 22 Dec 2015 19:40:31 +0000 (20:40 +0100)
commitd6760068294583e7f8fc571fa2f0f158b882ffcd
treec55f986c51f6331f0f8b8215a9caff214b328920
parentae40a83095f16fbc28b6c4b36650df88661c7a5b
libusbgx: Add example to show how to create ffs functions.

Add example which demonstartes two ways of creating ffs
based usb functions.

How to set-up gadget using this example:
1) Run gadget-ffs

2) Mount both instances:
 $ mount my_dev_name -t functionfs /path/to/mount/dir1
 $ mount my_awesome_dev_name -t functionfs /path/to/mount/dir2

3) Run ffs daemons for both instances:
 $ my-ffs-daemon /path/to/mount/dir1
 $ my-ffs-daemon /path/to/mount/dir2

4) Enable your gadget:
 $ echo "my_udc_name" > /sys/kernel/config/usb_gadget/g1/UDC

Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
[Port from libusbg and update description]
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
examples/Makefile.am
examples/gadget-ffs.c [new file with mode: 0644]