usb-1.1.0.3: usb.cabal
name: usb
version: 1.1.0.3
cabal-version: >=1.6
build-type: Custom
license: BSD3
license-file: LICENSE
copyright: 2009–2012 Bas van Dijk <v.dijk.bas@gmail.com>
author: Bas van Dijk <v.dijk.bas@gmail.com>
maintainer: Bas van Dijk <v.dijk.bas@gmail.com>
homepage: http://basvandijk.github.com/usb
bug-reports: https://github.com/basvandijk/usb/issues
category: System, Hardware
synopsis: Communicate with USB devices
description: This library enables you to communicate with USB devices from
userspace. It is implemented as a high-level wrapper around
<http://hackage.haskell.org/package/bindings-libusb bindings-libusb>
which is a low-level binding to the C library:
<http://libusb.org/ libusb-1.*>.
.
The USB transfer functions in this library have a simple synchronous
interface (they block) but are implemented using the @libusb@
asynchronous interface. They integrate with the GHC event manager
making them efficient (no busy-loops) and interruptible (throwing an
exception to the thread executing a transfer immediately cancels the
transfer).
.
If the GHC event manager is not available (because you're either not
using GHC or because you're on Windows) the library degrades
gracefully to the @libusb@ synchronous implementation.
.
This documentation assumes knowledge of how to operate USB
devices from a software standpoint (descriptors, configurations,
interfaces, endpoints, control\/bulk\/interrupt\/isochronous
transfers, etc). Full information can be found in the
<http://www.usb.org/developers/docs/ USB 2.0 specification>.
.
For an example how to use this library see the
<https://github.com/basvandijk/usb-example usb-example> package
or the <http://hackage.haskell.org/package/ls-usb ls-usb> package.
.
Also see the <http://hackage.haskell.org/package/usb-safe usb-safe>
package which wraps this package and provides some strong safety
guarantees for working with USB devices.
.
Finally have a look at the
<http://hackage.haskell.org/package/usb-iteratee usb-iteratee>
package which provides @iteratee@ enumerators for enumerating
bulk, interrupt and isochronous endpoints:
.
Besides this API documentation the following sources might be
interesting:
.
* <http://libusb.sourceforge.net/api-1.0/ The libusb 1.0 documentation>.
.
* <http://www.usb.org/developers/docs/ The USB 2.0 specification>.
.
* <http://hackage.haskell.org/package/bindings-libusb The bindings-libusb documentation>.
.
* <http://www.beyondlogic.org/usbnutshell/usb1.htm "USB in a NutShell">.
extra-source-files: README.markdown, NEWS
source-repository head
Type: git
Location: git://github.com/basvandijk/usb.git
Library
GHC-Options: -Wall
build-depends: base >= 4 && < 4.7
, base-unicode-symbols >= 0.1.1 && < 0.3
, bindings-libusb >= 1.4.4 && < 1.5
, bytestring >= 0.9 && < 0.11
, text >= 0.5 && < 0.12
exposed-modules: System.USB
System.USB.Initialization
System.USB.Enumeration
System.USB.DeviceHandling
System.USB.Descriptors
System.USB.IO
System.USB.IO.StandardDeviceRequests
System.USB.Exceptions
System.USB.Internal
other-modules: System.USB.Base, Utils
if impl(ghc>7) && !os(windows)
cpp-options: -DHAS_EVENT_MANAGER
other-modules: Poll, Event, SystemEventManager, Timeval
build-depends: containers >= 0.1 && < 0.6
if impl(ghc >= 7.2.1)
cpp-options: -DGENERICS
build-depends: ghc-prim >= 0.2 && < 0.4