The
usb_template
module implements various USB templates that are needed when
programming an USB device side driver.
A USB template consists of an USB device descriptor, one or more USB
configuration descriptors, one or more USB interface descriptors, one
or more USB endpoint descriptors, USB strings and additional USB
descriptors.
USB templates are selected using the
hw.usb.template
sysctl and tunable,
or by using the
usbconfig(8)
set_template
subcommand.
Changing the
hw.usb.template
sysctl triggers reenumeration by the USB host; changes to other sysctls
may not be visible to the host until reenumeration is performed.
Available templates are:
Value | Description |
0 | USB Mass Storage, seecfumass(4)
|
1 | CDC Ethernet, seecdce(4)
|
2 | Media Transfer Protocol (MTP) |
3 | USB serial port, seeumodem(4)
|
4 | USB audio |
5 | USB keyboard |
6 | USB mouse |
7 | USB phone |
8 | CDC Ethernet and serial port |
9 | USB MIDI |
10 | CDC Ethernet, serial port, and storage |
11 | CDC Ethernet Emulation Model, seecdceem(4)
|