最終更新:2021-03-02 (火) 02:21:25 (1145d)  

Linux/USBガジェット/HID

概要

  • The HID Gadget driver provides emulation of USB Human Interface Devices (HID).
  • The basic HID handling is done in the kernel, and HID reports can be sent/received through I/O on the /dev/hidgX character devices.

.config

ドライバ

ドキュメント・サンプル

デバイスファイル

ソースコード

カーネル側

ユーザ側

手順

ディスクリプタの定義

kernel.org/doc/Documentation/usb/gadget_hid.txt

  • g_hid is a platform driver, so to use it you need to add struct platform_device(s) to your platform code defining the HID function descriptors you want to use.

https://users.atmark-techno.com/blog/750/2465

g_hid-demo

  • Normally the platform_device descriptor would be part of the board support for the device, e.g. in arch/arm/mach-omap2/devices.c, but for convenience I am putting it in to the g_hid module to make easier for testing.

参考

関連