最終更新:2017-07-21 (金) 15:15:06 (844d)  

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.

参考

関連