最終更新:2022-08-24 (水) 12:31:50 (608d)  

GadgetFS
Top / GadgetFS

Gadget Filesystem

.config

概要

  • This driver provides a filesystem based API that lets user mode programs implement a single-configuration USB device, including endpoint I/O and control requests that don't relate to enumeration.
  • All endpoints, transfer speeds, and transfer types supported by the hardware are available, through read() and write() calls.

モジュール

デバイスファイル

$CHIP

  • allows you to open Endpoint Zero and write descriptors to the gadget framework.
    fd = open ("/dev/gadget/$CHIP", O_RDWR)
    status = write (fd, descriptors, sizeof descriptors)

サンプル

メモ

  • Provides User-Mode API
  • Each endpoint presented as single I/O file descriptor
  • Normal read() and write() calls
  • Async I/O supported
  • Configuration and descriptors written into files

メモ

コード

関連

参考