usb: samples: Add HID sample
Add simple USB HID sample device. Connecting to Linux registers as
input device, lsusb is able to show descriptors (unbinded from input)
...
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 32
Report Descriptor: (length is 32)
Item(Global): Usage Page, data= [ 0x01 ] 1
Generic Desktop Controls
Item(Local ): Usage, data= [ 0x00 ] 0
Undefined
Item(Main ): Collection, data= [ 0x01 ] 1
Application
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Report ID, data= [ 0x01 ] 1
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x01 ] 1
Item(Local ): Usage, data= [ 0x00 ] 0
Undefined
Item(Main ): Input, data= [ 0x82 ] 130
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Volatile
Bitfield
Item(Global): Report ID, data= [ 0x02 ] 2
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x01 ] 1
Item(Local ): Usage, data= [ 0x00 ] 0
Undefined
Item(Main ): Output, data= [ 0x82 ] 130
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Volatile
Bitfield
Item(Main ): End Collection, data=none
...
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-01-24 20:10:29 +08:00
|
|
|
CONFIG_USB=y
|
|
|
|
CONFIG_USB_DEVICE_STACK=y
|
|
|
|
CONFIG_USB_DEVICE_HID=y
|
2018-03-13 22:28:02 +08:00
|
|
|
CONFIG_USB_DEVICE_PRODUCT="Zephyr HID sample"
|
usb: samples: Add HID sample
Add simple USB HID sample device. Connecting to Linux registers as
input device, lsusb is able to show descriptors (unbinded from input)
...
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 32
Report Descriptor: (length is 32)
Item(Global): Usage Page, data= [ 0x01 ] 1
Generic Desktop Controls
Item(Local ): Usage, data= [ 0x00 ] 0
Undefined
Item(Main ): Collection, data= [ 0x01 ] 1
Application
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Report ID, data= [ 0x01 ] 1
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x01 ] 1
Item(Local ): Usage, data= [ 0x00 ] 0
Undefined
Item(Main ): Input, data= [ 0x82 ] 130
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Volatile
Bitfield
Item(Global): Report ID, data= [ 0x02 ] 2
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x01 ] 1
Item(Local ): Usage, data= [ 0x00 ] 0
Undefined
Item(Main ): Output, data= [ 0x82 ] 130
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Volatile
Bitfield
Item(Main ): End Collection, data=none
...
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-01-24 20:10:29 +08:00
|
|
|
|
|
|
|
CONFIG_SYS_LOG=y
|
|
|
|
CONFIG_SYS_LOG_USB_DRIVER_LEVEL=1
|
|
|
|
CONFIG_SYS_LOG_USB_DEVICE_LEVEL=1
|