tinygrad 0.10.2__py3-none-any.whl → 0.11.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tinygrad/__init__.py +1 -1
- tinygrad/apps/llm.py +206 -0
- tinygrad/codegen/__init__.py +116 -0
- tinygrad/codegen/devectorizer.py +315 -172
- tinygrad/codegen/expander.py +8 -16
- tinygrad/codegen/gpudims.py +89 -0
- tinygrad/codegen/linearize.py +205 -203
- tinygrad/codegen/lowerer.py +92 -139
- tinygrad/codegen/opt/__init__.py +38 -0
- tinygrad/codegen/opt/heuristic.py +125 -0
- tinygrad/codegen/opt/kernel.py +510 -0
- tinygrad/{engine → codegen/opt}/search.py +51 -35
- tinygrad/codegen/opt/swizzler.py +134 -0
- tinygrad/codegen/opt/tc.py +127 -0
- tinygrad/codegen/quantize.py +67 -0
- tinygrad/device.py +122 -132
- tinygrad/dtype.py +152 -35
- tinygrad/engine/jit.py +81 -54
- tinygrad/engine/memory.py +46 -27
- tinygrad/engine/realize.py +82 -41
- tinygrad/engine/schedule.py +70 -445
- tinygrad/frontend/__init__.py +0 -0
- tinygrad/frontend/onnx.py +1253 -0
- tinygrad/frontend/torch.py +5 -0
- tinygrad/gradient.py +19 -27
- tinygrad/helpers.py +95 -47
- tinygrad/nn/__init__.py +7 -8
- tinygrad/nn/optim.py +72 -41
- tinygrad/nn/state.py +37 -23
- tinygrad/renderer/__init__.py +40 -60
- tinygrad/renderer/cstyle.py +143 -128
- tinygrad/renderer/llvmir.py +113 -62
- tinygrad/renderer/ptx.py +50 -32
- tinygrad/renderer/wgsl.py +27 -23
- tinygrad/runtime/autogen/am/am.py +5861 -0
- tinygrad/runtime/autogen/am/pm4_nv.py +962 -0
- tinygrad/runtime/autogen/am/pm4_soc15.py +931 -0
- tinygrad/runtime/autogen/am/sdma_4_0_0.py +5209 -0
- tinygrad/runtime/autogen/am/sdma_4_4_2.py +5209 -0
- tinygrad/runtime/autogen/am/sdma_5_0_0.py +7103 -0
- tinygrad/runtime/autogen/am/sdma_6_0_0.py +8085 -0
- tinygrad/runtime/autogen/am/smu_v13_0_0.py +3068 -0
- tinygrad/runtime/autogen/am/smu_v14_0_2.py +3605 -0
- tinygrad/runtime/autogen/amd_gpu.py +1433 -67197
- tinygrad/runtime/autogen/comgr.py +35 -9
- tinygrad/runtime/autogen/comgr_3.py +906 -0
- tinygrad/runtime/autogen/cuda.py +2419 -494
- tinygrad/runtime/autogen/hsa.py +57 -16
- tinygrad/runtime/autogen/ib.py +7171 -0
- tinygrad/runtime/autogen/io_uring.py +917 -118
- tinygrad/runtime/autogen/kfd.py +748 -26
- tinygrad/runtime/autogen/libc.py +613 -218
- tinygrad/runtime/autogen/libusb.py +1643 -0
- tinygrad/runtime/autogen/nv/nv.py +8602 -0
- tinygrad/runtime/autogen/nv_gpu.py +7218 -2072
- tinygrad/runtime/autogen/opencl.py +2 -4
- tinygrad/runtime/autogen/sqtt.py +1789 -0
- tinygrad/runtime/autogen/vfio.py +3 -3
- tinygrad/runtime/autogen/webgpu.py +273 -264
- tinygrad/runtime/graph/cuda.py +3 -3
- tinygrad/runtime/graph/hcq.py +68 -29
- tinygrad/runtime/graph/metal.py +29 -13
- tinygrad/runtime/graph/remote.py +114 -0
- tinygrad/runtime/ops_amd.py +537 -320
- tinygrad/runtime/ops_cpu.py +108 -7
- tinygrad/runtime/ops_cuda.py +12 -14
- tinygrad/runtime/ops_disk.py +13 -10
- tinygrad/runtime/ops_dsp.py +47 -40
- tinygrad/runtime/ops_gpu.py +13 -11
- tinygrad/runtime/ops_hip.py +6 -9
- tinygrad/runtime/ops_llvm.py +35 -15
- tinygrad/runtime/ops_metal.py +29 -19
- tinygrad/runtime/ops_npy.py +5 -3
- tinygrad/runtime/ops_null.py +28 -0
- tinygrad/runtime/ops_nv.py +306 -234
- tinygrad/runtime/ops_python.py +62 -52
- tinygrad/runtime/ops_qcom.py +28 -39
- tinygrad/runtime/ops_remote.py +482 -0
- tinygrad/runtime/ops_webgpu.py +28 -28
- tinygrad/runtime/support/am/amdev.py +114 -249
- tinygrad/runtime/support/am/ip.py +211 -172
- tinygrad/runtime/support/amd.py +138 -0
- tinygrad/runtime/support/{compiler_hip.py → compiler_amd.py} +40 -8
- tinygrad/runtime/support/compiler_cuda.py +8 -11
- tinygrad/runtime/support/elf.py +2 -1
- tinygrad/runtime/support/hcq.py +184 -97
- tinygrad/runtime/support/ib.py +172 -0
- tinygrad/runtime/support/llvm.py +3 -4
- tinygrad/runtime/support/memory.py +251 -0
- tinygrad/runtime/support/nv/__init__.py +0 -0
- tinygrad/runtime/support/nv/ip.py +581 -0
- tinygrad/runtime/support/nv/nvdev.py +183 -0
- tinygrad/runtime/support/system.py +170 -0
- tinygrad/runtime/support/usb.py +268 -0
- tinygrad/runtime/support/webgpu.py +18 -0
- tinygrad/schedule/__init__.py +0 -0
- tinygrad/schedule/grouper.py +119 -0
- tinygrad/schedule/kernelize.py +368 -0
- tinygrad/schedule/multi.py +231 -0
- tinygrad/shape/shapetracker.py +40 -46
- tinygrad/shape/view.py +88 -52
- tinygrad/tensor.py +968 -542
- tinygrad/uop/__init__.py +117 -0
- tinygrad/{codegen/transcendental.py → uop/decompositions.py} +125 -38
- tinygrad/uop/mathtraits.py +169 -0
- tinygrad/uop/ops.py +1021 -0
- tinygrad/uop/spec.py +228 -0
- tinygrad/{codegen → uop}/symbolic.py +239 -216
- tinygrad/uop/upat.py +163 -0
- tinygrad/viz/assets/cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/languages/x86asm.min.js +19 -0
- tinygrad/viz/assets/d3js.org/d3.v7.min.js +2 -0
- tinygrad/viz/assets/dagrejs.github.io/project/dagre/latest/dagre.min.js +801 -0
- tinygrad/viz/index.html +203 -403
- tinygrad/viz/js/index.js +718 -0
- tinygrad/viz/js/worker.js +29 -0
- tinygrad/viz/serve.py +224 -102
- {tinygrad-0.10.2.dist-info → tinygrad-0.11.0.dist-info}/METADATA +24 -16
- tinygrad-0.11.0.dist-info/RECORD +141 -0
- {tinygrad-0.10.2.dist-info → tinygrad-0.11.0.dist-info}/WHEEL +1 -1
- tinygrad/codegen/kernel.py +0 -693
- tinygrad/engine/multi.py +0 -161
- tinygrad/ops.py +0 -1003
- tinygrad/runtime/ops_cloud.py +0 -220
- tinygrad/runtime/support/allocator.py +0 -94
- tinygrad/spec.py +0 -155
- tinygrad/viz/assets/d3js.org/d3.v5.min.js +0 -2
- tinygrad/viz/assets/dagrejs.github.io/project/dagre-d3/latest/dagre-d3.min.js +0 -4816
- tinygrad/viz/perfetto.html +0 -178
- tinygrad-0.10.2.dist-info/RECORD +0 -99
- {tinygrad-0.10.2.dist-info → tinygrad-0.11.0.dist-info/licenses}/LICENSE +0 -0
- {tinygrad-0.10.2.dist-info → tinygrad-0.11.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1643 @@
|
|
1
|
+
# mypy: ignore-errors
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
#
|
4
|
+
# TARGET arch is: []
|
5
|
+
# WORD_SIZE is: 8
|
6
|
+
# POINTER_SIZE is: 8
|
7
|
+
# LONGDOUBLE_SIZE is: 16
|
8
|
+
#
|
9
|
+
import ctypes, ctypes.util, os
|
10
|
+
|
11
|
+
|
12
|
+
class FunctionFactoryStub:
|
13
|
+
def __getattr__(self, _):
|
14
|
+
return ctypes.CFUNCTYPE(lambda y:y)
|
15
|
+
|
16
|
+
# libraries['libusb'] explanation
|
17
|
+
# As you did not list (-l libraryname.so) a library that exports this function
|
18
|
+
# This is a non-working stub instead.
|
19
|
+
# You can either re-run clan2py with -l /path/to/library.so
|
20
|
+
# Or manually fix this by comment the ctypes.CDLL loading
|
21
|
+
_libraries = {}
|
22
|
+
_libraries['libusb'] = None if (lib_path:=os.getenv('LIBUSB_PATH', ctypes.util.find_library('usb-1.0'))) is None else ctypes.CDLL(lib_path) # ctypes.CDLL('libusb')
|
23
|
+
class AsDictMixin:
|
24
|
+
@classmethod
|
25
|
+
def as_dict(cls, self):
|
26
|
+
result = {}
|
27
|
+
if not isinstance(self, AsDictMixin):
|
28
|
+
# not a structure, assume it's already a python object
|
29
|
+
return self
|
30
|
+
if not hasattr(cls, "_fields_"):
|
31
|
+
return result
|
32
|
+
# sys.version_info >= (3, 5)
|
33
|
+
# for (field, *_) in cls._fields_: # noqa
|
34
|
+
for field_tuple in cls._fields_: # noqa
|
35
|
+
field = field_tuple[0]
|
36
|
+
if field.startswith('PADDING_'):
|
37
|
+
continue
|
38
|
+
value = getattr(self, field)
|
39
|
+
type_ = type(value)
|
40
|
+
if hasattr(value, "_length_") and hasattr(value, "_type_"):
|
41
|
+
# array
|
42
|
+
if not hasattr(type_, "as_dict"):
|
43
|
+
value = [v for v in value]
|
44
|
+
else:
|
45
|
+
type_ = type_._type_
|
46
|
+
value = [type_.as_dict(v) for v in value]
|
47
|
+
elif hasattr(value, "contents") and hasattr(value, "_type_"):
|
48
|
+
# pointer
|
49
|
+
try:
|
50
|
+
if not hasattr(type_, "as_dict"):
|
51
|
+
value = value.contents
|
52
|
+
else:
|
53
|
+
type_ = type_._type_
|
54
|
+
value = type_.as_dict(value.contents)
|
55
|
+
except ValueError:
|
56
|
+
# nullptr
|
57
|
+
value = None
|
58
|
+
elif isinstance(value, AsDictMixin):
|
59
|
+
# other structure
|
60
|
+
value = type_.as_dict(value)
|
61
|
+
result[field] = value
|
62
|
+
return result
|
63
|
+
|
64
|
+
|
65
|
+
class Structure(ctypes.Structure, AsDictMixin):
|
66
|
+
|
67
|
+
def __init__(self, *args, **kwds):
|
68
|
+
# We don't want to use positional arguments fill PADDING_* fields
|
69
|
+
|
70
|
+
args = dict(zip(self.__class__._field_names_(), args))
|
71
|
+
args.update(kwds)
|
72
|
+
super(Structure, self).__init__(**args)
|
73
|
+
|
74
|
+
@classmethod
|
75
|
+
def _field_names_(cls):
|
76
|
+
if hasattr(cls, '_fields_'):
|
77
|
+
return (f[0] for f in cls._fields_ if not f[0].startswith('PADDING'))
|
78
|
+
else:
|
79
|
+
return ()
|
80
|
+
|
81
|
+
@classmethod
|
82
|
+
def get_type(cls, field):
|
83
|
+
for f in cls._fields_:
|
84
|
+
if f[0] == field:
|
85
|
+
return f[1]
|
86
|
+
return None
|
87
|
+
|
88
|
+
@classmethod
|
89
|
+
def bind(cls, bound_fields):
|
90
|
+
fields = {}
|
91
|
+
for name, type_ in cls._fields_:
|
92
|
+
if hasattr(type_, "restype"):
|
93
|
+
if name in bound_fields:
|
94
|
+
if bound_fields[name] is None:
|
95
|
+
fields[name] = type_()
|
96
|
+
else:
|
97
|
+
# use a closure to capture the callback from the loop scope
|
98
|
+
fields[name] = (
|
99
|
+
type_((lambda callback: lambda *args: callback(*args))(
|
100
|
+
bound_fields[name]))
|
101
|
+
)
|
102
|
+
del bound_fields[name]
|
103
|
+
else:
|
104
|
+
# default callback implementation (does nothing)
|
105
|
+
try:
|
106
|
+
default_ = type_(0).restype().value
|
107
|
+
except TypeError:
|
108
|
+
default_ = None
|
109
|
+
fields[name] = type_((
|
110
|
+
lambda default_: lambda *args: default_)(default_))
|
111
|
+
else:
|
112
|
+
# not a callback function, use default initialization
|
113
|
+
if name in bound_fields:
|
114
|
+
fields[name] = bound_fields[name]
|
115
|
+
del bound_fields[name]
|
116
|
+
else:
|
117
|
+
fields[name] = type_()
|
118
|
+
if len(bound_fields) != 0:
|
119
|
+
raise ValueError(
|
120
|
+
"Cannot bind the following unknown callback(s) {}.{}".format(
|
121
|
+
cls.__name__, bound_fields.keys()
|
122
|
+
))
|
123
|
+
return cls(**fields)
|
124
|
+
|
125
|
+
|
126
|
+
class Union(ctypes.Union, AsDictMixin):
|
127
|
+
pass
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
def string_cast(char_pointer, encoding='utf-8', errors='strict'):
|
132
|
+
value = ctypes.cast(char_pointer, ctypes.c_char_p).value
|
133
|
+
if value is not None and encoding is not None:
|
134
|
+
value = value.decode(encoding, errors=errors)
|
135
|
+
return value
|
136
|
+
|
137
|
+
|
138
|
+
def char_pointer_cast(string, encoding='utf-8'):
|
139
|
+
if encoding is not None:
|
140
|
+
try:
|
141
|
+
string = string.encode(encoding)
|
142
|
+
except AttributeError:
|
143
|
+
# In Python3, bytes has no encode attribute
|
144
|
+
pass
|
145
|
+
string = ctypes.c_char_p(string)
|
146
|
+
return ctypes.cast(string, ctypes.POINTER(ctypes.c_char))
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
c_int128 = ctypes.c_ubyte*16
|
151
|
+
c_uint128 = c_int128
|
152
|
+
void = None
|
153
|
+
if ctypes.sizeof(ctypes.c_longdouble) == 16:
|
154
|
+
c_long_double_t = ctypes.c_longdouble
|
155
|
+
else:
|
156
|
+
c_long_double_t = ctypes.c_ubyte*16
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
LIBUSB_H = True # macro
|
161
|
+
ZERO_SIZED_ARRAY = True # macro
|
162
|
+
# def LIBUSB_DEPRECATED_FOR(f): # macro
|
163
|
+
# return ((deprecated))
|
164
|
+
# LIBUSB_PACKED = ((packed)) # macro
|
165
|
+
LIBUSB_CALL = True # macro
|
166
|
+
LIBUSB_API_VERSION = 0x01000109 # macro
|
167
|
+
LIBUSBX_API_VERSION = 0x01000109 # macro
|
168
|
+
LIBUSB_DT_DEVICE_SIZE = 18 # macro
|
169
|
+
LIBUSB_DT_CONFIG_SIZE = 9 # macro
|
170
|
+
LIBUSB_DT_INTERFACE_SIZE = 9 # macro
|
171
|
+
LIBUSB_DT_ENDPOINT_SIZE = 7 # macro
|
172
|
+
LIBUSB_DT_ENDPOINT_AUDIO_SIZE = 9 # macro
|
173
|
+
LIBUSB_DT_HUB_NONVAR_SIZE = 7 # macro
|
174
|
+
LIBUSB_DT_SS_ENDPOINT_COMPANION_SIZE = 6 # macro
|
175
|
+
LIBUSB_DT_BOS_SIZE = 5 # macro
|
176
|
+
LIBUSB_DT_DEVICE_CAPABILITY_SIZE = 3 # macro
|
177
|
+
LIBUSB_BT_USB_2_0_EXTENSION_SIZE = 7 # macro
|
178
|
+
LIBUSB_BT_SS_USB_DEVICE_CAPABILITY_SIZE = 10 # macro
|
179
|
+
LIBUSB_BT_CONTAINER_ID_SIZE = 20 # macro
|
180
|
+
LIBUSB_DT_BOS_MAX_SIZE = (5+7+10+20) # macro
|
181
|
+
LIBUSB_ENDPOINT_ADDRESS_MASK = 0x0f # macro
|
182
|
+
LIBUSB_ENDPOINT_DIR_MASK = 0x80 # macro
|
183
|
+
LIBUSB_TRANSFER_TYPE_MASK = 0x03 # macro
|
184
|
+
LIBUSB_ISO_SYNC_TYPE_MASK = 0x0c # macro
|
185
|
+
LIBUSB_ISO_USAGE_TYPE_MASK = 0x30 # macro
|
186
|
+
LIBUSB_ERROR_COUNT = 14 # macro
|
187
|
+
LIBUSB_HOTPLUG_NO_FLAGS = 0 # macro
|
188
|
+
LIBUSB_HOTPLUG_MATCH_ANY = -1 # macro
|
189
|
+
uint16_t = ctypes.c_uint16
|
190
|
+
try:
|
191
|
+
libusb_cpu_to_le16 = _libraries['libusb'].libusb_cpu_to_le16
|
192
|
+
libusb_cpu_to_le16.restype = uint16_t
|
193
|
+
libusb_cpu_to_le16.argtypes = [uint16_t]
|
194
|
+
except AttributeError:
|
195
|
+
pass
|
196
|
+
# macro
|
197
|
+
|
198
|
+
# values for enumeration 'libusb_class_code'
|
199
|
+
libusb_class_code__enumvalues = {
|
200
|
+
0: 'LIBUSB_CLASS_PER_INTERFACE',
|
201
|
+
1: 'LIBUSB_CLASS_AUDIO',
|
202
|
+
2: 'LIBUSB_CLASS_COMM',
|
203
|
+
3: 'LIBUSB_CLASS_HID',
|
204
|
+
5: 'LIBUSB_CLASS_PHYSICAL',
|
205
|
+
6: 'LIBUSB_CLASS_IMAGE',
|
206
|
+
6: 'LIBUSB_CLASS_PTP',
|
207
|
+
7: 'LIBUSB_CLASS_PRINTER',
|
208
|
+
8: 'LIBUSB_CLASS_MASS_STORAGE',
|
209
|
+
9: 'LIBUSB_CLASS_HUB',
|
210
|
+
10: 'LIBUSB_CLASS_DATA',
|
211
|
+
11: 'LIBUSB_CLASS_SMART_CARD',
|
212
|
+
13: 'LIBUSB_CLASS_CONTENT_SECURITY',
|
213
|
+
14: 'LIBUSB_CLASS_VIDEO',
|
214
|
+
15: 'LIBUSB_CLASS_PERSONAL_HEALTHCARE',
|
215
|
+
220: 'LIBUSB_CLASS_DIAGNOSTIC_DEVICE',
|
216
|
+
224: 'LIBUSB_CLASS_WIRELESS',
|
217
|
+
239: 'LIBUSB_CLASS_MISCELLANEOUS',
|
218
|
+
254: 'LIBUSB_CLASS_APPLICATION',
|
219
|
+
255: 'LIBUSB_CLASS_VENDOR_SPEC',
|
220
|
+
}
|
221
|
+
LIBUSB_CLASS_PER_INTERFACE = 0
|
222
|
+
LIBUSB_CLASS_AUDIO = 1
|
223
|
+
LIBUSB_CLASS_COMM = 2
|
224
|
+
LIBUSB_CLASS_HID = 3
|
225
|
+
LIBUSB_CLASS_PHYSICAL = 5
|
226
|
+
LIBUSB_CLASS_IMAGE = 6
|
227
|
+
LIBUSB_CLASS_PTP = 6
|
228
|
+
LIBUSB_CLASS_PRINTER = 7
|
229
|
+
LIBUSB_CLASS_MASS_STORAGE = 8
|
230
|
+
LIBUSB_CLASS_HUB = 9
|
231
|
+
LIBUSB_CLASS_DATA = 10
|
232
|
+
LIBUSB_CLASS_SMART_CARD = 11
|
233
|
+
LIBUSB_CLASS_CONTENT_SECURITY = 13
|
234
|
+
LIBUSB_CLASS_VIDEO = 14
|
235
|
+
LIBUSB_CLASS_PERSONAL_HEALTHCARE = 15
|
236
|
+
LIBUSB_CLASS_DIAGNOSTIC_DEVICE = 220
|
237
|
+
LIBUSB_CLASS_WIRELESS = 224
|
238
|
+
LIBUSB_CLASS_MISCELLANEOUS = 239
|
239
|
+
LIBUSB_CLASS_APPLICATION = 254
|
240
|
+
LIBUSB_CLASS_VENDOR_SPEC = 255
|
241
|
+
libusb_class_code = ctypes.c_uint32 # enum
|
242
|
+
|
243
|
+
# values for enumeration 'libusb_descriptor_type'
|
244
|
+
libusb_descriptor_type__enumvalues = {
|
245
|
+
1: 'LIBUSB_DT_DEVICE',
|
246
|
+
2: 'LIBUSB_DT_CONFIG',
|
247
|
+
3: 'LIBUSB_DT_STRING',
|
248
|
+
4: 'LIBUSB_DT_INTERFACE',
|
249
|
+
5: 'LIBUSB_DT_ENDPOINT',
|
250
|
+
15: 'LIBUSB_DT_BOS',
|
251
|
+
16: 'LIBUSB_DT_DEVICE_CAPABILITY',
|
252
|
+
33: 'LIBUSB_DT_HID',
|
253
|
+
34: 'LIBUSB_DT_REPORT',
|
254
|
+
35: 'LIBUSB_DT_PHYSICAL',
|
255
|
+
41: 'LIBUSB_DT_HUB',
|
256
|
+
42: 'LIBUSB_DT_SUPERSPEED_HUB',
|
257
|
+
48: 'LIBUSB_DT_SS_ENDPOINT_COMPANION',
|
258
|
+
}
|
259
|
+
LIBUSB_DT_DEVICE = 1
|
260
|
+
LIBUSB_DT_CONFIG = 2
|
261
|
+
LIBUSB_DT_STRING = 3
|
262
|
+
LIBUSB_DT_INTERFACE = 4
|
263
|
+
LIBUSB_DT_ENDPOINT = 5
|
264
|
+
LIBUSB_DT_BOS = 15
|
265
|
+
LIBUSB_DT_DEVICE_CAPABILITY = 16
|
266
|
+
LIBUSB_DT_HID = 33
|
267
|
+
LIBUSB_DT_REPORT = 34
|
268
|
+
LIBUSB_DT_PHYSICAL = 35
|
269
|
+
LIBUSB_DT_HUB = 41
|
270
|
+
LIBUSB_DT_SUPERSPEED_HUB = 42
|
271
|
+
LIBUSB_DT_SS_ENDPOINT_COMPANION = 48
|
272
|
+
libusb_descriptor_type = ctypes.c_uint32 # enum
|
273
|
+
|
274
|
+
# values for enumeration 'libusb_endpoint_direction'
|
275
|
+
libusb_endpoint_direction__enumvalues = {
|
276
|
+
0: 'LIBUSB_ENDPOINT_OUT',
|
277
|
+
128: 'LIBUSB_ENDPOINT_IN',
|
278
|
+
}
|
279
|
+
LIBUSB_ENDPOINT_OUT = 0
|
280
|
+
LIBUSB_ENDPOINT_IN = 128
|
281
|
+
libusb_endpoint_direction = ctypes.c_uint32 # enum
|
282
|
+
|
283
|
+
# values for enumeration 'libusb_endpoint_transfer_type'
|
284
|
+
libusb_endpoint_transfer_type__enumvalues = {
|
285
|
+
0: 'LIBUSB_ENDPOINT_TRANSFER_TYPE_CONTROL',
|
286
|
+
1: 'LIBUSB_ENDPOINT_TRANSFER_TYPE_ISOCHRONOUS',
|
287
|
+
2: 'LIBUSB_ENDPOINT_TRANSFER_TYPE_BULK',
|
288
|
+
3: 'LIBUSB_ENDPOINT_TRANSFER_TYPE_INTERRUPT',
|
289
|
+
}
|
290
|
+
LIBUSB_ENDPOINT_TRANSFER_TYPE_CONTROL = 0
|
291
|
+
LIBUSB_ENDPOINT_TRANSFER_TYPE_ISOCHRONOUS = 1
|
292
|
+
LIBUSB_ENDPOINT_TRANSFER_TYPE_BULK = 2
|
293
|
+
LIBUSB_ENDPOINT_TRANSFER_TYPE_INTERRUPT = 3
|
294
|
+
libusb_endpoint_transfer_type = ctypes.c_uint32 # enum
|
295
|
+
|
296
|
+
# values for enumeration 'libusb_standard_request'
|
297
|
+
libusb_standard_request__enumvalues = {
|
298
|
+
0: 'LIBUSB_REQUEST_GET_STATUS',
|
299
|
+
1: 'LIBUSB_REQUEST_CLEAR_FEATURE',
|
300
|
+
3: 'LIBUSB_REQUEST_SET_FEATURE',
|
301
|
+
5: 'LIBUSB_REQUEST_SET_ADDRESS',
|
302
|
+
6: 'LIBUSB_REQUEST_GET_DESCRIPTOR',
|
303
|
+
7: 'LIBUSB_REQUEST_SET_DESCRIPTOR',
|
304
|
+
8: 'LIBUSB_REQUEST_GET_CONFIGURATION',
|
305
|
+
9: 'LIBUSB_REQUEST_SET_CONFIGURATION',
|
306
|
+
10: 'LIBUSB_REQUEST_GET_INTERFACE',
|
307
|
+
11: 'LIBUSB_REQUEST_SET_INTERFACE',
|
308
|
+
12: 'LIBUSB_REQUEST_SYNCH_FRAME',
|
309
|
+
48: 'LIBUSB_REQUEST_SET_SEL',
|
310
|
+
49: 'LIBUSB_SET_ISOCH_DELAY',
|
311
|
+
}
|
312
|
+
LIBUSB_REQUEST_GET_STATUS = 0
|
313
|
+
LIBUSB_REQUEST_CLEAR_FEATURE = 1
|
314
|
+
LIBUSB_REQUEST_SET_FEATURE = 3
|
315
|
+
LIBUSB_REQUEST_SET_ADDRESS = 5
|
316
|
+
LIBUSB_REQUEST_GET_DESCRIPTOR = 6
|
317
|
+
LIBUSB_REQUEST_SET_DESCRIPTOR = 7
|
318
|
+
LIBUSB_REQUEST_GET_CONFIGURATION = 8
|
319
|
+
LIBUSB_REQUEST_SET_CONFIGURATION = 9
|
320
|
+
LIBUSB_REQUEST_GET_INTERFACE = 10
|
321
|
+
LIBUSB_REQUEST_SET_INTERFACE = 11
|
322
|
+
LIBUSB_REQUEST_SYNCH_FRAME = 12
|
323
|
+
LIBUSB_REQUEST_SET_SEL = 48
|
324
|
+
LIBUSB_SET_ISOCH_DELAY = 49
|
325
|
+
libusb_standard_request = ctypes.c_uint32 # enum
|
326
|
+
|
327
|
+
# values for enumeration 'libusb_request_type'
|
328
|
+
libusb_request_type__enumvalues = {
|
329
|
+
0: 'LIBUSB_REQUEST_TYPE_STANDARD',
|
330
|
+
32: 'LIBUSB_REQUEST_TYPE_CLASS',
|
331
|
+
64: 'LIBUSB_REQUEST_TYPE_VENDOR',
|
332
|
+
96: 'LIBUSB_REQUEST_TYPE_RESERVED',
|
333
|
+
}
|
334
|
+
LIBUSB_REQUEST_TYPE_STANDARD = 0
|
335
|
+
LIBUSB_REQUEST_TYPE_CLASS = 32
|
336
|
+
LIBUSB_REQUEST_TYPE_VENDOR = 64
|
337
|
+
LIBUSB_REQUEST_TYPE_RESERVED = 96
|
338
|
+
libusb_request_type = ctypes.c_uint32 # enum
|
339
|
+
|
340
|
+
# values for enumeration 'libusb_request_recipient'
|
341
|
+
libusb_request_recipient__enumvalues = {
|
342
|
+
0: 'LIBUSB_RECIPIENT_DEVICE',
|
343
|
+
1: 'LIBUSB_RECIPIENT_INTERFACE',
|
344
|
+
2: 'LIBUSB_RECIPIENT_ENDPOINT',
|
345
|
+
3: 'LIBUSB_RECIPIENT_OTHER',
|
346
|
+
}
|
347
|
+
LIBUSB_RECIPIENT_DEVICE = 0
|
348
|
+
LIBUSB_RECIPIENT_INTERFACE = 1
|
349
|
+
LIBUSB_RECIPIENT_ENDPOINT = 2
|
350
|
+
LIBUSB_RECIPIENT_OTHER = 3
|
351
|
+
libusb_request_recipient = ctypes.c_uint32 # enum
|
352
|
+
|
353
|
+
# values for enumeration 'libusb_iso_sync_type'
|
354
|
+
libusb_iso_sync_type__enumvalues = {
|
355
|
+
0: 'LIBUSB_ISO_SYNC_TYPE_NONE',
|
356
|
+
1: 'LIBUSB_ISO_SYNC_TYPE_ASYNC',
|
357
|
+
2: 'LIBUSB_ISO_SYNC_TYPE_ADAPTIVE',
|
358
|
+
3: 'LIBUSB_ISO_SYNC_TYPE_SYNC',
|
359
|
+
}
|
360
|
+
LIBUSB_ISO_SYNC_TYPE_NONE = 0
|
361
|
+
LIBUSB_ISO_SYNC_TYPE_ASYNC = 1
|
362
|
+
LIBUSB_ISO_SYNC_TYPE_ADAPTIVE = 2
|
363
|
+
LIBUSB_ISO_SYNC_TYPE_SYNC = 3
|
364
|
+
libusb_iso_sync_type = ctypes.c_uint32 # enum
|
365
|
+
|
366
|
+
# values for enumeration 'libusb_iso_usage_type'
|
367
|
+
libusb_iso_usage_type__enumvalues = {
|
368
|
+
0: 'LIBUSB_ISO_USAGE_TYPE_DATA',
|
369
|
+
1: 'LIBUSB_ISO_USAGE_TYPE_FEEDBACK',
|
370
|
+
2: 'LIBUSB_ISO_USAGE_TYPE_IMPLICIT',
|
371
|
+
}
|
372
|
+
LIBUSB_ISO_USAGE_TYPE_DATA = 0
|
373
|
+
LIBUSB_ISO_USAGE_TYPE_FEEDBACK = 1
|
374
|
+
LIBUSB_ISO_USAGE_TYPE_IMPLICIT = 2
|
375
|
+
libusb_iso_usage_type = ctypes.c_uint32 # enum
|
376
|
+
|
377
|
+
# values for enumeration 'libusb_supported_speed'
|
378
|
+
libusb_supported_speed__enumvalues = {
|
379
|
+
1: 'LIBUSB_LOW_SPEED_OPERATION',
|
380
|
+
2: 'LIBUSB_FULL_SPEED_OPERATION',
|
381
|
+
4: 'LIBUSB_HIGH_SPEED_OPERATION',
|
382
|
+
8: 'LIBUSB_SUPER_SPEED_OPERATION',
|
383
|
+
}
|
384
|
+
LIBUSB_LOW_SPEED_OPERATION = 1
|
385
|
+
LIBUSB_FULL_SPEED_OPERATION = 2
|
386
|
+
LIBUSB_HIGH_SPEED_OPERATION = 4
|
387
|
+
LIBUSB_SUPER_SPEED_OPERATION = 8
|
388
|
+
libusb_supported_speed = ctypes.c_uint32 # enum
|
389
|
+
|
390
|
+
# values for enumeration 'libusb_usb_2_0_extension_attributes'
|
391
|
+
libusb_usb_2_0_extension_attributes__enumvalues = {
|
392
|
+
2: 'LIBUSB_BM_LPM_SUPPORT',
|
393
|
+
}
|
394
|
+
LIBUSB_BM_LPM_SUPPORT = 2
|
395
|
+
libusb_usb_2_0_extension_attributes = ctypes.c_uint32 # enum
|
396
|
+
|
397
|
+
# values for enumeration 'libusb_ss_usb_device_capability_attributes'
|
398
|
+
libusb_ss_usb_device_capability_attributes__enumvalues = {
|
399
|
+
2: 'LIBUSB_BM_LTM_SUPPORT',
|
400
|
+
}
|
401
|
+
LIBUSB_BM_LTM_SUPPORT = 2
|
402
|
+
libusb_ss_usb_device_capability_attributes = ctypes.c_uint32 # enum
|
403
|
+
|
404
|
+
# values for enumeration 'libusb_bos_type'
|
405
|
+
libusb_bos_type__enumvalues = {
|
406
|
+
1: 'LIBUSB_BT_WIRELESS_USB_DEVICE_CAPABILITY',
|
407
|
+
2: 'LIBUSB_BT_USB_2_0_EXTENSION',
|
408
|
+
3: 'LIBUSB_BT_SS_USB_DEVICE_CAPABILITY',
|
409
|
+
4: 'LIBUSB_BT_CONTAINER_ID',
|
410
|
+
}
|
411
|
+
LIBUSB_BT_WIRELESS_USB_DEVICE_CAPABILITY = 1
|
412
|
+
LIBUSB_BT_USB_2_0_EXTENSION = 2
|
413
|
+
LIBUSB_BT_SS_USB_DEVICE_CAPABILITY = 3
|
414
|
+
LIBUSB_BT_CONTAINER_ID = 4
|
415
|
+
libusb_bos_type = ctypes.c_uint32 # enum
|
416
|
+
class struct_libusb_device_descriptor(Structure):
|
417
|
+
pass
|
418
|
+
|
419
|
+
struct_libusb_device_descriptor._pack_ = 1 # source:False
|
420
|
+
struct_libusb_device_descriptor._fields_ = [
|
421
|
+
('bLength', ctypes.c_ubyte),
|
422
|
+
('bDescriptorType', ctypes.c_ubyte),
|
423
|
+
('bcdUSB', ctypes.c_uint16),
|
424
|
+
('bDeviceClass', ctypes.c_ubyte),
|
425
|
+
('bDeviceSubClass', ctypes.c_ubyte),
|
426
|
+
('bDeviceProtocol', ctypes.c_ubyte),
|
427
|
+
('bMaxPacketSize0', ctypes.c_ubyte),
|
428
|
+
('idVendor', ctypes.c_uint16),
|
429
|
+
('idProduct', ctypes.c_uint16),
|
430
|
+
('bcdDevice', ctypes.c_uint16),
|
431
|
+
('iManufacturer', ctypes.c_ubyte),
|
432
|
+
('iProduct', ctypes.c_ubyte),
|
433
|
+
('iSerialNumber', ctypes.c_ubyte),
|
434
|
+
('bNumConfigurations', ctypes.c_ubyte),
|
435
|
+
]
|
436
|
+
|
437
|
+
class struct_libusb_endpoint_descriptor(Structure):
|
438
|
+
pass
|
439
|
+
|
440
|
+
struct_libusb_endpoint_descriptor._pack_ = 1 # source:False
|
441
|
+
struct_libusb_endpoint_descriptor._fields_ = [
|
442
|
+
('bLength', ctypes.c_ubyte),
|
443
|
+
('bDescriptorType', ctypes.c_ubyte),
|
444
|
+
('bEndpointAddress', ctypes.c_ubyte),
|
445
|
+
('bmAttributes', ctypes.c_ubyte),
|
446
|
+
('wMaxPacketSize', ctypes.c_uint16),
|
447
|
+
('bInterval', ctypes.c_ubyte),
|
448
|
+
('bRefresh', ctypes.c_ubyte),
|
449
|
+
('bSynchAddress', ctypes.c_ubyte),
|
450
|
+
('PADDING_0', ctypes.c_ubyte * 7),
|
451
|
+
('extra', ctypes.POINTER(ctypes.c_ubyte)),
|
452
|
+
('extra_length', ctypes.c_int32),
|
453
|
+
('PADDING_1', ctypes.c_ubyte * 4),
|
454
|
+
]
|
455
|
+
|
456
|
+
class struct_libusb_interface_descriptor(Structure):
|
457
|
+
pass
|
458
|
+
|
459
|
+
struct_libusb_interface_descriptor._pack_ = 1 # source:False
|
460
|
+
struct_libusb_interface_descriptor._fields_ = [
|
461
|
+
('bLength', ctypes.c_ubyte),
|
462
|
+
('bDescriptorType', ctypes.c_ubyte),
|
463
|
+
('bInterfaceNumber', ctypes.c_ubyte),
|
464
|
+
('bAlternateSetting', ctypes.c_ubyte),
|
465
|
+
('bNumEndpoints', ctypes.c_ubyte),
|
466
|
+
('bInterfaceClass', ctypes.c_ubyte),
|
467
|
+
('bInterfaceSubClass', ctypes.c_ubyte),
|
468
|
+
('bInterfaceProtocol', ctypes.c_ubyte),
|
469
|
+
('iInterface', ctypes.c_ubyte),
|
470
|
+
('PADDING_0', ctypes.c_ubyte * 7),
|
471
|
+
('endpoint', ctypes.POINTER(struct_libusb_endpoint_descriptor)),
|
472
|
+
('extra', ctypes.POINTER(ctypes.c_ubyte)),
|
473
|
+
('extra_length', ctypes.c_int32),
|
474
|
+
('PADDING_1', ctypes.c_ubyte * 4),
|
475
|
+
]
|
476
|
+
|
477
|
+
class struct_libusb_interface(Structure):
|
478
|
+
pass
|
479
|
+
|
480
|
+
struct_libusb_interface._pack_ = 1 # source:False
|
481
|
+
struct_libusb_interface._fields_ = [
|
482
|
+
('altsetting', ctypes.POINTER(struct_libusb_interface_descriptor)),
|
483
|
+
('num_altsetting', ctypes.c_int32),
|
484
|
+
('PADDING_0', ctypes.c_ubyte * 4),
|
485
|
+
]
|
486
|
+
|
487
|
+
class struct_libusb_config_descriptor(Structure):
|
488
|
+
pass
|
489
|
+
|
490
|
+
struct_libusb_config_descriptor._pack_ = 1 # source:False
|
491
|
+
struct_libusb_config_descriptor._fields_ = [
|
492
|
+
('bLength', ctypes.c_ubyte),
|
493
|
+
('bDescriptorType', ctypes.c_ubyte),
|
494
|
+
('wTotalLength', ctypes.c_uint16),
|
495
|
+
('bNumInterfaces', ctypes.c_ubyte),
|
496
|
+
('bConfigurationValue', ctypes.c_ubyte),
|
497
|
+
('iConfiguration', ctypes.c_ubyte),
|
498
|
+
('bmAttributes', ctypes.c_ubyte),
|
499
|
+
('MaxPower', ctypes.c_ubyte),
|
500
|
+
('PADDING_0', ctypes.c_ubyte * 7),
|
501
|
+
('interface', ctypes.POINTER(struct_libusb_interface)),
|
502
|
+
('extra', ctypes.POINTER(ctypes.c_ubyte)),
|
503
|
+
('extra_length', ctypes.c_int32),
|
504
|
+
('PADDING_1', ctypes.c_ubyte * 4),
|
505
|
+
]
|
506
|
+
|
507
|
+
class struct_libusb_ss_endpoint_companion_descriptor(Structure):
|
508
|
+
pass
|
509
|
+
|
510
|
+
struct_libusb_ss_endpoint_companion_descriptor._pack_ = 1 # source:False
|
511
|
+
struct_libusb_ss_endpoint_companion_descriptor._fields_ = [
|
512
|
+
('bLength', ctypes.c_ubyte),
|
513
|
+
('bDescriptorType', ctypes.c_ubyte),
|
514
|
+
('bMaxBurst', ctypes.c_ubyte),
|
515
|
+
('bmAttributes', ctypes.c_ubyte),
|
516
|
+
('wBytesPerInterval', ctypes.c_uint16),
|
517
|
+
]
|
518
|
+
|
519
|
+
class struct_libusb_bos_dev_capability_descriptor(Structure):
|
520
|
+
pass
|
521
|
+
|
522
|
+
struct_libusb_bos_dev_capability_descriptor._pack_ = 1 # source:False
|
523
|
+
struct_libusb_bos_dev_capability_descriptor._fields_ = [
|
524
|
+
('bLength', ctypes.c_ubyte),
|
525
|
+
('bDescriptorType', ctypes.c_ubyte),
|
526
|
+
('bDevCapabilityType', ctypes.c_ubyte),
|
527
|
+
('dev_capability_data', ctypes.c_ubyte * 0),
|
528
|
+
]
|
529
|
+
|
530
|
+
class struct_libusb_bos_descriptor(Structure):
|
531
|
+
pass
|
532
|
+
|
533
|
+
struct_libusb_bos_descriptor._pack_ = 1 # source:False
|
534
|
+
struct_libusb_bos_descriptor._fields_ = [
|
535
|
+
('bLength', ctypes.c_ubyte),
|
536
|
+
('bDescriptorType', ctypes.c_ubyte),
|
537
|
+
('wTotalLength', ctypes.c_uint16),
|
538
|
+
('bNumDeviceCaps', ctypes.c_ubyte),
|
539
|
+
('PADDING_0', ctypes.c_ubyte * 3),
|
540
|
+
('dev_capability', ctypes.POINTER(struct_libusb_bos_dev_capability_descriptor) * 0),
|
541
|
+
]
|
542
|
+
|
543
|
+
class struct_libusb_usb_2_0_extension_descriptor(Structure):
|
544
|
+
pass
|
545
|
+
|
546
|
+
struct_libusb_usb_2_0_extension_descriptor._pack_ = 1 # source:False
|
547
|
+
struct_libusb_usb_2_0_extension_descriptor._fields_ = [
|
548
|
+
('bLength', ctypes.c_ubyte),
|
549
|
+
('bDescriptorType', ctypes.c_ubyte),
|
550
|
+
('bDevCapabilityType', ctypes.c_ubyte),
|
551
|
+
('PADDING_0', ctypes.c_ubyte),
|
552
|
+
('bmAttributes', ctypes.c_uint32),
|
553
|
+
]
|
554
|
+
|
555
|
+
class struct_libusb_ss_usb_device_capability_descriptor(Structure):
|
556
|
+
pass
|
557
|
+
|
558
|
+
struct_libusb_ss_usb_device_capability_descriptor._pack_ = 1 # source:False
|
559
|
+
struct_libusb_ss_usb_device_capability_descriptor._fields_ = [
|
560
|
+
('bLength', ctypes.c_ubyte),
|
561
|
+
('bDescriptorType', ctypes.c_ubyte),
|
562
|
+
('bDevCapabilityType', ctypes.c_ubyte),
|
563
|
+
('bmAttributes', ctypes.c_ubyte),
|
564
|
+
('wSpeedSupported', ctypes.c_uint16),
|
565
|
+
('bFunctionalitySupport', ctypes.c_ubyte),
|
566
|
+
('bU1DevExitLat', ctypes.c_ubyte),
|
567
|
+
('bU2DevExitLat', ctypes.c_uint16),
|
568
|
+
]
|
569
|
+
|
570
|
+
class struct_libusb_container_id_descriptor(Structure):
|
571
|
+
pass
|
572
|
+
|
573
|
+
struct_libusb_container_id_descriptor._pack_ = 1 # source:False
|
574
|
+
struct_libusb_container_id_descriptor._fields_ = [
|
575
|
+
('bLength', ctypes.c_ubyte),
|
576
|
+
('bDescriptorType', ctypes.c_ubyte),
|
577
|
+
('bDevCapabilityType', ctypes.c_ubyte),
|
578
|
+
('bReserved', ctypes.c_ubyte),
|
579
|
+
('ContainerID', ctypes.c_ubyte * 16),
|
580
|
+
]
|
581
|
+
|
582
|
+
class struct_libusb_control_setup(Structure):
|
583
|
+
pass
|
584
|
+
|
585
|
+
struct_libusb_control_setup._pack_ = 1 # source:True
|
586
|
+
struct_libusb_control_setup._fields_ = [
|
587
|
+
('bmRequestType', ctypes.c_ubyte),
|
588
|
+
('bRequest', ctypes.c_ubyte),
|
589
|
+
('wValue', ctypes.c_uint16),
|
590
|
+
('wIndex', ctypes.c_uint16),
|
591
|
+
('wLength', ctypes.c_uint16),
|
592
|
+
]
|
593
|
+
|
594
|
+
# LIBUSB_CONTROL_SETUP_SIZE = (ctypes.sizeof(struct_libusb_control_setup)) # macro
|
595
|
+
class struct_libusb_context(Structure):
|
596
|
+
pass
|
597
|
+
|
598
|
+
class struct_libusb_device(Structure):
|
599
|
+
pass
|
600
|
+
|
601
|
+
class struct_libusb_device_handle(Structure):
|
602
|
+
pass
|
603
|
+
|
604
|
+
class struct_libusb_version(Structure):
|
605
|
+
pass
|
606
|
+
|
607
|
+
struct_libusb_version._pack_ = 1 # source:False
|
608
|
+
struct_libusb_version._fields_ = [
|
609
|
+
('major', ctypes.c_uint16),
|
610
|
+
('minor', ctypes.c_uint16),
|
611
|
+
('micro', ctypes.c_uint16),
|
612
|
+
('nano', ctypes.c_uint16),
|
613
|
+
('rc', ctypes.POINTER(ctypes.c_char)),
|
614
|
+
('describe', ctypes.POINTER(ctypes.c_char)),
|
615
|
+
]
|
616
|
+
|
617
|
+
libusb_context = struct_libusb_context
|
618
|
+
libusb_device = struct_libusb_device
|
619
|
+
libusb_device_handle = struct_libusb_device_handle
|
620
|
+
|
621
|
+
# values for enumeration 'libusb_speed'
|
622
|
+
libusb_speed__enumvalues = {
|
623
|
+
0: 'LIBUSB_SPEED_UNKNOWN',
|
624
|
+
1: 'LIBUSB_SPEED_LOW',
|
625
|
+
2: 'LIBUSB_SPEED_FULL',
|
626
|
+
3: 'LIBUSB_SPEED_HIGH',
|
627
|
+
4: 'LIBUSB_SPEED_SUPER',
|
628
|
+
5: 'LIBUSB_SPEED_SUPER_PLUS',
|
629
|
+
}
|
630
|
+
LIBUSB_SPEED_UNKNOWN = 0
|
631
|
+
LIBUSB_SPEED_LOW = 1
|
632
|
+
LIBUSB_SPEED_FULL = 2
|
633
|
+
LIBUSB_SPEED_HIGH = 3
|
634
|
+
LIBUSB_SPEED_SUPER = 4
|
635
|
+
LIBUSB_SPEED_SUPER_PLUS = 5
|
636
|
+
libusb_speed = ctypes.c_uint32 # enum
|
637
|
+
|
638
|
+
# values for enumeration 'libusb_error'
|
639
|
+
libusb_error__enumvalues = {
|
640
|
+
0: 'LIBUSB_SUCCESS',
|
641
|
+
-1: 'LIBUSB_ERROR_IO',
|
642
|
+
-2: 'LIBUSB_ERROR_INVALID_PARAM',
|
643
|
+
-3: 'LIBUSB_ERROR_ACCESS',
|
644
|
+
-4: 'LIBUSB_ERROR_NO_DEVICE',
|
645
|
+
-5: 'LIBUSB_ERROR_NOT_FOUND',
|
646
|
+
-6: 'LIBUSB_ERROR_BUSY',
|
647
|
+
-7: 'LIBUSB_ERROR_TIMEOUT',
|
648
|
+
-8: 'LIBUSB_ERROR_OVERFLOW',
|
649
|
+
-9: 'LIBUSB_ERROR_PIPE',
|
650
|
+
-10: 'LIBUSB_ERROR_INTERRUPTED',
|
651
|
+
-11: 'LIBUSB_ERROR_NO_MEM',
|
652
|
+
-12: 'LIBUSB_ERROR_NOT_SUPPORTED',
|
653
|
+
-99: 'LIBUSB_ERROR_OTHER',
|
654
|
+
}
|
655
|
+
LIBUSB_SUCCESS = 0
|
656
|
+
LIBUSB_ERROR_IO = -1
|
657
|
+
LIBUSB_ERROR_INVALID_PARAM = -2
|
658
|
+
LIBUSB_ERROR_ACCESS = -3
|
659
|
+
LIBUSB_ERROR_NO_DEVICE = -4
|
660
|
+
LIBUSB_ERROR_NOT_FOUND = -5
|
661
|
+
LIBUSB_ERROR_BUSY = -6
|
662
|
+
LIBUSB_ERROR_TIMEOUT = -7
|
663
|
+
LIBUSB_ERROR_OVERFLOW = -8
|
664
|
+
LIBUSB_ERROR_PIPE = -9
|
665
|
+
LIBUSB_ERROR_INTERRUPTED = -10
|
666
|
+
LIBUSB_ERROR_NO_MEM = -11
|
667
|
+
LIBUSB_ERROR_NOT_SUPPORTED = -12
|
668
|
+
LIBUSB_ERROR_OTHER = -99
|
669
|
+
libusb_error = ctypes.c_int32 # enum
|
670
|
+
|
671
|
+
# values for enumeration 'libusb_transfer_type'
|
672
|
+
libusb_transfer_type__enumvalues = {
|
673
|
+
0: 'LIBUSB_TRANSFER_TYPE_CONTROL',
|
674
|
+
1: 'LIBUSB_TRANSFER_TYPE_ISOCHRONOUS',
|
675
|
+
2: 'LIBUSB_TRANSFER_TYPE_BULK',
|
676
|
+
3: 'LIBUSB_TRANSFER_TYPE_INTERRUPT',
|
677
|
+
4: 'LIBUSB_TRANSFER_TYPE_BULK_STREAM',
|
678
|
+
}
|
679
|
+
LIBUSB_TRANSFER_TYPE_CONTROL = 0
|
680
|
+
LIBUSB_TRANSFER_TYPE_ISOCHRONOUS = 1
|
681
|
+
LIBUSB_TRANSFER_TYPE_BULK = 2
|
682
|
+
LIBUSB_TRANSFER_TYPE_INTERRUPT = 3
|
683
|
+
LIBUSB_TRANSFER_TYPE_BULK_STREAM = 4
|
684
|
+
libusb_transfer_type = ctypes.c_uint32 # enum
|
685
|
+
|
686
|
+
# values for enumeration 'libusb_transfer_status'
|
687
|
+
libusb_transfer_status__enumvalues = {
|
688
|
+
0: 'LIBUSB_TRANSFER_COMPLETED',
|
689
|
+
1: 'LIBUSB_TRANSFER_ERROR',
|
690
|
+
2: 'LIBUSB_TRANSFER_TIMED_OUT',
|
691
|
+
3: 'LIBUSB_TRANSFER_CANCELLED',
|
692
|
+
4: 'LIBUSB_TRANSFER_STALL',
|
693
|
+
5: 'LIBUSB_TRANSFER_NO_DEVICE',
|
694
|
+
6: 'LIBUSB_TRANSFER_OVERFLOW',
|
695
|
+
}
|
696
|
+
LIBUSB_TRANSFER_COMPLETED = 0
|
697
|
+
LIBUSB_TRANSFER_ERROR = 1
|
698
|
+
LIBUSB_TRANSFER_TIMED_OUT = 2
|
699
|
+
LIBUSB_TRANSFER_CANCELLED = 3
|
700
|
+
LIBUSB_TRANSFER_STALL = 4
|
701
|
+
LIBUSB_TRANSFER_NO_DEVICE = 5
|
702
|
+
LIBUSB_TRANSFER_OVERFLOW = 6
|
703
|
+
libusb_transfer_status = ctypes.c_uint32 # enum
|
704
|
+
|
705
|
+
# values for enumeration 'libusb_transfer_flags'
|
706
|
+
libusb_transfer_flags__enumvalues = {
|
707
|
+
1: 'LIBUSB_TRANSFER_SHORT_NOT_OK',
|
708
|
+
2: 'LIBUSB_TRANSFER_FREE_BUFFER',
|
709
|
+
4: 'LIBUSB_TRANSFER_FREE_TRANSFER',
|
710
|
+
8: 'LIBUSB_TRANSFER_ADD_ZERO_PACKET',
|
711
|
+
}
|
712
|
+
LIBUSB_TRANSFER_SHORT_NOT_OK = 1
|
713
|
+
LIBUSB_TRANSFER_FREE_BUFFER = 2
|
714
|
+
LIBUSB_TRANSFER_FREE_TRANSFER = 4
|
715
|
+
LIBUSB_TRANSFER_ADD_ZERO_PACKET = 8
|
716
|
+
libusb_transfer_flags = ctypes.c_uint32 # enum
|
717
|
+
class struct_libusb_iso_packet_descriptor(Structure):
|
718
|
+
pass
|
719
|
+
|
720
|
+
struct_libusb_iso_packet_descriptor._pack_ = 1 # source:False
|
721
|
+
struct_libusb_iso_packet_descriptor._fields_ = [
|
722
|
+
('length', ctypes.c_uint32),
|
723
|
+
('actual_length', ctypes.c_uint32),
|
724
|
+
('status', libusb_transfer_status),
|
725
|
+
]
|
726
|
+
|
727
|
+
class struct_libusb_transfer(Structure):
|
728
|
+
pass
|
729
|
+
|
730
|
+
libusb_transfer_cb_fn = ctypes.CFUNCTYPE(None, ctypes.POINTER(struct_libusb_transfer))
|
731
|
+
|
732
|
+
# values for enumeration 'libusb_capability'
|
733
|
+
libusb_capability__enumvalues = {
|
734
|
+
0: 'LIBUSB_CAP_HAS_CAPABILITY',
|
735
|
+
1: 'LIBUSB_CAP_HAS_HOTPLUG',
|
736
|
+
256: 'LIBUSB_CAP_HAS_HID_ACCESS',
|
737
|
+
257: 'LIBUSB_CAP_SUPPORTS_DETACH_KERNEL_DRIVER',
|
738
|
+
}
|
739
|
+
LIBUSB_CAP_HAS_CAPABILITY = 0
|
740
|
+
LIBUSB_CAP_HAS_HOTPLUG = 1
|
741
|
+
LIBUSB_CAP_HAS_HID_ACCESS = 256
|
742
|
+
LIBUSB_CAP_SUPPORTS_DETACH_KERNEL_DRIVER = 257
|
743
|
+
libusb_capability = ctypes.c_uint32 # enum
|
744
|
+
|
745
|
+
# values for enumeration 'libusb_log_level'
|
746
|
+
libusb_log_level__enumvalues = {
|
747
|
+
0: 'LIBUSB_LOG_LEVEL_NONE',
|
748
|
+
1: 'LIBUSB_LOG_LEVEL_ERROR',
|
749
|
+
2: 'LIBUSB_LOG_LEVEL_WARNING',
|
750
|
+
3: 'LIBUSB_LOG_LEVEL_INFO',
|
751
|
+
4: 'LIBUSB_LOG_LEVEL_DEBUG',
|
752
|
+
}
|
753
|
+
LIBUSB_LOG_LEVEL_NONE = 0
|
754
|
+
LIBUSB_LOG_LEVEL_ERROR = 1
|
755
|
+
LIBUSB_LOG_LEVEL_WARNING = 2
|
756
|
+
LIBUSB_LOG_LEVEL_INFO = 3
|
757
|
+
LIBUSB_LOG_LEVEL_DEBUG = 4
|
758
|
+
libusb_log_level = ctypes.c_uint32 # enum
|
759
|
+
|
760
|
+
# values for enumeration 'libusb_log_cb_mode'
|
761
|
+
libusb_log_cb_mode__enumvalues = {
|
762
|
+
1: 'LIBUSB_LOG_CB_GLOBAL',
|
763
|
+
2: 'LIBUSB_LOG_CB_CONTEXT',
|
764
|
+
}
|
765
|
+
LIBUSB_LOG_CB_GLOBAL = 1
|
766
|
+
LIBUSB_LOG_CB_CONTEXT = 2
|
767
|
+
libusb_log_cb_mode = ctypes.c_uint32 # enum
|
768
|
+
libusb_log_cb = ctypes.CFUNCTYPE(None, ctypes.POINTER(struct_libusb_context), libusb_log_level, ctypes.POINTER(ctypes.c_char))
|
769
|
+
try:
|
770
|
+
libusb_init = _libraries['libusb'].libusb_init
|
771
|
+
libusb_init.restype = ctypes.c_int32
|
772
|
+
libusb_init.argtypes = [ctypes.POINTER(ctypes.POINTER(struct_libusb_context))]
|
773
|
+
except AttributeError:
|
774
|
+
pass
|
775
|
+
try:
|
776
|
+
libusb_exit = _libraries['libusb'].libusb_exit
|
777
|
+
libusb_exit.restype = None
|
778
|
+
libusb_exit.argtypes = [ctypes.POINTER(struct_libusb_context)]
|
779
|
+
except AttributeError:
|
780
|
+
pass
|
781
|
+
try:
|
782
|
+
libusb_set_debug = _libraries['libusb'].libusb_set_debug
|
783
|
+
libusb_set_debug.restype = None
|
784
|
+
libusb_set_debug.argtypes = [ctypes.POINTER(struct_libusb_context), ctypes.c_int32]
|
785
|
+
except AttributeError:
|
786
|
+
pass
|
787
|
+
try:
|
788
|
+
libusb_set_log_cb = _libraries['libusb'].libusb_set_log_cb
|
789
|
+
libusb_set_log_cb.restype = None
|
790
|
+
libusb_set_log_cb.argtypes = [ctypes.POINTER(struct_libusb_context), libusb_log_cb, ctypes.c_int32]
|
791
|
+
except AttributeError:
|
792
|
+
pass
|
793
|
+
try:
|
794
|
+
libusb_get_version = _libraries['libusb'].libusb_get_version
|
795
|
+
libusb_get_version.restype = ctypes.POINTER(struct_libusb_version)
|
796
|
+
libusb_get_version.argtypes = []
|
797
|
+
except AttributeError:
|
798
|
+
pass
|
799
|
+
uint32_t = ctypes.c_uint32
|
800
|
+
try:
|
801
|
+
libusb_has_capability = _libraries['libusb'].libusb_has_capability
|
802
|
+
libusb_has_capability.restype = ctypes.c_int32
|
803
|
+
libusb_has_capability.argtypes = [uint32_t]
|
804
|
+
except AttributeError:
|
805
|
+
pass
|
806
|
+
try:
|
807
|
+
libusb_error_name = _libraries['libusb'].libusb_error_name
|
808
|
+
libusb_error_name.restype = ctypes.POINTER(ctypes.c_char)
|
809
|
+
libusb_error_name.argtypes = [ctypes.c_int32]
|
810
|
+
except AttributeError:
|
811
|
+
pass
|
812
|
+
try:
|
813
|
+
libusb_setlocale = _libraries['libusb'].libusb_setlocale
|
814
|
+
libusb_setlocale.restype = ctypes.c_int32
|
815
|
+
libusb_setlocale.argtypes = [ctypes.POINTER(ctypes.c_char)]
|
816
|
+
except AttributeError:
|
817
|
+
pass
|
818
|
+
try:
|
819
|
+
libusb_strerror = _libraries['libusb'].libusb_strerror
|
820
|
+
libusb_strerror.restype = ctypes.POINTER(ctypes.c_char)
|
821
|
+
libusb_strerror.argtypes = [ctypes.c_int32]
|
822
|
+
except AttributeError:
|
823
|
+
pass
|
824
|
+
ssize_t = ctypes.c_int64
|
825
|
+
try:
|
826
|
+
libusb_get_device_list = _libraries['libusb'].libusb_get_device_list
|
827
|
+
libusb_get_device_list.restype = ssize_t
|
828
|
+
libusb_get_device_list.argtypes = [ctypes.POINTER(struct_libusb_context), ctypes.POINTER(ctypes.POINTER(ctypes.POINTER(struct_libusb_device)))]
|
829
|
+
except AttributeError:
|
830
|
+
pass
|
831
|
+
try:
|
832
|
+
libusb_free_device_list = _libraries['libusb'].libusb_free_device_list
|
833
|
+
libusb_free_device_list.restype = None
|
834
|
+
libusb_free_device_list.argtypes = [ctypes.POINTER(ctypes.POINTER(struct_libusb_device)), ctypes.c_int32]
|
835
|
+
except AttributeError:
|
836
|
+
pass
|
837
|
+
try:
|
838
|
+
libusb_ref_device = _libraries['libusb'].libusb_ref_device
|
839
|
+
libusb_ref_device.restype = ctypes.POINTER(struct_libusb_device)
|
840
|
+
libusb_ref_device.argtypes = [ctypes.POINTER(struct_libusb_device)]
|
841
|
+
except AttributeError:
|
842
|
+
pass
|
843
|
+
try:
|
844
|
+
libusb_unref_device = _libraries['libusb'].libusb_unref_device
|
845
|
+
libusb_unref_device.restype = None
|
846
|
+
libusb_unref_device.argtypes = [ctypes.POINTER(struct_libusb_device)]
|
847
|
+
except AttributeError:
|
848
|
+
pass
|
849
|
+
try:
|
850
|
+
libusb_get_configuration = _libraries['libusb'].libusb_get_configuration
|
851
|
+
libusb_get_configuration.restype = ctypes.c_int32
|
852
|
+
libusb_get_configuration.argtypes = [ctypes.POINTER(struct_libusb_device_handle), ctypes.POINTER(ctypes.c_int32)]
|
853
|
+
except AttributeError:
|
854
|
+
pass
|
855
|
+
try:
|
856
|
+
libusb_get_device_descriptor = _libraries['libusb'].libusb_get_device_descriptor
|
857
|
+
libusb_get_device_descriptor.restype = ctypes.c_int32
|
858
|
+
libusb_get_device_descriptor.argtypes = [ctypes.POINTER(struct_libusb_device), ctypes.POINTER(struct_libusb_device_descriptor)]
|
859
|
+
except AttributeError:
|
860
|
+
pass
|
861
|
+
try:
|
862
|
+
libusb_get_active_config_descriptor = _libraries['libusb'].libusb_get_active_config_descriptor
|
863
|
+
libusb_get_active_config_descriptor.restype = ctypes.c_int32
|
864
|
+
libusb_get_active_config_descriptor.argtypes = [ctypes.POINTER(struct_libusb_device), ctypes.POINTER(ctypes.POINTER(struct_libusb_config_descriptor))]
|
865
|
+
except AttributeError:
|
866
|
+
pass
|
867
|
+
uint8_t = ctypes.c_uint8
|
868
|
+
try:
|
869
|
+
libusb_get_config_descriptor = _libraries['libusb'].libusb_get_config_descriptor
|
870
|
+
libusb_get_config_descriptor.restype = ctypes.c_int32
|
871
|
+
libusb_get_config_descriptor.argtypes = [ctypes.POINTER(struct_libusb_device), uint8_t, ctypes.POINTER(ctypes.POINTER(struct_libusb_config_descriptor))]
|
872
|
+
except AttributeError:
|
873
|
+
pass
|
874
|
+
try:
|
875
|
+
libusb_get_config_descriptor_by_value = _libraries['libusb'].libusb_get_config_descriptor_by_value
|
876
|
+
libusb_get_config_descriptor_by_value.restype = ctypes.c_int32
|
877
|
+
libusb_get_config_descriptor_by_value.argtypes = [ctypes.POINTER(struct_libusb_device), uint8_t, ctypes.POINTER(ctypes.POINTER(struct_libusb_config_descriptor))]
|
878
|
+
except AttributeError:
|
879
|
+
pass
|
880
|
+
try:
|
881
|
+
libusb_free_config_descriptor = _libraries['libusb'].libusb_free_config_descriptor
|
882
|
+
libusb_free_config_descriptor.restype = None
|
883
|
+
libusb_free_config_descriptor.argtypes = [ctypes.POINTER(struct_libusb_config_descriptor)]
|
884
|
+
except AttributeError:
|
885
|
+
pass
|
886
|
+
try:
|
887
|
+
libusb_get_ss_endpoint_companion_descriptor = _libraries['libusb'].libusb_get_ss_endpoint_companion_descriptor
|
888
|
+
libusb_get_ss_endpoint_companion_descriptor.restype = ctypes.c_int32
|
889
|
+
libusb_get_ss_endpoint_companion_descriptor.argtypes = [ctypes.POINTER(struct_libusb_context), ctypes.POINTER(struct_libusb_endpoint_descriptor), ctypes.POINTER(ctypes.POINTER(struct_libusb_ss_endpoint_companion_descriptor))]
|
890
|
+
except AttributeError:
|
891
|
+
pass
|
892
|
+
try:
|
893
|
+
libusb_free_ss_endpoint_companion_descriptor = _libraries['libusb'].libusb_free_ss_endpoint_companion_descriptor
|
894
|
+
libusb_free_ss_endpoint_companion_descriptor.restype = None
|
895
|
+
libusb_free_ss_endpoint_companion_descriptor.argtypes = [ctypes.POINTER(struct_libusb_ss_endpoint_companion_descriptor)]
|
896
|
+
except AttributeError:
|
897
|
+
pass
|
898
|
+
try:
|
899
|
+
libusb_get_bos_descriptor = _libraries['libusb'].libusb_get_bos_descriptor
|
900
|
+
libusb_get_bos_descriptor.restype = ctypes.c_int32
|
901
|
+
libusb_get_bos_descriptor.argtypes = [ctypes.POINTER(struct_libusb_device_handle), ctypes.POINTER(ctypes.POINTER(struct_libusb_bos_descriptor))]
|
902
|
+
except AttributeError:
|
903
|
+
pass
|
904
|
+
try:
|
905
|
+
libusb_free_bos_descriptor = _libraries['libusb'].libusb_free_bos_descriptor
|
906
|
+
libusb_free_bos_descriptor.restype = None
|
907
|
+
libusb_free_bos_descriptor.argtypes = [ctypes.POINTER(struct_libusb_bos_descriptor)]
|
908
|
+
except AttributeError:
|
909
|
+
pass
|
910
|
+
try:
|
911
|
+
libusb_get_usb_2_0_extension_descriptor = _libraries['libusb'].libusb_get_usb_2_0_extension_descriptor
|
912
|
+
libusb_get_usb_2_0_extension_descriptor.restype = ctypes.c_int32
|
913
|
+
libusb_get_usb_2_0_extension_descriptor.argtypes = [ctypes.POINTER(struct_libusb_context), ctypes.POINTER(struct_libusb_bos_dev_capability_descriptor), ctypes.POINTER(ctypes.POINTER(struct_libusb_usb_2_0_extension_descriptor))]
|
914
|
+
except AttributeError:
|
915
|
+
pass
|
916
|
+
try:
|
917
|
+
libusb_free_usb_2_0_extension_descriptor = _libraries['libusb'].libusb_free_usb_2_0_extension_descriptor
|
918
|
+
libusb_free_usb_2_0_extension_descriptor.restype = None
|
919
|
+
libusb_free_usb_2_0_extension_descriptor.argtypes = [ctypes.POINTER(struct_libusb_usb_2_0_extension_descriptor)]
|
920
|
+
except AttributeError:
|
921
|
+
pass
|
922
|
+
try:
|
923
|
+
libusb_get_ss_usb_device_capability_descriptor = _libraries['libusb'].libusb_get_ss_usb_device_capability_descriptor
|
924
|
+
libusb_get_ss_usb_device_capability_descriptor.restype = ctypes.c_int32
|
925
|
+
libusb_get_ss_usb_device_capability_descriptor.argtypes = [ctypes.POINTER(struct_libusb_context), ctypes.POINTER(struct_libusb_bos_dev_capability_descriptor), ctypes.POINTER(ctypes.POINTER(struct_libusb_ss_usb_device_capability_descriptor))]
|
926
|
+
except AttributeError:
|
927
|
+
pass
|
928
|
+
try:
|
929
|
+
libusb_free_ss_usb_device_capability_descriptor = _libraries['libusb'].libusb_free_ss_usb_device_capability_descriptor
|
930
|
+
libusb_free_ss_usb_device_capability_descriptor.restype = None
|
931
|
+
libusb_free_ss_usb_device_capability_descriptor.argtypes = [ctypes.POINTER(struct_libusb_ss_usb_device_capability_descriptor)]
|
932
|
+
except AttributeError:
|
933
|
+
pass
|
934
|
+
try:
|
935
|
+
libusb_get_container_id_descriptor = _libraries['libusb'].libusb_get_container_id_descriptor
|
936
|
+
libusb_get_container_id_descriptor.restype = ctypes.c_int32
|
937
|
+
libusb_get_container_id_descriptor.argtypes = [ctypes.POINTER(struct_libusb_context), ctypes.POINTER(struct_libusb_bos_dev_capability_descriptor), ctypes.POINTER(ctypes.POINTER(struct_libusb_container_id_descriptor))]
|
938
|
+
except AttributeError:
|
939
|
+
pass
|
940
|
+
try:
|
941
|
+
libusb_free_container_id_descriptor = _libraries['libusb'].libusb_free_container_id_descriptor
|
942
|
+
libusb_free_container_id_descriptor.restype = None
|
943
|
+
libusb_free_container_id_descriptor.argtypes = [ctypes.POINTER(struct_libusb_container_id_descriptor)]
|
944
|
+
except AttributeError:
|
945
|
+
pass
|
946
|
+
try:
|
947
|
+
libusb_get_bus_number = _libraries['libusb'].libusb_get_bus_number
|
948
|
+
libusb_get_bus_number.restype = uint8_t
|
949
|
+
libusb_get_bus_number.argtypes = [ctypes.POINTER(struct_libusb_device)]
|
950
|
+
except AttributeError:
|
951
|
+
pass
|
952
|
+
try:
|
953
|
+
libusb_get_port_number = _libraries['libusb'].libusb_get_port_number
|
954
|
+
libusb_get_port_number.restype = uint8_t
|
955
|
+
libusb_get_port_number.argtypes = [ctypes.POINTER(struct_libusb_device)]
|
956
|
+
except AttributeError:
|
957
|
+
pass
|
958
|
+
try:
|
959
|
+
libusb_get_port_numbers = _libraries['libusb'].libusb_get_port_numbers
|
960
|
+
libusb_get_port_numbers.restype = ctypes.c_int32
|
961
|
+
libusb_get_port_numbers.argtypes = [ctypes.POINTER(struct_libusb_device), ctypes.POINTER(ctypes.c_ubyte), ctypes.c_int32]
|
962
|
+
except AttributeError:
|
963
|
+
pass
|
964
|
+
try:
|
965
|
+
libusb_get_port_path = _libraries['libusb'].libusb_get_port_path
|
966
|
+
libusb_get_port_path.restype = ctypes.c_int32
|
967
|
+
libusb_get_port_path.argtypes = [ctypes.POINTER(struct_libusb_context), ctypes.POINTER(struct_libusb_device), ctypes.POINTER(ctypes.c_ubyte), uint8_t]
|
968
|
+
except AttributeError:
|
969
|
+
pass
|
970
|
+
try:
|
971
|
+
libusb_get_parent = _libraries['libusb'].libusb_get_parent
|
972
|
+
libusb_get_parent.restype = ctypes.POINTER(struct_libusb_device)
|
973
|
+
libusb_get_parent.argtypes = [ctypes.POINTER(struct_libusb_device)]
|
974
|
+
except AttributeError:
|
975
|
+
pass
|
976
|
+
try:
|
977
|
+
libusb_get_device_address = _libraries['libusb'].libusb_get_device_address
|
978
|
+
libusb_get_device_address.restype = uint8_t
|
979
|
+
libusb_get_device_address.argtypes = [ctypes.POINTER(struct_libusb_device)]
|
980
|
+
except AttributeError:
|
981
|
+
pass
|
982
|
+
try:
|
983
|
+
libusb_get_device_speed = _libraries['libusb'].libusb_get_device_speed
|
984
|
+
libusb_get_device_speed.restype = ctypes.c_int32
|
985
|
+
libusb_get_device_speed.argtypes = [ctypes.POINTER(struct_libusb_device)]
|
986
|
+
except AttributeError:
|
987
|
+
pass
|
988
|
+
try:
|
989
|
+
libusb_get_max_packet_size = _libraries['libusb'].libusb_get_max_packet_size
|
990
|
+
libusb_get_max_packet_size.restype = ctypes.c_int32
|
991
|
+
libusb_get_max_packet_size.argtypes = [ctypes.POINTER(struct_libusb_device), ctypes.c_ubyte]
|
992
|
+
except AttributeError:
|
993
|
+
pass
|
994
|
+
try:
|
995
|
+
libusb_get_max_iso_packet_size = _libraries['libusb'].libusb_get_max_iso_packet_size
|
996
|
+
libusb_get_max_iso_packet_size.restype = ctypes.c_int32
|
997
|
+
libusb_get_max_iso_packet_size.argtypes = [ctypes.POINTER(struct_libusb_device), ctypes.c_ubyte]
|
998
|
+
except AttributeError:
|
999
|
+
pass
|
1000
|
+
intptr_t = ctypes.c_int64
|
1001
|
+
try:
|
1002
|
+
libusb_wrap_sys_device = _libraries['libusb'].libusb_wrap_sys_device
|
1003
|
+
libusb_wrap_sys_device.restype = ctypes.c_int32
|
1004
|
+
libusb_wrap_sys_device.argtypes = [ctypes.POINTER(struct_libusb_context), intptr_t, ctypes.POINTER(ctypes.POINTER(struct_libusb_device_handle))]
|
1005
|
+
except AttributeError:
|
1006
|
+
pass
|
1007
|
+
try:
|
1008
|
+
libusb_open = _libraries['libusb'].libusb_open
|
1009
|
+
libusb_open.restype = ctypes.c_int32
|
1010
|
+
libusb_open.argtypes = [ctypes.POINTER(struct_libusb_device), ctypes.POINTER(ctypes.POINTER(struct_libusb_device_handle))]
|
1011
|
+
except AttributeError:
|
1012
|
+
pass
|
1013
|
+
try:
|
1014
|
+
libusb_close = _libraries['libusb'].libusb_close
|
1015
|
+
libusb_close.restype = None
|
1016
|
+
libusb_close.argtypes = [ctypes.POINTER(struct_libusb_device_handle)]
|
1017
|
+
except AttributeError:
|
1018
|
+
pass
|
1019
|
+
try:
|
1020
|
+
libusb_get_device = _libraries['libusb'].libusb_get_device
|
1021
|
+
libusb_get_device.restype = ctypes.POINTER(struct_libusb_device)
|
1022
|
+
libusb_get_device.argtypes = [ctypes.POINTER(struct_libusb_device_handle)]
|
1023
|
+
except AttributeError:
|
1024
|
+
pass
|
1025
|
+
try:
|
1026
|
+
libusb_set_configuration = _libraries['libusb'].libusb_set_configuration
|
1027
|
+
libusb_set_configuration.restype = ctypes.c_int32
|
1028
|
+
libusb_set_configuration.argtypes = [ctypes.POINTER(struct_libusb_device_handle), ctypes.c_int32]
|
1029
|
+
except AttributeError:
|
1030
|
+
pass
|
1031
|
+
try:
|
1032
|
+
libusb_claim_interface = _libraries['libusb'].libusb_claim_interface
|
1033
|
+
libusb_claim_interface.restype = ctypes.c_int32
|
1034
|
+
libusb_claim_interface.argtypes = [ctypes.POINTER(struct_libusb_device_handle), ctypes.c_int32]
|
1035
|
+
except AttributeError:
|
1036
|
+
pass
|
1037
|
+
try:
|
1038
|
+
libusb_release_interface = _libraries['libusb'].libusb_release_interface
|
1039
|
+
libusb_release_interface.restype = ctypes.c_int32
|
1040
|
+
libusb_release_interface.argtypes = [ctypes.POINTER(struct_libusb_device_handle), ctypes.c_int32]
|
1041
|
+
except AttributeError:
|
1042
|
+
pass
|
1043
|
+
try:
|
1044
|
+
libusb_open_device_with_vid_pid = _libraries['libusb'].libusb_open_device_with_vid_pid
|
1045
|
+
libusb_open_device_with_vid_pid.restype = ctypes.POINTER(struct_libusb_device_handle)
|
1046
|
+
libusb_open_device_with_vid_pid.argtypes = [ctypes.POINTER(struct_libusb_context), uint16_t, uint16_t]
|
1047
|
+
except AttributeError:
|
1048
|
+
pass
|
1049
|
+
try:
|
1050
|
+
libusb_set_interface_alt_setting = _libraries['libusb'].libusb_set_interface_alt_setting
|
1051
|
+
libusb_set_interface_alt_setting.restype = ctypes.c_int32
|
1052
|
+
libusb_set_interface_alt_setting.argtypes = [ctypes.POINTER(struct_libusb_device_handle), ctypes.c_int32, ctypes.c_int32]
|
1053
|
+
except AttributeError:
|
1054
|
+
pass
|
1055
|
+
try:
|
1056
|
+
libusb_clear_halt = _libraries['libusb'].libusb_clear_halt
|
1057
|
+
libusb_clear_halt.restype = ctypes.c_int32
|
1058
|
+
libusb_clear_halt.argtypes = [ctypes.POINTER(struct_libusb_device_handle), ctypes.c_ubyte]
|
1059
|
+
except AttributeError:
|
1060
|
+
pass
|
1061
|
+
try:
|
1062
|
+
libusb_reset_device = _libraries['libusb'].libusb_reset_device
|
1063
|
+
libusb_reset_device.restype = ctypes.c_int32
|
1064
|
+
libusb_reset_device.argtypes = [ctypes.POINTER(struct_libusb_device_handle)]
|
1065
|
+
except AttributeError:
|
1066
|
+
pass
|
1067
|
+
try:
|
1068
|
+
libusb_alloc_streams = _libraries['libusb'].libusb_alloc_streams
|
1069
|
+
libusb_alloc_streams.restype = ctypes.c_int32
|
1070
|
+
libusb_alloc_streams.argtypes = [ctypes.POINTER(struct_libusb_device_handle), uint32_t, ctypes.POINTER(ctypes.c_ubyte), ctypes.c_int32]
|
1071
|
+
except AttributeError:
|
1072
|
+
pass
|
1073
|
+
try:
|
1074
|
+
libusb_free_streams = _libraries['libusb'].libusb_free_streams
|
1075
|
+
libusb_free_streams.restype = ctypes.c_int32
|
1076
|
+
libusb_free_streams.argtypes = [ctypes.POINTER(struct_libusb_device_handle), ctypes.POINTER(ctypes.c_ubyte), ctypes.c_int32]
|
1077
|
+
except AttributeError:
|
1078
|
+
pass
|
1079
|
+
size_t = ctypes.c_uint64
|
1080
|
+
try:
|
1081
|
+
libusb_dev_mem_alloc = _libraries['libusb'].libusb_dev_mem_alloc
|
1082
|
+
libusb_dev_mem_alloc.restype = ctypes.POINTER(ctypes.c_ubyte)
|
1083
|
+
libusb_dev_mem_alloc.argtypes = [ctypes.POINTER(struct_libusb_device_handle), size_t]
|
1084
|
+
except AttributeError:
|
1085
|
+
pass
|
1086
|
+
try:
|
1087
|
+
libusb_dev_mem_free = _libraries['libusb'].libusb_dev_mem_free
|
1088
|
+
libusb_dev_mem_free.restype = ctypes.c_int32
|
1089
|
+
libusb_dev_mem_free.argtypes = [ctypes.POINTER(struct_libusb_device_handle), ctypes.POINTER(ctypes.c_ubyte), size_t]
|
1090
|
+
except AttributeError:
|
1091
|
+
pass
|
1092
|
+
try:
|
1093
|
+
libusb_kernel_driver_active = _libraries['libusb'].libusb_kernel_driver_active
|
1094
|
+
libusb_kernel_driver_active.restype = ctypes.c_int32
|
1095
|
+
libusb_kernel_driver_active.argtypes = [ctypes.POINTER(struct_libusb_device_handle), ctypes.c_int32]
|
1096
|
+
except AttributeError:
|
1097
|
+
pass
|
1098
|
+
try:
|
1099
|
+
libusb_detach_kernel_driver = _libraries['libusb'].libusb_detach_kernel_driver
|
1100
|
+
libusb_detach_kernel_driver.restype = ctypes.c_int32
|
1101
|
+
libusb_detach_kernel_driver.argtypes = [ctypes.POINTER(struct_libusb_device_handle), ctypes.c_int32]
|
1102
|
+
except AttributeError:
|
1103
|
+
pass
|
1104
|
+
try:
|
1105
|
+
libusb_attach_kernel_driver = _libraries['libusb'].libusb_attach_kernel_driver
|
1106
|
+
libusb_attach_kernel_driver.restype = ctypes.c_int32
|
1107
|
+
libusb_attach_kernel_driver.argtypes = [ctypes.POINTER(struct_libusb_device_handle), ctypes.c_int32]
|
1108
|
+
except AttributeError:
|
1109
|
+
pass
|
1110
|
+
try:
|
1111
|
+
libusb_set_auto_detach_kernel_driver = _libraries['libusb'].libusb_set_auto_detach_kernel_driver
|
1112
|
+
libusb_set_auto_detach_kernel_driver.restype = ctypes.c_int32
|
1113
|
+
libusb_set_auto_detach_kernel_driver.argtypes = [ctypes.POINTER(struct_libusb_device_handle), ctypes.c_int32]
|
1114
|
+
except AttributeError:
|
1115
|
+
pass
|
1116
|
+
try:
|
1117
|
+
libusb_control_transfer_get_data = _libraries['libusb'].libusb_control_transfer_get_data
|
1118
|
+
libusb_control_transfer_get_data.restype = ctypes.POINTER(ctypes.c_ubyte)
|
1119
|
+
libusb_control_transfer_get_data.argtypes = [ctypes.POINTER(struct_libusb_transfer)]
|
1120
|
+
except AttributeError:
|
1121
|
+
pass
|
1122
|
+
try:
|
1123
|
+
libusb_control_transfer_get_setup = _libraries['libusb'].libusb_control_transfer_get_setup
|
1124
|
+
libusb_control_transfer_get_setup.restype = ctypes.POINTER(struct_libusb_control_setup)
|
1125
|
+
libusb_control_transfer_get_setup.argtypes = [ctypes.POINTER(struct_libusb_transfer)]
|
1126
|
+
except AttributeError:
|
1127
|
+
pass
|
1128
|
+
try:
|
1129
|
+
libusb_fill_control_setup = _libraries['libusb'].libusb_fill_control_setup
|
1130
|
+
libusb_fill_control_setup.restype = None
|
1131
|
+
libusb_fill_control_setup.argtypes = [ctypes.POINTER(ctypes.c_ubyte), uint8_t, uint8_t, uint16_t, uint16_t, uint16_t]
|
1132
|
+
except AttributeError:
|
1133
|
+
pass
|
1134
|
+
try:
|
1135
|
+
libusb_alloc_transfer = _libraries['libusb'].libusb_alloc_transfer
|
1136
|
+
libusb_alloc_transfer.restype = ctypes.POINTER(struct_libusb_transfer)
|
1137
|
+
libusb_alloc_transfer.argtypes = [ctypes.c_int32]
|
1138
|
+
except AttributeError:
|
1139
|
+
pass
|
1140
|
+
try:
|
1141
|
+
libusb_submit_transfer = _libraries['libusb'].libusb_submit_transfer
|
1142
|
+
libusb_submit_transfer.restype = ctypes.c_int32
|
1143
|
+
libusb_submit_transfer.argtypes = [ctypes.POINTER(struct_libusb_transfer)]
|
1144
|
+
except AttributeError:
|
1145
|
+
pass
|
1146
|
+
try:
|
1147
|
+
libusb_cancel_transfer = _libraries['libusb'].libusb_cancel_transfer
|
1148
|
+
libusb_cancel_transfer.restype = ctypes.c_int32
|
1149
|
+
libusb_cancel_transfer.argtypes = [ctypes.POINTER(struct_libusb_transfer)]
|
1150
|
+
except AttributeError:
|
1151
|
+
pass
|
1152
|
+
try:
|
1153
|
+
libusb_free_transfer = _libraries['libusb'].libusb_free_transfer
|
1154
|
+
libusb_free_transfer.restype = None
|
1155
|
+
libusb_free_transfer.argtypes = [ctypes.POINTER(struct_libusb_transfer)]
|
1156
|
+
except AttributeError:
|
1157
|
+
pass
|
1158
|
+
try:
|
1159
|
+
libusb_transfer_set_stream_id = _libraries['libusb'].libusb_transfer_set_stream_id
|
1160
|
+
libusb_transfer_set_stream_id.restype = None
|
1161
|
+
libusb_transfer_set_stream_id.argtypes = [ctypes.POINTER(struct_libusb_transfer), uint32_t]
|
1162
|
+
except AttributeError:
|
1163
|
+
pass
|
1164
|
+
try:
|
1165
|
+
libusb_transfer_get_stream_id = _libraries['libusb'].libusb_transfer_get_stream_id
|
1166
|
+
libusb_transfer_get_stream_id.restype = uint32_t
|
1167
|
+
libusb_transfer_get_stream_id.argtypes = [ctypes.POINTER(struct_libusb_transfer)]
|
1168
|
+
except AttributeError:
|
1169
|
+
pass
|
1170
|
+
try:
|
1171
|
+
libusb_fill_control_transfer = _libraries['libusb'].libusb_fill_control_transfer
|
1172
|
+
libusb_fill_control_transfer.restype = None
|
1173
|
+
libusb_fill_control_transfer.argtypes = [ctypes.POINTER(struct_libusb_transfer), ctypes.POINTER(struct_libusb_device_handle), ctypes.POINTER(ctypes.c_ubyte), libusb_transfer_cb_fn, ctypes.POINTER(None), ctypes.c_uint32]
|
1174
|
+
except AttributeError:
|
1175
|
+
pass
|
1176
|
+
try:
|
1177
|
+
libusb_fill_bulk_transfer = _libraries['libusb'].libusb_fill_bulk_transfer
|
1178
|
+
libusb_fill_bulk_transfer.restype = None
|
1179
|
+
libusb_fill_bulk_transfer.argtypes = [ctypes.POINTER(struct_libusb_transfer), ctypes.POINTER(struct_libusb_device_handle), ctypes.c_ubyte, ctypes.POINTER(ctypes.c_ubyte), ctypes.c_int32, libusb_transfer_cb_fn, ctypes.POINTER(None), ctypes.c_uint32]
|
1180
|
+
except AttributeError:
|
1181
|
+
pass
|
1182
|
+
try:
|
1183
|
+
libusb_fill_bulk_stream_transfer = _libraries['libusb'].libusb_fill_bulk_stream_transfer
|
1184
|
+
libusb_fill_bulk_stream_transfer.restype = None
|
1185
|
+
libusb_fill_bulk_stream_transfer.argtypes = [ctypes.POINTER(struct_libusb_transfer), ctypes.POINTER(struct_libusb_device_handle), ctypes.c_ubyte, uint32_t, ctypes.POINTER(ctypes.c_ubyte), ctypes.c_int32, libusb_transfer_cb_fn, ctypes.POINTER(None), ctypes.c_uint32]
|
1186
|
+
except AttributeError:
|
1187
|
+
pass
|
1188
|
+
try:
|
1189
|
+
libusb_fill_interrupt_transfer = _libraries['libusb'].libusb_fill_interrupt_transfer
|
1190
|
+
libusb_fill_interrupt_transfer.restype = None
|
1191
|
+
libusb_fill_interrupt_transfer.argtypes = [ctypes.POINTER(struct_libusb_transfer), ctypes.POINTER(struct_libusb_device_handle), ctypes.c_ubyte, ctypes.POINTER(ctypes.c_ubyte), ctypes.c_int32, libusb_transfer_cb_fn, ctypes.POINTER(None), ctypes.c_uint32]
|
1192
|
+
except AttributeError:
|
1193
|
+
pass
|
1194
|
+
try:
|
1195
|
+
libusb_fill_iso_transfer = _libraries['libusb'].libusb_fill_iso_transfer
|
1196
|
+
libusb_fill_iso_transfer.restype = None
|
1197
|
+
libusb_fill_iso_transfer.argtypes = [ctypes.POINTER(struct_libusb_transfer), ctypes.POINTER(struct_libusb_device_handle), ctypes.c_ubyte, ctypes.POINTER(ctypes.c_ubyte), ctypes.c_int32, ctypes.c_int32, libusb_transfer_cb_fn, ctypes.POINTER(None), ctypes.c_uint32]
|
1198
|
+
except AttributeError:
|
1199
|
+
pass
|
1200
|
+
try:
|
1201
|
+
libusb_set_iso_packet_lengths = _libraries['libusb'].libusb_set_iso_packet_lengths
|
1202
|
+
libusb_set_iso_packet_lengths.restype = None
|
1203
|
+
libusb_set_iso_packet_lengths.argtypes = [ctypes.POINTER(struct_libusb_transfer), ctypes.c_uint32]
|
1204
|
+
except AttributeError:
|
1205
|
+
pass
|
1206
|
+
try:
|
1207
|
+
libusb_get_iso_packet_buffer = _libraries['libusb'].libusb_get_iso_packet_buffer
|
1208
|
+
libusb_get_iso_packet_buffer.restype = ctypes.POINTER(ctypes.c_ubyte)
|
1209
|
+
libusb_get_iso_packet_buffer.argtypes = [ctypes.POINTER(struct_libusb_transfer), ctypes.c_uint32]
|
1210
|
+
except AttributeError:
|
1211
|
+
pass
|
1212
|
+
try:
|
1213
|
+
libusb_get_iso_packet_buffer_simple = _libraries['libusb'].libusb_get_iso_packet_buffer_simple
|
1214
|
+
libusb_get_iso_packet_buffer_simple.restype = ctypes.POINTER(ctypes.c_ubyte)
|
1215
|
+
libusb_get_iso_packet_buffer_simple.argtypes = [ctypes.POINTER(struct_libusb_transfer), ctypes.c_uint32]
|
1216
|
+
except AttributeError:
|
1217
|
+
pass
|
1218
|
+
try:
|
1219
|
+
libusb_control_transfer = _libraries['libusb'].libusb_control_transfer
|
1220
|
+
libusb_control_transfer.restype = ctypes.c_int32
|
1221
|
+
libusb_control_transfer.argtypes = [ctypes.POINTER(struct_libusb_device_handle), uint8_t, uint8_t, uint16_t, uint16_t, ctypes.POINTER(ctypes.c_ubyte), uint16_t, ctypes.c_uint32]
|
1222
|
+
except AttributeError:
|
1223
|
+
pass
|
1224
|
+
try:
|
1225
|
+
libusb_bulk_transfer = _libraries['libusb'].libusb_bulk_transfer
|
1226
|
+
libusb_bulk_transfer.restype = ctypes.c_int32
|
1227
|
+
libusb_bulk_transfer.argtypes = [ctypes.POINTER(struct_libusb_device_handle), ctypes.c_ubyte, ctypes.POINTER(ctypes.c_ubyte), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.c_uint32]
|
1228
|
+
except AttributeError:
|
1229
|
+
pass
|
1230
|
+
try:
|
1231
|
+
libusb_interrupt_transfer = _libraries['libusb'].libusb_interrupt_transfer
|
1232
|
+
libusb_interrupt_transfer.restype = ctypes.c_int32
|
1233
|
+
libusb_interrupt_transfer.argtypes = [ctypes.POINTER(struct_libusb_device_handle), ctypes.c_ubyte, ctypes.POINTER(ctypes.c_ubyte), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.c_uint32]
|
1234
|
+
except AttributeError:
|
1235
|
+
pass
|
1236
|
+
try:
|
1237
|
+
libusb_get_descriptor = _libraries['libusb'].libusb_get_descriptor
|
1238
|
+
libusb_get_descriptor.restype = ctypes.c_int32
|
1239
|
+
libusb_get_descriptor.argtypes = [ctypes.POINTER(struct_libusb_device_handle), uint8_t, uint8_t, ctypes.POINTER(ctypes.c_ubyte), ctypes.c_int32]
|
1240
|
+
except AttributeError:
|
1241
|
+
pass
|
1242
|
+
try:
|
1243
|
+
libusb_get_string_descriptor = _libraries['libusb'].libusb_get_string_descriptor
|
1244
|
+
libusb_get_string_descriptor.restype = ctypes.c_int32
|
1245
|
+
libusb_get_string_descriptor.argtypes = [ctypes.POINTER(struct_libusb_device_handle), uint8_t, uint16_t, ctypes.POINTER(ctypes.c_ubyte), ctypes.c_int32]
|
1246
|
+
except AttributeError:
|
1247
|
+
pass
|
1248
|
+
try:
|
1249
|
+
libusb_get_string_descriptor_ascii = _libraries['libusb'].libusb_get_string_descriptor_ascii
|
1250
|
+
libusb_get_string_descriptor_ascii.restype = ctypes.c_int32
|
1251
|
+
libusb_get_string_descriptor_ascii.argtypes = [ctypes.POINTER(struct_libusb_device_handle), uint8_t, ctypes.POINTER(ctypes.c_ubyte), ctypes.c_int32]
|
1252
|
+
except AttributeError:
|
1253
|
+
pass
|
1254
|
+
try:
|
1255
|
+
libusb_try_lock_events = _libraries['libusb'].libusb_try_lock_events
|
1256
|
+
libusb_try_lock_events.restype = ctypes.c_int32
|
1257
|
+
libusb_try_lock_events.argtypes = [ctypes.POINTER(struct_libusb_context)]
|
1258
|
+
except AttributeError:
|
1259
|
+
pass
|
1260
|
+
try:
|
1261
|
+
libusb_lock_events = _libraries['libusb'].libusb_lock_events
|
1262
|
+
libusb_lock_events.restype = None
|
1263
|
+
libusb_lock_events.argtypes = [ctypes.POINTER(struct_libusb_context)]
|
1264
|
+
except AttributeError:
|
1265
|
+
pass
|
1266
|
+
try:
|
1267
|
+
libusb_unlock_events = _libraries['libusb'].libusb_unlock_events
|
1268
|
+
libusb_unlock_events.restype = None
|
1269
|
+
libusb_unlock_events.argtypes = [ctypes.POINTER(struct_libusb_context)]
|
1270
|
+
except AttributeError:
|
1271
|
+
pass
|
1272
|
+
try:
|
1273
|
+
libusb_event_handling_ok = _libraries['libusb'].libusb_event_handling_ok
|
1274
|
+
libusb_event_handling_ok.restype = ctypes.c_int32
|
1275
|
+
libusb_event_handling_ok.argtypes = [ctypes.POINTER(struct_libusb_context)]
|
1276
|
+
except AttributeError:
|
1277
|
+
pass
|
1278
|
+
try:
|
1279
|
+
libusb_event_handler_active = _libraries['libusb'].libusb_event_handler_active
|
1280
|
+
libusb_event_handler_active.restype = ctypes.c_int32
|
1281
|
+
libusb_event_handler_active.argtypes = [ctypes.POINTER(struct_libusb_context)]
|
1282
|
+
except AttributeError:
|
1283
|
+
pass
|
1284
|
+
try:
|
1285
|
+
libusb_interrupt_event_handler = _libraries['libusb'].libusb_interrupt_event_handler
|
1286
|
+
libusb_interrupt_event_handler.restype = None
|
1287
|
+
libusb_interrupt_event_handler.argtypes = [ctypes.POINTER(struct_libusb_context)]
|
1288
|
+
except AttributeError:
|
1289
|
+
pass
|
1290
|
+
try:
|
1291
|
+
libusb_lock_event_waiters = _libraries['libusb'].libusb_lock_event_waiters
|
1292
|
+
libusb_lock_event_waiters.restype = None
|
1293
|
+
libusb_lock_event_waiters.argtypes = [ctypes.POINTER(struct_libusb_context)]
|
1294
|
+
except AttributeError:
|
1295
|
+
pass
|
1296
|
+
try:
|
1297
|
+
libusb_unlock_event_waiters = _libraries['libusb'].libusb_unlock_event_waiters
|
1298
|
+
libusb_unlock_event_waiters.restype = None
|
1299
|
+
libusb_unlock_event_waiters.argtypes = [ctypes.POINTER(struct_libusb_context)]
|
1300
|
+
except AttributeError:
|
1301
|
+
pass
|
1302
|
+
class struct_timeval(Structure):
|
1303
|
+
pass
|
1304
|
+
|
1305
|
+
struct_timeval._pack_ = 1 # source:False
|
1306
|
+
struct_timeval._fields_ = [
|
1307
|
+
('tv_sec', ctypes.c_int64),
|
1308
|
+
('tv_usec', ctypes.c_int64),
|
1309
|
+
]
|
1310
|
+
|
1311
|
+
try:
|
1312
|
+
libusb_wait_for_event = _libraries['libusb'].libusb_wait_for_event
|
1313
|
+
libusb_wait_for_event.restype = ctypes.c_int32
|
1314
|
+
libusb_wait_for_event.argtypes = [ctypes.POINTER(struct_libusb_context), ctypes.POINTER(struct_timeval)]
|
1315
|
+
except AttributeError:
|
1316
|
+
pass
|
1317
|
+
try:
|
1318
|
+
libusb_handle_events_timeout = _libraries['libusb'].libusb_handle_events_timeout
|
1319
|
+
libusb_handle_events_timeout.restype = ctypes.c_int32
|
1320
|
+
libusb_handle_events_timeout.argtypes = [ctypes.POINTER(struct_libusb_context), ctypes.POINTER(struct_timeval)]
|
1321
|
+
except AttributeError:
|
1322
|
+
pass
|
1323
|
+
try:
|
1324
|
+
libusb_handle_events_timeout_completed = _libraries['libusb'].libusb_handle_events_timeout_completed
|
1325
|
+
libusb_handle_events_timeout_completed.restype = ctypes.c_int32
|
1326
|
+
libusb_handle_events_timeout_completed.argtypes = [ctypes.POINTER(struct_libusb_context), ctypes.POINTER(struct_timeval), ctypes.POINTER(ctypes.c_int32)]
|
1327
|
+
except AttributeError:
|
1328
|
+
pass
|
1329
|
+
try:
|
1330
|
+
libusb_handle_events = _libraries['libusb'].libusb_handle_events
|
1331
|
+
libusb_handle_events.restype = ctypes.c_int32
|
1332
|
+
libusb_handle_events.argtypes = [ctypes.POINTER(struct_libusb_context)]
|
1333
|
+
except AttributeError:
|
1334
|
+
pass
|
1335
|
+
try:
|
1336
|
+
libusb_handle_events_completed = _libraries['libusb'].libusb_handle_events_completed
|
1337
|
+
libusb_handle_events_completed.restype = ctypes.c_int32
|
1338
|
+
libusb_handle_events_completed.argtypes = [ctypes.POINTER(struct_libusb_context), ctypes.POINTER(ctypes.c_int32)]
|
1339
|
+
except AttributeError:
|
1340
|
+
pass
|
1341
|
+
try:
|
1342
|
+
libusb_handle_events_locked = _libraries['libusb'].libusb_handle_events_locked
|
1343
|
+
libusb_handle_events_locked.restype = ctypes.c_int32
|
1344
|
+
libusb_handle_events_locked.argtypes = [ctypes.POINTER(struct_libusb_context), ctypes.POINTER(struct_timeval)]
|
1345
|
+
except AttributeError:
|
1346
|
+
pass
|
1347
|
+
try:
|
1348
|
+
libusb_pollfds_handle_timeouts = _libraries['libusb'].libusb_pollfds_handle_timeouts
|
1349
|
+
libusb_pollfds_handle_timeouts.restype = ctypes.c_int32
|
1350
|
+
libusb_pollfds_handle_timeouts.argtypes = [ctypes.POINTER(struct_libusb_context)]
|
1351
|
+
except AttributeError:
|
1352
|
+
pass
|
1353
|
+
try:
|
1354
|
+
libusb_get_next_timeout = _libraries['libusb'].libusb_get_next_timeout
|
1355
|
+
libusb_get_next_timeout.restype = ctypes.c_int32
|
1356
|
+
libusb_get_next_timeout.argtypes = [ctypes.POINTER(struct_libusb_context), ctypes.POINTER(struct_timeval)]
|
1357
|
+
except AttributeError:
|
1358
|
+
pass
|
1359
|
+
class struct_libusb_pollfd(Structure):
|
1360
|
+
pass
|
1361
|
+
|
1362
|
+
struct_libusb_pollfd._pack_ = 1 # source:False
|
1363
|
+
struct_libusb_pollfd._fields_ = [
|
1364
|
+
('fd', ctypes.c_int32),
|
1365
|
+
('events', ctypes.c_int16),
|
1366
|
+
('PADDING_0', ctypes.c_ubyte * 2),
|
1367
|
+
]
|
1368
|
+
|
1369
|
+
libusb_pollfd_added_cb = ctypes.CFUNCTYPE(None, ctypes.c_int32, ctypes.c_int16, ctypes.POINTER(None))
|
1370
|
+
libusb_pollfd_removed_cb = ctypes.CFUNCTYPE(None, ctypes.c_int32, ctypes.POINTER(None))
|
1371
|
+
try:
|
1372
|
+
libusb_get_pollfds = _libraries['libusb'].libusb_get_pollfds
|
1373
|
+
libusb_get_pollfds.restype = ctypes.POINTER(ctypes.POINTER(struct_libusb_pollfd))
|
1374
|
+
libusb_get_pollfds.argtypes = [ctypes.POINTER(struct_libusb_context)]
|
1375
|
+
except AttributeError:
|
1376
|
+
pass
|
1377
|
+
try:
|
1378
|
+
libusb_free_pollfds = _libraries['libusb'].libusb_free_pollfds
|
1379
|
+
libusb_free_pollfds.restype = None
|
1380
|
+
libusb_free_pollfds.argtypes = [ctypes.POINTER(ctypes.POINTER(struct_libusb_pollfd))]
|
1381
|
+
except AttributeError:
|
1382
|
+
pass
|
1383
|
+
try:
|
1384
|
+
libusb_set_pollfd_notifiers = _libraries['libusb'].libusb_set_pollfd_notifiers
|
1385
|
+
libusb_set_pollfd_notifiers.restype = None
|
1386
|
+
libusb_set_pollfd_notifiers.argtypes = [ctypes.POINTER(struct_libusb_context), libusb_pollfd_added_cb, libusb_pollfd_removed_cb, ctypes.POINTER(None)]
|
1387
|
+
except AttributeError:
|
1388
|
+
pass
|
1389
|
+
libusb_hotplug_callback_handle = ctypes.c_int32
|
1390
|
+
|
1391
|
+
# values for enumeration 'c__EA_libusb_hotplug_event'
|
1392
|
+
c__EA_libusb_hotplug_event__enumvalues = {
|
1393
|
+
1: 'LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED',
|
1394
|
+
2: 'LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT',
|
1395
|
+
}
|
1396
|
+
LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED = 1
|
1397
|
+
LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT = 2
|
1398
|
+
c__EA_libusb_hotplug_event = ctypes.c_uint32 # enum
|
1399
|
+
libusb_hotplug_event = c__EA_libusb_hotplug_event
|
1400
|
+
libusb_hotplug_event__enumvalues = c__EA_libusb_hotplug_event__enumvalues
|
1401
|
+
|
1402
|
+
# values for enumeration 'c__EA_libusb_hotplug_flag'
|
1403
|
+
c__EA_libusb_hotplug_flag__enumvalues = {
|
1404
|
+
1: 'LIBUSB_HOTPLUG_ENUMERATE',
|
1405
|
+
}
|
1406
|
+
LIBUSB_HOTPLUG_ENUMERATE = 1
|
1407
|
+
c__EA_libusb_hotplug_flag = ctypes.c_uint32 # enum
|
1408
|
+
libusb_hotplug_flag = c__EA_libusb_hotplug_flag
|
1409
|
+
libusb_hotplug_flag__enumvalues = c__EA_libusb_hotplug_flag__enumvalues
|
1410
|
+
libusb_hotplug_callback_fn = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.POINTER(struct_libusb_context), ctypes.POINTER(struct_libusb_device), c__EA_libusb_hotplug_event, ctypes.POINTER(None))
|
1411
|
+
try:
|
1412
|
+
libusb_hotplug_register_callback = _libraries['libusb'].libusb_hotplug_register_callback
|
1413
|
+
libusb_hotplug_register_callback.restype = ctypes.c_int32
|
1414
|
+
libusb_hotplug_register_callback.argtypes = [ctypes.POINTER(struct_libusb_context), ctypes.c_int32, ctypes.c_int32, ctypes.c_int32, ctypes.c_int32, ctypes.c_int32, libusb_hotplug_callback_fn, ctypes.POINTER(None), ctypes.POINTER(ctypes.c_int32)]
|
1415
|
+
except AttributeError:
|
1416
|
+
pass
|
1417
|
+
try:
|
1418
|
+
libusb_hotplug_deregister_callback = _libraries['libusb'].libusb_hotplug_deregister_callback
|
1419
|
+
libusb_hotplug_deregister_callback.restype = None
|
1420
|
+
libusb_hotplug_deregister_callback.argtypes = [ctypes.POINTER(struct_libusb_context), libusb_hotplug_callback_handle]
|
1421
|
+
except AttributeError:
|
1422
|
+
pass
|
1423
|
+
try:
|
1424
|
+
libusb_hotplug_get_user_data = _libraries['libusb'].libusb_hotplug_get_user_data
|
1425
|
+
libusb_hotplug_get_user_data.restype = ctypes.POINTER(None)
|
1426
|
+
libusb_hotplug_get_user_data.argtypes = [ctypes.POINTER(struct_libusb_context), libusb_hotplug_callback_handle]
|
1427
|
+
except AttributeError:
|
1428
|
+
pass
|
1429
|
+
|
1430
|
+
# values for enumeration 'libusb_option'
|
1431
|
+
libusb_option__enumvalues = {
|
1432
|
+
0: 'LIBUSB_OPTION_LOG_LEVEL',
|
1433
|
+
1: 'LIBUSB_OPTION_USE_USBDK',
|
1434
|
+
2: 'LIBUSB_OPTION_NO_DEVICE_DISCOVERY',
|
1435
|
+
3: 'LIBUSB_OPTION_MAX',
|
1436
|
+
}
|
1437
|
+
LIBUSB_OPTION_LOG_LEVEL = 0
|
1438
|
+
LIBUSB_OPTION_USE_USBDK = 1
|
1439
|
+
LIBUSB_OPTION_NO_DEVICE_DISCOVERY = 2
|
1440
|
+
LIBUSB_OPTION_MAX = 3
|
1441
|
+
libusb_option = ctypes.c_uint32 # enum
|
1442
|
+
LIBUSB_OPTION_WEAK_AUTHORITY = LIBUSB_OPTION_NO_DEVICE_DISCOVERY # macro
|
1443
|
+
try:
|
1444
|
+
libusb_set_option = _libraries['libusb'].libusb_set_option
|
1445
|
+
libusb_set_option.restype = ctypes.c_int32
|
1446
|
+
libusb_set_option.argtypes = [ctypes.POINTER(struct_libusb_context), libusb_option]
|
1447
|
+
except AttributeError:
|
1448
|
+
pass
|
1449
|
+
struct_libusb_transfer._pack_ = 1 # source:False
|
1450
|
+
struct_libusb_transfer._fields_ = [
|
1451
|
+
('dev_handle', ctypes.POINTER(struct_libusb_device_handle)),
|
1452
|
+
('flags', ctypes.c_ubyte),
|
1453
|
+
('endpoint', ctypes.c_ubyte),
|
1454
|
+
('type', ctypes.c_ubyte),
|
1455
|
+
('PADDING_0', ctypes.c_ubyte),
|
1456
|
+
('timeout', ctypes.c_uint32),
|
1457
|
+
('status', libusb_transfer_status),
|
1458
|
+
('length', ctypes.c_int32),
|
1459
|
+
('actual_length', ctypes.c_int32),
|
1460
|
+
('PADDING_1', ctypes.c_ubyte * 4),
|
1461
|
+
('callback', ctypes.CFUNCTYPE(None, ctypes.POINTER(struct_libusb_transfer))),
|
1462
|
+
('user_data', ctypes.POINTER(None)),
|
1463
|
+
('buffer', ctypes.POINTER(ctypes.c_ubyte)),
|
1464
|
+
('num_iso_packets', ctypes.c_int32),
|
1465
|
+
('iso_packet_desc', struct_libusb_iso_packet_descriptor * 0),
|
1466
|
+
('PADDING_2', ctypes.c_ubyte * 4),
|
1467
|
+
]
|
1468
|
+
|
1469
|
+
__all__ = \
|
1470
|
+
['LIBUSBX_API_VERSION', 'LIBUSB_API_VERSION',
|
1471
|
+
'LIBUSB_BM_LPM_SUPPORT', 'LIBUSB_BM_LTM_SUPPORT',
|
1472
|
+
'LIBUSB_BT_CONTAINER_ID', 'LIBUSB_BT_CONTAINER_ID_SIZE',
|
1473
|
+
'LIBUSB_BT_SS_USB_DEVICE_CAPABILITY',
|
1474
|
+
'LIBUSB_BT_SS_USB_DEVICE_CAPABILITY_SIZE',
|
1475
|
+
'LIBUSB_BT_USB_2_0_EXTENSION', 'LIBUSB_BT_USB_2_0_EXTENSION_SIZE',
|
1476
|
+
'LIBUSB_BT_WIRELESS_USB_DEVICE_CAPABILITY', 'LIBUSB_CALL',
|
1477
|
+
'LIBUSB_CAP_HAS_CAPABILITY', 'LIBUSB_CAP_HAS_HID_ACCESS',
|
1478
|
+
'LIBUSB_CAP_HAS_HOTPLUG',
|
1479
|
+
'LIBUSB_CAP_SUPPORTS_DETACH_KERNEL_DRIVER',
|
1480
|
+
'LIBUSB_CLASS_APPLICATION', 'LIBUSB_CLASS_AUDIO',
|
1481
|
+
'LIBUSB_CLASS_COMM', 'LIBUSB_CLASS_CONTENT_SECURITY',
|
1482
|
+
'LIBUSB_CLASS_DATA', 'LIBUSB_CLASS_DIAGNOSTIC_DEVICE',
|
1483
|
+
'LIBUSB_CLASS_HID', 'LIBUSB_CLASS_HUB', 'LIBUSB_CLASS_IMAGE',
|
1484
|
+
'LIBUSB_CLASS_MASS_STORAGE', 'LIBUSB_CLASS_MISCELLANEOUS',
|
1485
|
+
'LIBUSB_CLASS_PERSONAL_HEALTHCARE', 'LIBUSB_CLASS_PER_INTERFACE',
|
1486
|
+
'LIBUSB_CLASS_PHYSICAL', 'LIBUSB_CLASS_PRINTER',
|
1487
|
+
'LIBUSB_CLASS_PTP', 'LIBUSB_CLASS_SMART_CARD',
|
1488
|
+
'LIBUSB_CLASS_VENDOR_SPEC', 'LIBUSB_CLASS_VIDEO',
|
1489
|
+
'LIBUSB_CLASS_WIRELESS', 'LIBUSB_DT_BOS',
|
1490
|
+
'LIBUSB_DT_BOS_MAX_SIZE', 'LIBUSB_DT_BOS_SIZE',
|
1491
|
+
'LIBUSB_DT_CONFIG', 'LIBUSB_DT_CONFIG_SIZE', 'LIBUSB_DT_DEVICE',
|
1492
|
+
'LIBUSB_DT_DEVICE_CAPABILITY', 'LIBUSB_DT_DEVICE_CAPABILITY_SIZE',
|
1493
|
+
'LIBUSB_DT_DEVICE_SIZE', 'LIBUSB_DT_ENDPOINT',
|
1494
|
+
'LIBUSB_DT_ENDPOINT_AUDIO_SIZE', 'LIBUSB_DT_ENDPOINT_SIZE',
|
1495
|
+
'LIBUSB_DT_HID', 'LIBUSB_DT_HUB', 'LIBUSB_DT_HUB_NONVAR_SIZE',
|
1496
|
+
'LIBUSB_DT_INTERFACE', 'LIBUSB_DT_INTERFACE_SIZE',
|
1497
|
+
'LIBUSB_DT_PHYSICAL', 'LIBUSB_DT_REPORT',
|
1498
|
+
'LIBUSB_DT_SS_ENDPOINT_COMPANION',
|
1499
|
+
'LIBUSB_DT_SS_ENDPOINT_COMPANION_SIZE', 'LIBUSB_DT_STRING',
|
1500
|
+
'LIBUSB_DT_SUPERSPEED_HUB', 'LIBUSB_ENDPOINT_ADDRESS_MASK',
|
1501
|
+
'LIBUSB_ENDPOINT_DIR_MASK', 'LIBUSB_ENDPOINT_IN',
|
1502
|
+
'LIBUSB_ENDPOINT_OUT', 'LIBUSB_ENDPOINT_TRANSFER_TYPE_BULK',
|
1503
|
+
'LIBUSB_ENDPOINT_TRANSFER_TYPE_CONTROL',
|
1504
|
+
'LIBUSB_ENDPOINT_TRANSFER_TYPE_INTERRUPT',
|
1505
|
+
'LIBUSB_ENDPOINT_TRANSFER_TYPE_ISOCHRONOUS',
|
1506
|
+
'LIBUSB_ERROR_ACCESS', 'LIBUSB_ERROR_BUSY', 'LIBUSB_ERROR_COUNT',
|
1507
|
+
'LIBUSB_ERROR_INTERRUPTED', 'LIBUSB_ERROR_INVALID_PARAM',
|
1508
|
+
'LIBUSB_ERROR_IO', 'LIBUSB_ERROR_NOT_FOUND',
|
1509
|
+
'LIBUSB_ERROR_NOT_SUPPORTED', 'LIBUSB_ERROR_NO_DEVICE',
|
1510
|
+
'LIBUSB_ERROR_NO_MEM', 'LIBUSB_ERROR_OTHER',
|
1511
|
+
'LIBUSB_ERROR_OVERFLOW', 'LIBUSB_ERROR_PIPE',
|
1512
|
+
'LIBUSB_ERROR_TIMEOUT', 'LIBUSB_FULL_SPEED_OPERATION', 'LIBUSB_H',
|
1513
|
+
'LIBUSB_HIGH_SPEED_OPERATION', 'LIBUSB_HOTPLUG_ENUMERATE',
|
1514
|
+
'LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED',
|
1515
|
+
'LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT', 'LIBUSB_HOTPLUG_MATCH_ANY',
|
1516
|
+
'LIBUSB_HOTPLUG_NO_FLAGS', 'LIBUSB_ISO_SYNC_TYPE_ADAPTIVE',
|
1517
|
+
'LIBUSB_ISO_SYNC_TYPE_ASYNC', 'LIBUSB_ISO_SYNC_TYPE_MASK',
|
1518
|
+
'LIBUSB_ISO_SYNC_TYPE_NONE', 'LIBUSB_ISO_SYNC_TYPE_SYNC',
|
1519
|
+
'LIBUSB_ISO_USAGE_TYPE_DATA', 'LIBUSB_ISO_USAGE_TYPE_FEEDBACK',
|
1520
|
+
'LIBUSB_ISO_USAGE_TYPE_IMPLICIT', 'LIBUSB_ISO_USAGE_TYPE_MASK',
|
1521
|
+
'LIBUSB_LOG_CB_CONTEXT', 'LIBUSB_LOG_CB_GLOBAL',
|
1522
|
+
'LIBUSB_LOG_LEVEL_DEBUG', 'LIBUSB_LOG_LEVEL_ERROR',
|
1523
|
+
'LIBUSB_LOG_LEVEL_INFO', 'LIBUSB_LOG_LEVEL_NONE',
|
1524
|
+
'LIBUSB_LOG_LEVEL_WARNING', 'LIBUSB_LOW_SPEED_OPERATION',
|
1525
|
+
'LIBUSB_OPTION_LOG_LEVEL', 'LIBUSB_OPTION_MAX',
|
1526
|
+
'LIBUSB_OPTION_NO_DEVICE_DISCOVERY', 'LIBUSB_OPTION_USE_USBDK',
|
1527
|
+
'LIBUSB_OPTION_WEAK_AUTHORITY', 'LIBUSB_RECIPIENT_DEVICE',
|
1528
|
+
'LIBUSB_RECIPIENT_ENDPOINT', 'LIBUSB_RECIPIENT_INTERFACE',
|
1529
|
+
'LIBUSB_RECIPIENT_OTHER', 'LIBUSB_REQUEST_CLEAR_FEATURE',
|
1530
|
+
'LIBUSB_REQUEST_GET_CONFIGURATION',
|
1531
|
+
'LIBUSB_REQUEST_GET_DESCRIPTOR', 'LIBUSB_REQUEST_GET_INTERFACE',
|
1532
|
+
'LIBUSB_REQUEST_GET_STATUS', 'LIBUSB_REQUEST_SET_ADDRESS',
|
1533
|
+
'LIBUSB_REQUEST_SET_CONFIGURATION',
|
1534
|
+
'LIBUSB_REQUEST_SET_DESCRIPTOR', 'LIBUSB_REQUEST_SET_FEATURE',
|
1535
|
+
'LIBUSB_REQUEST_SET_INTERFACE', 'LIBUSB_REQUEST_SET_SEL',
|
1536
|
+
'LIBUSB_REQUEST_SYNCH_FRAME', 'LIBUSB_REQUEST_TYPE_CLASS',
|
1537
|
+
'LIBUSB_REQUEST_TYPE_RESERVED', 'LIBUSB_REQUEST_TYPE_STANDARD',
|
1538
|
+
'LIBUSB_REQUEST_TYPE_VENDOR', 'LIBUSB_SET_ISOCH_DELAY',
|
1539
|
+
'LIBUSB_SPEED_FULL', 'LIBUSB_SPEED_HIGH', 'LIBUSB_SPEED_LOW',
|
1540
|
+
'LIBUSB_SPEED_SUPER', 'LIBUSB_SPEED_SUPER_PLUS',
|
1541
|
+
'LIBUSB_SPEED_UNKNOWN', 'LIBUSB_SUCCESS',
|
1542
|
+
'LIBUSB_SUPER_SPEED_OPERATION', 'LIBUSB_TRANSFER_ADD_ZERO_PACKET',
|
1543
|
+
'LIBUSB_TRANSFER_CANCELLED', 'LIBUSB_TRANSFER_COMPLETED',
|
1544
|
+
'LIBUSB_TRANSFER_ERROR', 'LIBUSB_TRANSFER_FREE_BUFFER',
|
1545
|
+
'LIBUSB_TRANSFER_FREE_TRANSFER', 'LIBUSB_TRANSFER_NO_DEVICE',
|
1546
|
+
'LIBUSB_TRANSFER_OVERFLOW', 'LIBUSB_TRANSFER_SHORT_NOT_OK',
|
1547
|
+
'LIBUSB_TRANSFER_STALL', 'LIBUSB_TRANSFER_TIMED_OUT',
|
1548
|
+
'LIBUSB_TRANSFER_TYPE_BULK', 'LIBUSB_TRANSFER_TYPE_BULK_STREAM',
|
1549
|
+
'LIBUSB_TRANSFER_TYPE_CONTROL', 'LIBUSB_TRANSFER_TYPE_INTERRUPT',
|
1550
|
+
'LIBUSB_TRANSFER_TYPE_ISOCHRONOUS', 'LIBUSB_TRANSFER_TYPE_MASK',
|
1551
|
+
'ZERO_SIZED_ARRAY', 'c__EA_libusb_hotplug_event',
|
1552
|
+
'c__EA_libusb_hotplug_flag', 'intptr_t', 'libusb_alloc_streams',
|
1553
|
+
'libusb_alloc_transfer', 'libusb_attach_kernel_driver',
|
1554
|
+
'libusb_bos_type', 'libusb_bulk_transfer',
|
1555
|
+
'libusb_cancel_transfer', 'libusb_capability',
|
1556
|
+
'libusb_claim_interface', 'libusb_class_code',
|
1557
|
+
'libusb_clear_halt', 'libusb_close', 'libusb_context',
|
1558
|
+
'libusb_control_transfer', 'libusb_control_transfer_get_data',
|
1559
|
+
'libusb_control_transfer_get_setup', 'libusb_cpu_to_le16',
|
1560
|
+
'libusb_descriptor_type', 'libusb_detach_kernel_driver',
|
1561
|
+
'libusb_dev_mem_alloc', 'libusb_dev_mem_free', 'libusb_device',
|
1562
|
+
'libusb_device_handle', 'libusb_endpoint_direction',
|
1563
|
+
'libusb_endpoint_transfer_type', 'libusb_error',
|
1564
|
+
'libusb_error_name', 'libusb_event_handler_active',
|
1565
|
+
'libusb_event_handling_ok', 'libusb_exit',
|
1566
|
+
'libusb_fill_bulk_stream_transfer', 'libusb_fill_bulk_transfer',
|
1567
|
+
'libusb_fill_control_setup', 'libusb_fill_control_transfer',
|
1568
|
+
'libusb_fill_interrupt_transfer', 'libusb_fill_iso_transfer',
|
1569
|
+
'libusb_free_bos_descriptor', 'libusb_free_config_descriptor',
|
1570
|
+
'libusb_free_container_id_descriptor', 'libusb_free_device_list',
|
1571
|
+
'libusb_free_pollfds',
|
1572
|
+
'libusb_free_ss_endpoint_companion_descriptor',
|
1573
|
+
'libusb_free_ss_usb_device_capability_descriptor',
|
1574
|
+
'libusb_free_streams', 'libusb_free_transfer',
|
1575
|
+
'libusb_free_usb_2_0_extension_descriptor',
|
1576
|
+
'libusb_get_active_config_descriptor',
|
1577
|
+
'libusb_get_bos_descriptor', 'libusb_get_bus_number',
|
1578
|
+
'libusb_get_config_descriptor',
|
1579
|
+
'libusb_get_config_descriptor_by_value',
|
1580
|
+
'libusb_get_configuration', 'libusb_get_container_id_descriptor',
|
1581
|
+
'libusb_get_descriptor', 'libusb_get_device',
|
1582
|
+
'libusb_get_device_address', 'libusb_get_device_descriptor',
|
1583
|
+
'libusb_get_device_list', 'libusb_get_device_speed',
|
1584
|
+
'libusb_get_iso_packet_buffer',
|
1585
|
+
'libusb_get_iso_packet_buffer_simple',
|
1586
|
+
'libusb_get_max_iso_packet_size', 'libusb_get_max_packet_size',
|
1587
|
+
'libusb_get_next_timeout', 'libusb_get_parent',
|
1588
|
+
'libusb_get_pollfds', 'libusb_get_port_number',
|
1589
|
+
'libusb_get_port_numbers', 'libusb_get_port_path',
|
1590
|
+
'libusb_get_ss_endpoint_companion_descriptor',
|
1591
|
+
'libusb_get_ss_usb_device_capability_descriptor',
|
1592
|
+
'libusb_get_string_descriptor',
|
1593
|
+
'libusb_get_string_descriptor_ascii',
|
1594
|
+
'libusb_get_usb_2_0_extension_descriptor', 'libusb_get_version',
|
1595
|
+
'libusb_handle_events', 'libusb_handle_events_completed',
|
1596
|
+
'libusb_handle_events_locked', 'libusb_handle_events_timeout',
|
1597
|
+
'libusb_handle_events_timeout_completed', 'libusb_has_capability',
|
1598
|
+
'libusb_hotplug_callback_fn', 'libusb_hotplug_callback_handle',
|
1599
|
+
'libusb_hotplug_deregister_callback', 'libusb_hotplug_event',
|
1600
|
+
'libusb_hotplug_event__enumvalues', 'libusb_hotplug_flag',
|
1601
|
+
'libusb_hotplug_flag__enumvalues', 'libusb_hotplug_get_user_data',
|
1602
|
+
'libusb_hotplug_register_callback', 'libusb_init',
|
1603
|
+
'libusb_interrupt_event_handler', 'libusb_interrupt_transfer',
|
1604
|
+
'libusb_iso_sync_type', 'libusb_iso_usage_type',
|
1605
|
+
'libusb_kernel_driver_active', 'libusb_le16_to_cpu',
|
1606
|
+
'libusb_lock_event_waiters', 'libusb_lock_events',
|
1607
|
+
'libusb_log_cb', 'libusb_log_cb_mode', 'libusb_log_level',
|
1608
|
+
'libusb_open', 'libusb_open_device_with_vid_pid', 'libusb_option',
|
1609
|
+
'libusb_pollfd_added_cb', 'libusb_pollfd_removed_cb',
|
1610
|
+
'libusb_pollfds_handle_timeouts', 'libusb_ref_device',
|
1611
|
+
'libusb_release_interface', 'libusb_request_recipient',
|
1612
|
+
'libusb_request_type', 'libusb_reset_device',
|
1613
|
+
'libusb_set_auto_detach_kernel_driver',
|
1614
|
+
'libusb_set_configuration', 'libusb_set_debug',
|
1615
|
+
'libusb_set_interface_alt_setting',
|
1616
|
+
'libusb_set_iso_packet_lengths', 'libusb_set_log_cb',
|
1617
|
+
'libusb_set_option', 'libusb_set_pollfd_notifiers',
|
1618
|
+
'libusb_setlocale', 'libusb_speed',
|
1619
|
+
'libusb_ss_usb_device_capability_attributes',
|
1620
|
+
'libusb_standard_request', 'libusb_strerror',
|
1621
|
+
'libusb_submit_transfer', 'libusb_supported_speed',
|
1622
|
+
'libusb_transfer_cb_fn', 'libusb_transfer_flags',
|
1623
|
+
'libusb_transfer_get_stream_id', 'libusb_transfer_set_stream_id',
|
1624
|
+
'libusb_transfer_status', 'libusb_transfer_type',
|
1625
|
+
'libusb_try_lock_events', 'libusb_unlock_event_waiters',
|
1626
|
+
'libusb_unlock_events', 'libusb_unref_device',
|
1627
|
+
'libusb_usb_2_0_extension_attributes', 'libusb_wait_for_event',
|
1628
|
+
'libusb_wrap_sys_device', 'size_t', 'ssize_t',
|
1629
|
+
'struct_libusb_bos_descriptor',
|
1630
|
+
'struct_libusb_bos_dev_capability_descriptor',
|
1631
|
+
'struct_libusb_config_descriptor',
|
1632
|
+
'struct_libusb_container_id_descriptor', 'struct_libusb_context',
|
1633
|
+
'struct_libusb_control_setup', 'struct_libusb_device',
|
1634
|
+
'struct_libusb_device_descriptor', 'struct_libusb_device_handle',
|
1635
|
+
'struct_libusb_endpoint_descriptor', 'struct_libusb_interface',
|
1636
|
+
'struct_libusb_interface_descriptor',
|
1637
|
+
'struct_libusb_iso_packet_descriptor', 'struct_libusb_pollfd',
|
1638
|
+
'struct_libusb_ss_endpoint_companion_descriptor',
|
1639
|
+
'struct_libusb_ss_usb_device_capability_descriptor',
|
1640
|
+
'struct_libusb_transfer',
|
1641
|
+
'struct_libusb_usb_2_0_extension_descriptor',
|
1642
|
+
'struct_libusb_version', 'struct_timeval', 'uint16_t', 'uint32_t',
|
1643
|
+
'uint8_t']
|