usb-1.3.0.1: Communicate with USB devices

Copyright(c) 2009–2014 Bas van Dijk
LicenseBSD3 (see the file LICENSE)
MaintainerBas van Dijk <v.dijk.bas@gmail.com>
Safe HaskellTrustworthy
LanguageHaskell98

System.USB.Misc

Contents

Description

This module provides miscellaneous functionality.

Synopsis

Capabilties of libusb

data Capability Source

Capabilities supported by an instance of libusb on the current running platform.

Test if the loaded libusb library supports a given capability by calling hasCapability.

Constructors

HasCapability

The hasCapability API is available.

HasHotplug

Hotplug support is available on this platform.

HasHidAccess

The library can access HID devices without requiring user intervention.

Note that before being able to actually access an HID device, you may still have to call additional libusb functions such as detachKernelDriver.

SupportsDetachKernelDriver

The library supports detaching of the default USB driver, using detachKernelDriver, if one is set by the OS kernel.

hasCapability :: Ctx -> Capability -> Bool Source

Check at runtime if the loaded libusb library has a given capability.

This call should be performed after newCtx, to ensure the backend has updated its capability set. For this reason you need to apply it to a Ctx.

Version of libusb

data LibusbVersion Source

Structure providing the version of the libusb runtime.

Constructors

LibusbVersion 

Fields

major :: Word16

Library major version.

minor :: Word16

Library minor version.

micro :: Word16

Library micro version.

nano :: Word16

Library nano version.

rc :: String

Library release candidate suffix string, e.g. "-rc4".

libusbVersion :: LibusbVersion Source

Returns the version (major, minor, micro, nano and rc) of the loaded libusb library.

toVersion :: LibusbVersion -> Version Source

Convert a LibusbVersion to a Version for easy comparison.