GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
USB_TEMPLATE(4) FreeBSD Kernel Interfaces Manual USB_TEMPLATE(4)

usb_template
USB device side templates

To compile this module into the kernel, place the following line in your kernel configuration file:
device usb_template

To load the module at boot time, place the following line in loader.conf(5):

usb_template_load="YES"

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
USB Mass Storage, see cfumass(4)
CDC Ethernet, see cdce(4)
Media Transfer Protocol (MTP)
USB serial port, see umodem(4)
USB audio
USB keyboard
USB mouse
USB phone
CDC Ethernet and serial port
USB MIDI
CDC Ethernet, serial port, and storage
CDC Ethernet Emulation Model, see cdceem(4)

The following variables are available as both sysctl(8) variables and loader(8) tunables:
hw.usb.template
Currently selected template. Set to -1 to make the device disappear from the USB host point of view.
hw.usb.template_power
USB bus power consumption in mA at 5V. Must be between 0 and 500. Setting to 0 marks the device as self-powered. Defaults to 500mA.
hw.usb.templates.N
Configuration for template number N.
hw.usb.templates.N.vendor_id
16-bit vendor identifier (VID), usually assigned by USB-IF.
hw.usb.templates.N.product_id
16-bit product identifier (PID).
hw.usb.templates.N.manufacturer
String containing human-readable manufacturer name.
hw.usb.templates.N.product
String containing human-readable product name.

cfumass(4), usb(4), usfs(4), usbconfig(8)

The usb_template module complies to the USB 1.0, 2.0 and 3.0 standard.

The usb_template module was written by Hans Petter Selasky <hselasky@FreeBSD.org>.
August 7, 2019 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 4 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.