-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathusb.cabal
97 lines (88 loc) · 4.09 KB
/
usb.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: usb
version: 1.3.0.6
cabal-version: >=1.6
build-type: Simple
license: BSD3
license-file: LICENSE
copyright: 2009–2017 Bas van Dijk <[email protected]>
author: Bas van Dijk <[email protected]>
maintainer: Bas van Dijk <[email protected]>
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
@bindings-libusb@
(<http://hackage.haskell.org/package/bindings-libusb>)
which is a low-level binding to the C library:
@libusb-1.*@ (<http://libusb.org/>).
.
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
USB 2.0 specification (<http://www.usb.org/developers/docs/>).
.
For an example how to use this library see the
@usb-example@ package (<https://github.com/basvandijk/usb-example>)
or the @ls-usb@ package (<http://hackage.haskell.org/package/ls-usb>).
.
Besides this API documentation the following sources might be
interesting:
.
* The @libusb 1.0@ documentation (<http://libusb.sourceforge.net/api-1.0/>).
.
* The USB 2.0 specification (<http://www.usb.org/developers/docs/>).
.
* The @bindings-libusb@ documentation (<http://hackage.haskell.org/package/bindings-libusb>).
.
* \"USB in a NutShell\" (<http://www.beyondlogic.org/usbnutshell/usb1.htm>).
tested-with: GHC == 7.4.1, GHC == 7.4.2,
GHC == 7.6.1, GHC == 7.6.2, GHC == 7.6.3,
GHC == 7.8.1, GHC == 7.8.2, GHC == 7.8.3, GHC == 7.8.4
GHC == 7.10.1, GHC == 7.10.2, GHC == 7.10.3
GHC == 8.0.1, GHC == 8.0.2
GHC == 8.2.1, GHC == 8.2.2
GHC == 8.4.1
extra-source-files: README.markdown, Changelog
source-repository head
Type: git
Location: git://github.com/basvandijk/usb.git
Library
GHC-Options: -Wall
build-depends: base >= 4 && < 5
, bindings-libusb >= 1.4.5
, bytestring >= 0.9
, text >= 0.5
, vector >= 0.5
hs-source-dirs: src
exposed-modules: System.USB
System.USB.Initialization
System.USB.Misc
System.USB.Enumeration
System.USB.DeviceHandling
System.USB.Descriptors
System.USB.IO
System.USB.IO.StandardDeviceRequests
System.USB.Exceptions
other-modules: System.USB.Base, Utils
if !os(windows) && impl(ghc>7)
cpp-options: -DHAS_EVENT_MANAGER
exposed-modules: System.USB.IO.Transfers
other-modules: Poll, Event, SystemEventManager
build-depends: containers >= 0.1
if impl(ghc >= 7.2.1)
cpp-options: -DGENERICS
build-depends: ghc-prim >= 0.2