Copyright | (c) 2009–2017 Bas van Dijk |
---|---|
License | BSD3 (see the file LICENSE) |
Maintainer | Bas van Dijk <v.dijk.bas@gmail.com> |
Safe Haskell | Trustworthy |
Language | Haskell98 |
This module provides miscellaneous functionality.
- data Capability
- hasCapability :: Ctx -> Capability -> Bool
- data LibusbVersion = LibusbVersion {}
- libusbVersion :: LibusbVersion
- toVersion :: LibusbVersion -> Version
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
.
HasCapability | The |
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 |
SupportsDetachKernelDriver | The library supports detaching of the default USB driver,
using |
hasCapability :: Ctx -> Capability -> Bool Source #
Version of libusb
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.