|
|
|
|
|
|
Synopsis |
|
|
|
|
Device descriptor
|
|
|
A structure representing the standard USB device descriptor.
This descriptor is documented in section 9.6.1 of the USB 2.0 specification.
This structure can be retrieved by getDeviceDesc.
| Instances | |
|
|
|
Get the USB device descriptor for a given device.
This is a non-blocking function; the device descriptor is cached in memory.
This function may throw USBExceptions.
|
|
Querying device descriptors
|
|
|
USB specification release
number in binary-coded
decimal.
|
|
|
A decoded 16 bits Binary Coded Decimal using 4 bits for each digit.
|
|
|
USB-IF class code for the
device.
|
|
|
USB-IF subclass code for the
device, qualified by the
deviceClass value.
|
|
|
USB-IF protocol code for the
device, qualified by the
deviceClass and
deviceSubClass values.
|
|
|
Maximum packet size for
endpoint 0.
|
|
|
USB-IF vendor ID.
|
|
|
For a database of USB vendors and products see the usb-id-database
package at: http://hackage.haskell.org/package/usb-id-database
|
|
|
USB-IF product ID.
|
|
|
|
|
Device release number in
binary-coded decimal.
|
|
|
Index of string descriptor
describing manufacturer.
|
|
|
Index of string descriptor
describing product.
|
|
|
Index of string descriptor
containing device serial
number.
|
|
|
Number of possible
configurations.
|
|
Configuration descriptor
|
|
|
|
|
|
Get the USB configuration descriptor for the currently active
configuration.
This is a non-blocking function which does not involve any requests being sent
to the device.
Exceptions:
|
|
|
Get a USB configuration descriptor based on its index.
This is a non-blocking function which does not involve any requests being sent
to the device.
Exceptions:
|
|
|
Get a USB configuration descriptor with a specific configValue.
This is a non-blocking function which does not involve any requests being sent
to the device.
Exceptions:
|
|
Querying configuration descriptors
|
|
|
Identifier value for this
configuration.
|
|
|
Index of string descriptor
describing this configuration.
|
|
|
Configuration characteristics.
|
|
|
|
|
Constructors | DeviceStatus | | remoteWakeup :: Bool | The Remote Wakeup field indicates whether the
device is currently enabled to request remote
wakeup. The default mode for devices that
support remote wakeup is disabled.
| selfPowered :: Bool | The Self Powered field indicates whether the
device is currently self-powered
|
|
| Instances | |
|
|
|
Maximum power consumption of the
USB device from this bus in this
configuration when the device is
fully operational. Expressed in
2 mA units (i.e., 50 = 100 mA).
|
|
|
Number of interfaces supported by
this configuration.
|
|
|
List of interfaces supported by
this configuration. An interface
is represented as a list of
alternate interface settings.
Note that the length of this list
should equal
configNumInterfaces.
|
|
|
Extra descriptors. If libusb
encounters unknown configuration
descriptors, it will store them
here, should you wish to parse
them.
|
|
Interface descriptor
|
|
|
A structure representing the standard USB interface descriptor.
This descriptor is documented in section 9.6.5 of the USB 2.0 specification.
This structure can be retrieved using configInterfaces.
| Instances | |
|
|
Querying interface descriptors
|
|
|
Number of this
interface.
|
|
|
Value used to select
this alternate setting
for this interface.
|
|
|
USB-IF class code for
this interface.
|
|
|
USB-IF subclass code for
this interface,
qualified by the
interfaceClass value.
|
|
|
USB-IF protocol code for
this interface,
qualified by the
interfaceClass and
interfaceSubClass
values.
|
|
|
Index of string
descriptor describing
this interface.
|
|
|
Number of endpoints used
by this interface
(excluding the control
endpoint).
|
|
|
List of endpoint
descriptors. Note that
the length of this list
should equal
interfaceNumEndpoints.
|
|
|
Extra descriptors. If
libusb encounters
unknown interface
descriptors, it will
store them here, should
you wish to parse them.
|
|
Endpoint descriptor
|
|
|
A structure representing the standard USB endpoint descriptor.
This descriptor is documented in section 9.6.3 of the USB 2.0 specification. All
multiple-byte fields are represented in host-endian format.
This structure can be retrieved using interfaceEndpoints.
| Instances | |
|
|
Querying endpoint descriptors
|
|
|
The address of the endpoint described
by this descriptor.
|
|
|
Constructors | | Instances | |
|
|
|
Direction of data transfer relative to the host.
| Constructors | Out | Host to device.
| In | Device to host.
|
| Instances | |
|
|
|
Attributes which apply to the
endpoint when it is configured using
the configValue.
|
|
|
|
|
Constructors | | Instances | |
|
|
|
Constructors | NoSynchronization | | Asynchronous | | Adaptive | | Synchronous | |
| Instances | |
|
|
|
Constructors | | Instances | |
|
|
|
Maximum packet size this endpoint is
capable of sending/receiving.
|
|
|
Constructors | | Instances | |
|
|
data TransactionOpportunities | Source |
|
Constructors | NoAdditionalTransactions | | OneAdditionlTransaction | | TwoAdditionalTransactions | |
| Instances | |
|
|
|
Interval for polling endpoint for
data transfers. Expressed in frames
or microframes depending on the
device operating speed (i.e., either
1 millisecond or 125 s units).
|
|
|
For audio devices only: the rate at
which synchronization feedback is
provided.
|
|
|
For audio devices only: the address
if the synch endpoint.
|
|
|
Extra descriptors. If libusb
encounters unknown endpoint
descriptors, it will store
them here, should you wish to
parse them.
|
|
String descriptors
|
|
|
Retrieve a list of supported languages.
This function may throw USBExceptions.
|
|
|
The language ID consists of the primary language identifier and the
sublanguage identififier as described in:
http://www.usb.org/developers/docs/USB_LANGIDs.pdf
For a mapping between IDs and languages see the usb-id-database package at:
http://hackage.haskell.org/package/usb-id-database
To see which LangIds are supported by a device see getLanguages.
|
|
|
|
|
|
|
Type of indici of string descriptors.
Can be retrieved by all the *StrIx functions.
|
|
|
Retrieve a string descriptor from a device.
This is a convenience function which formulates the appropriate control message
to retrieve the descriptor. The string returned is Unicode, as detailed in the
USB specifications.
This function may throw USBExceptions.
|
|
|
Retrieve a string descriptor from a device using the first supported
language.
This is a convenience function which formulates the appropriate control message
to retrieve the descriptor. The string returned is Unicode, as detailed in the
USB specifications.
This function may throw USBExceptions.
|
|
Produced by Haddock version 2.4.2 |