zephyr/samples/subsys/usb/hid
Ulf Magnusson bd6e04411e kconfig: Clean up header comments and make them consistent
Use this short header style in all Kconfig files:

    # <description>

    # <copyright>
    # <license>

    ...

Also change all <description>s from

    # Kconfig[.extension] - Foo-related options

to just

    # Foo-related options

It's clear enough that it's about Kconfig.

The <description> cleanup was done with this command, along with some
manual cleanup (big letter at the start, etc.)

    git ls-files '*Kconfig*' | \
        xargs sed -i -E '1 s/#\s*Kconfig[\w.-]*\s*-\s*/# /'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05:00
..
src
CMakeLists.txt
Kconfig kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
README.rst boards: remove quarl_se_c1000 2019-07-29 21:30:25 -07:00
prj.conf
sample.yaml samples: usb: hid: Fix harness configuration 2019-05-27 09:25:06 -04:00

README.rst

.. _usb_hid:

USB HID Sample Application
##########################

Overview
********

This sample app demonstrates use of a USB Human Interface Device (HID) driver
by the Zephyr project.  This very simple driver is enumerated as a raw HID
device. This sample can be found under :zephyr_file:`samples/subsys/usb/hid` in the
Zephyr project tree.

Requirements
************

This project requires a USB device driver.

Building and Running
********************

This sample can be built for multiple boards, in this example we will build it
for the reel_board board:

.. zephyr-app-commands::
   :zephyr-app: samples/subsys/usb/hid
   :board: reel_board
   :goals: build
   :compact:

After you have built and flashed the sample app image to your board, plug the
board into a host device, for example, a PC running Linux.
The board will be detected as shown by the Linux journalctl command:

.. code-block:: console

    $ journalctl -k -n 10
    usb 7-1: New USB device found, idVendor=2fe3, idProduct=0100
    usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    usb 7-1: Product: Zephyr HID sample
    usb 7-1: Manufacturer: ZEPHYR
    usb 7-1: SerialNumber: 0.01
    input: ZEPHYR Zephyr HID sample as /devices/platform/vhci_hcd.0/usb7/7-1/7-1:1.0/0003:2FE3:0100.0046/input/input81
    hid-generic 0003:2FE3:0100.0046: input,hidraw0: USB HID v1.10 Device [ZEPHYR Zephyr HID sample] on usb-vhci_hcd.0-1/input0

You can monitor report sending using standard Linux ``usbhid-dump`` command.

.. code-block:: console

    $ sudo usbhid-dump -d 2fe3:0100 -es
    Starting dumping interrupt transfer stream
    with 1 minute timeout.

    007:012:000:STREAM             1537362690.341208
     01 02