libusb 0.7.0-x64-mingw-ucrt
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.
- checksums.yaml +7 -0
- data/.appveyor.yml +33 -0
- data/.github/workflows/ci.yml +185 -0
- data/.gitignore +9 -0
- data/.travis.yml +26 -0
- data/.yardopts +6 -0
- data/COPYING +165 -0
- data/Gemfile +19 -0
- data/History.md +193 -0
- data/README.md +184 -0
- data/Rakefile +79 -0
- data/lib/libusb/bos.rb +362 -0
- data/lib/libusb/call.rb +622 -0
- data/lib/libusb/compat.rb +376 -0
- data/lib/libusb/configuration.rb +154 -0
- data/lib/libusb/constants.rb +170 -0
- data/lib/libusb/context.rb +576 -0
- data/lib/libusb/context_reference.rb +38 -0
- data/lib/libusb/dependencies.rb +7 -0
- data/lib/libusb/dev_handle.rb +574 -0
- data/lib/libusb/device.rb +407 -0
- data/lib/libusb/endpoint.rb +195 -0
- data/lib/libusb/eventmachine.rb +187 -0
- data/lib/libusb/gem_helper.rb +151 -0
- data/lib/libusb/interface.rb +60 -0
- data/lib/libusb/libusb_recipe.rb +29 -0
- data/lib/libusb/setting.rb +132 -0
- data/lib/libusb/ss_companion.rb +72 -0
- data/lib/libusb/stdio.rb +25 -0
- data/lib/libusb/transfer.rb +418 -0
- data/lib/libusb/version_gem.rb +19 -0
- data/lib/libusb/version_struct.rb +63 -0
- data/lib/libusb-1.0.dll +0 -0
- data/lib/libusb.rb +146 -0
- data/libusb.gemspec +28 -0
- data/test/test_libusb.rb +42 -0
- data/test/test_libusb_bos.rb +140 -0
- data/test/test_libusb_bulk_stream_transfer.rb +61 -0
- data/test/test_libusb_compat.rb +78 -0
- data/test/test_libusb_compat_mass_storage.rb +81 -0
- data/test/test_libusb_context.rb +88 -0
- data/test/test_libusb_descriptors.rb +245 -0
- data/test/test_libusb_event_machine.rb +118 -0
- data/test/test_libusb_gc.rb +52 -0
- data/test/test_libusb_hotplug.rb +129 -0
- data/test/test_libusb_iso_transfer.rb +56 -0
- data/test/test_libusb_mass_storage.rb +268 -0
- data/test/test_libusb_mass_storage2.rb +96 -0
- data/test/test_libusb_structs.rb +87 -0
- data/test/test_libusb_threads.rb +89 -0
- data/wireshark-usb-sniffer.png +0 -0
- metadata +112 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: dc910549250e503a8d367f199199ac7fb2b58629d20616f75d9cb7cf67e5efaf
|
4
|
+
data.tar.gz: 6225ccbcc2c35169106b1c0cb5a78e36f9d24972c6eeb698e0cf104250aca619
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7eb46d18970c9b92f8d05e003ce893264ade31ff9b3cc05d5b5dd5a79189a8ea3367f2db7819867bb33be6b36184bc1a7e4869bd26337c6bce0897e0e7e0c8a0
|
7
|
+
data.tar.gz: b2229eea4abf30c22df289a84a9226b5803ff929d491420b2d66095ab611ad65df3bb6e70481653fc5a195ab98c81f257923b6613cd9b442eb9eeee30f3be561
|
data/.appveyor.yml
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
image: Visual Studio 2019
|
2
|
+
|
3
|
+
clone_depth: 1
|
4
|
+
|
5
|
+
init:
|
6
|
+
- SET PATH=C:/Ruby%ruby_version%/bin;%PATH%
|
7
|
+
install:
|
8
|
+
- ps: |
|
9
|
+
if ($env:ruby_version -like "*head*") {
|
10
|
+
$(new-object net.webclient).DownloadFile("https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-head/rubyinstaller-$env:ruby_version.exe", "$pwd/ruby-setup.exe")
|
11
|
+
cmd /c ruby-setup.exe /verysilent /currentuser /dir=C:/Ruby$env:ruby_version
|
12
|
+
}
|
13
|
+
- ruby --version
|
14
|
+
- gem --version
|
15
|
+
- ridk version
|
16
|
+
- ridk enable
|
17
|
+
- c:/msys64/usr/bin/bash -lc "pacman -S --noconfirm --needed ${MINGW_PACKAGE_PREFIX}-gcc ${MINGW_PACKAGE_PREFIX}-openssl"
|
18
|
+
- gcc -v
|
19
|
+
- gem install bundler --conservative
|
20
|
+
- bundle install
|
21
|
+
|
22
|
+
build_script:
|
23
|
+
- bundle exec rake compile
|
24
|
+
|
25
|
+
test_script:
|
26
|
+
- bundle exec rake ci
|
27
|
+
|
28
|
+
environment:
|
29
|
+
matrix:
|
30
|
+
- ruby_version: "head-x64"
|
31
|
+
- ruby_version: "33"
|
32
|
+
- ruby_version: "30-x64"
|
33
|
+
- ruby_version: "25"
|
@@ -0,0 +1,185 @@
|
|
1
|
+
name: Build docker images
|
2
|
+
concurrency:
|
3
|
+
group: "${{github.workflow}}-${{github.ref}}"
|
4
|
+
cancel-in-progress: true
|
5
|
+
on:
|
6
|
+
workflow_dispatch:
|
7
|
+
schedule:
|
8
|
+
- cron: "0 5 * * 3" # At 05:00 on Wednesday # https://crontab.guru/#0_5_*_*_3
|
9
|
+
push:
|
10
|
+
branches:
|
11
|
+
- master
|
12
|
+
tags:
|
13
|
+
- "*.*.*"
|
14
|
+
pull_request:
|
15
|
+
types: [opened, synchronize]
|
16
|
+
branches:
|
17
|
+
- "*"
|
18
|
+
|
19
|
+
jobs:
|
20
|
+
# These jobs use Buildx layer caching
|
21
|
+
docker_build:
|
22
|
+
name: Build
|
23
|
+
|
24
|
+
strategy:
|
25
|
+
fail-fast: false
|
26
|
+
matrix:
|
27
|
+
platform:
|
28
|
+
- x86-mingw32
|
29
|
+
- x64-mingw-ucrt
|
30
|
+
- x64-mingw32
|
31
|
+
- x86-linux
|
32
|
+
- x86_64-linux
|
33
|
+
|
34
|
+
runs-on: ubuntu-latest
|
35
|
+
env:
|
36
|
+
PLATFORM: ${{ matrix.platform }}
|
37
|
+
steps:
|
38
|
+
- uses: actions/checkout@v4
|
39
|
+
|
40
|
+
- uses: ruby/setup-ruby@v1
|
41
|
+
with:
|
42
|
+
ruby-version: "3.3"
|
43
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
44
|
+
|
45
|
+
- name: Build libusb.gem
|
46
|
+
run: |
|
47
|
+
bundle exec rake gem:native:${PLATFORM}
|
48
|
+
|
49
|
+
- name: Upload binary gem
|
50
|
+
uses: actions/upload-artifact@v4
|
51
|
+
with:
|
52
|
+
name: gem-${{ matrix.platform }}
|
53
|
+
path: pkg/*-*-*.gem
|
54
|
+
|
55
|
+
- if: matrix.platform == 'jruby'
|
56
|
+
name: Upload source gem
|
57
|
+
uses: actions/upload-artifact@v4
|
58
|
+
with:
|
59
|
+
name: gem-ruby
|
60
|
+
path: pkg/*-?.?.?.gem
|
61
|
+
|
62
|
+
job_test_native:
|
63
|
+
name: Bin (${{matrix.ruby}}, ${{matrix.os}}, ${{matrix.platform}})
|
64
|
+
needs: docker_build
|
65
|
+
strategy:
|
66
|
+
fail-fast: false
|
67
|
+
matrix:
|
68
|
+
include:
|
69
|
+
- os: windows
|
70
|
+
ruby: "2.5"
|
71
|
+
platform: x64-mingw32
|
72
|
+
- os: windows
|
73
|
+
ruby: "3.3"
|
74
|
+
platform: x64-mingw-ucrt
|
75
|
+
- os: ubuntu
|
76
|
+
ruby: "2.5"
|
77
|
+
platform: x86_64-linux
|
78
|
+
- os: ubuntu
|
79
|
+
ruby: "3.3"
|
80
|
+
platform: x86_64-linux
|
81
|
+
|
82
|
+
runs-on: ${{ matrix.os }}-latest
|
83
|
+
steps:
|
84
|
+
- uses: actions/checkout@v4
|
85
|
+
- uses: ruby/setup-ruby@v1
|
86
|
+
with:
|
87
|
+
ruby-version: ${{ matrix.ruby }}
|
88
|
+
- run: ruby --version
|
89
|
+
- name: Download gem-${{matrix.platform}}
|
90
|
+
uses: actions/download-artifact@v4
|
91
|
+
with:
|
92
|
+
name: gem-${{ matrix.platform }}
|
93
|
+
- name: Install gem-${{matrix.platform}}
|
94
|
+
run: gem install *.gem --verbose
|
95
|
+
- name: bundle install
|
96
|
+
run: bundle install
|
97
|
+
- name: Generate Gemfile_libusb_gem to ensure the installed gem is used
|
98
|
+
run: bundle exec rake gemfile_libusb_gem
|
99
|
+
- name: Run tests
|
100
|
+
env:
|
101
|
+
BUNDLE_GEMFILE: Gemfile_libusb_gem
|
102
|
+
run: |
|
103
|
+
bundle exec rake ci
|
104
|
+
|
105
|
+
# These jobs use Buildx layer caching
|
106
|
+
source_gem:
|
107
|
+
name: Source gem
|
108
|
+
|
109
|
+
strategy:
|
110
|
+
fail-fast: false
|
111
|
+
|
112
|
+
runs-on: ubuntu-latest
|
113
|
+
steps:
|
114
|
+
- uses: actions/checkout@v4
|
115
|
+
|
116
|
+
- uses: ruby/setup-ruby@v1
|
117
|
+
with:
|
118
|
+
ruby-version: "3.3"
|
119
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
120
|
+
|
121
|
+
- name: Build libusb.gem
|
122
|
+
run: |
|
123
|
+
bundle exec rake gem
|
124
|
+
|
125
|
+
- name: Upload binary gem
|
126
|
+
uses: actions/upload-artifact@v4
|
127
|
+
with:
|
128
|
+
name: gem-ruby
|
129
|
+
path: pkg/*.gem
|
130
|
+
|
131
|
+
job_test_source:
|
132
|
+
name: Src (${{matrix.ruby}}, ${{matrix.os}}, ${{matrix.extconfopts}})
|
133
|
+
needs: source_gem
|
134
|
+
strategy:
|
135
|
+
fail-fast: false
|
136
|
+
matrix:
|
137
|
+
os:
|
138
|
+
- windows
|
139
|
+
- ubuntu
|
140
|
+
- macos
|
141
|
+
ruby:
|
142
|
+
- "3.3"
|
143
|
+
- "2.5"
|
144
|
+
- "head"
|
145
|
+
- "jruby"
|
146
|
+
- "truffleruby"
|
147
|
+
extconfopts: [ --disable-system-libusb, --enable-system-libusb ]
|
148
|
+
exclude:
|
149
|
+
- os: windows
|
150
|
+
ruby: "truffleruby"
|
151
|
+
- os: windows
|
152
|
+
ruby: "jruby"
|
153
|
+
# Fails to install libusb from MSYS2
|
154
|
+
extconfopts: --enable-system-libusb
|
155
|
+
- os: windows
|
156
|
+
ruby: "jruby"
|
157
|
+
# configure: error: unrecognized option: `--prefix\=D:/jruby-9.4.6.0/lib/ruby/gems/shared/gems/libusb-0.6.4/ports/x86_64-w64-mingw32/libusb/1.0.27'
|
158
|
+
extconfopts: --disable-system-libusb
|
159
|
+
|
160
|
+
runs-on: ${{ matrix.os }}-latest
|
161
|
+
steps:
|
162
|
+
- uses: actions/checkout@v4
|
163
|
+
- uses: ruby/setup-ruby@v1
|
164
|
+
with:
|
165
|
+
ruby-version: ${{ matrix.ruby }}
|
166
|
+
- run: ruby --version
|
167
|
+
- name: Download gem
|
168
|
+
uses: actions/download-artifact@v4
|
169
|
+
with:
|
170
|
+
name: gem-ruby
|
171
|
+
- name: Install libusb on Windows
|
172
|
+
if: matrix.os == 'windows' && matrix.extconfopts == '--enable-system-libusb'
|
173
|
+
shell: cmd
|
174
|
+
run: C:/msys64/usr/bin/sh -c "pacman --sync --refresh --needed --noconfirm ${MINGW_PACKAGE_PREFIX}-libusb"
|
175
|
+
- name: Install gem
|
176
|
+
run: gem install *.gem --verbose -- ${{ matrix.extconfopts }}
|
177
|
+
- name: bundle install
|
178
|
+
run: bundle install
|
179
|
+
- name: Generate Gemfile_libusb_gem to ensure the installed gem is used
|
180
|
+
run: bundle exec rake gemfile_libusb_gem
|
181
|
+
- name: Run tests
|
182
|
+
env:
|
183
|
+
BUNDLE_GEMFILE: Gemfile_libusb_gem
|
184
|
+
run: |
|
185
|
+
bundle exec rake ci
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
language: ruby
|
2
|
+
|
3
|
+
sudo: false
|
4
|
+
|
5
|
+
dist: xenial
|
6
|
+
matrix:
|
7
|
+
include:
|
8
|
+
- rvm: ruby-head
|
9
|
+
env:
|
10
|
+
- RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal"
|
11
|
+
- rvm: 2.4.3
|
12
|
+
env:
|
13
|
+
- RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal"
|
14
|
+
- rvm: 3.0
|
15
|
+
env:
|
16
|
+
- RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal"
|
17
|
+
- rvm: 2.7
|
18
|
+
- rvm: 2.6
|
19
|
+
- rvm: 2.3.1
|
20
|
+
- rvm: jruby-9.2.14.0
|
21
|
+
- rvm: truffleruby
|
22
|
+
|
23
|
+
allow_failures:
|
24
|
+
- rvm: ruby-head
|
25
|
+
|
26
|
+
script: bundle exec rake travis
|
data/.yardopts
ADDED
data/COPYING
ADDED
@@ -0,0 +1,165 @@
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
2
|
+
Version 3, 29 June 2007
|
3
|
+
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5
|
+
Everyone is permitted to copy and distribute verbatim copies
|
6
|
+
of this license document, but changing it is not allowed.
|
7
|
+
|
8
|
+
|
9
|
+
This version of the GNU Lesser General Public License incorporates
|
10
|
+
the terms and conditions of version 3 of the GNU General Public
|
11
|
+
License, supplemented by the additional permissions listed below.
|
12
|
+
|
13
|
+
0. Additional Definitions.
|
14
|
+
|
15
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
16
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
17
|
+
General Public License.
|
18
|
+
|
19
|
+
"The Library" refers to a covered work governed by this License,
|
20
|
+
other than an Application or a Combined Work as defined below.
|
21
|
+
|
22
|
+
An "Application" is any work that makes use of an interface provided
|
23
|
+
by the Library, but which is not otherwise based on the Library.
|
24
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
25
|
+
of using an interface provided by the Library.
|
26
|
+
|
27
|
+
A "Combined Work" is a work produced by combining or linking an
|
28
|
+
Application with the Library. The particular version of the Library
|
29
|
+
with which the Combined Work was made is also called the "Linked
|
30
|
+
Version".
|
31
|
+
|
32
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
33
|
+
Corresponding Source for the Combined Work, excluding any source code
|
34
|
+
for portions of the Combined Work that, considered in isolation, are
|
35
|
+
based on the Application, and not on the Linked Version.
|
36
|
+
|
37
|
+
The "Corresponding Application Code" for a Combined Work means the
|
38
|
+
object code and/or source code for the Application, including any data
|
39
|
+
and utility programs needed for reproducing the Combined Work from the
|
40
|
+
Application, but excluding the System Libraries of the Combined Work.
|
41
|
+
|
42
|
+
1. Exception to Section 3 of the GNU GPL.
|
43
|
+
|
44
|
+
You may convey a covered work under sections 3 and 4 of this License
|
45
|
+
without being bound by section 3 of the GNU GPL.
|
46
|
+
|
47
|
+
2. Conveying Modified Versions.
|
48
|
+
|
49
|
+
If you modify a copy of the Library, and, in your modifications, a
|
50
|
+
facility refers to a function or data to be supplied by an Application
|
51
|
+
that uses the facility (other than as an argument passed when the
|
52
|
+
facility is invoked), then you may convey a copy of the modified
|
53
|
+
version:
|
54
|
+
|
55
|
+
a) under this License, provided that you make a good faith effort to
|
56
|
+
ensure that, in the event an Application does not supply the
|
57
|
+
function or data, the facility still operates, and performs
|
58
|
+
whatever part of its purpose remains meaningful, or
|
59
|
+
|
60
|
+
b) under the GNU GPL, with none of the additional permissions of
|
61
|
+
this License applicable to that copy.
|
62
|
+
|
63
|
+
3. Object Code Incorporating Material from Library Header Files.
|
64
|
+
|
65
|
+
The object code form of an Application may incorporate material from
|
66
|
+
a header file that is part of the Library. You may convey such object
|
67
|
+
code under terms of your choice, provided that, if the incorporated
|
68
|
+
material is not limited to numerical parameters, data structure
|
69
|
+
layouts and accessors, or small macros, inline functions and templates
|
70
|
+
(ten or fewer lines in length), you do both of the following:
|
71
|
+
|
72
|
+
a) Give prominent notice with each copy of the object code that the
|
73
|
+
Library is used in it and that the Library and its use are
|
74
|
+
covered by this License.
|
75
|
+
|
76
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
77
|
+
document.
|
78
|
+
|
79
|
+
4. Combined Works.
|
80
|
+
|
81
|
+
You may convey a Combined Work under terms of your choice that,
|
82
|
+
taken together, effectively do not restrict modification of the
|
83
|
+
portions of the Library contained in the Combined Work and reverse
|
84
|
+
engineering for debugging such modifications, if you also do each of
|
85
|
+
the following:
|
86
|
+
|
87
|
+
a) Give prominent notice with each copy of the Combined Work that
|
88
|
+
the Library is used in it and that the Library and its use are
|
89
|
+
covered by this License.
|
90
|
+
|
91
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
92
|
+
document.
|
93
|
+
|
94
|
+
c) For a Combined Work that displays copyright notices during
|
95
|
+
execution, include the copyright notice for the Library among
|
96
|
+
these notices, as well as a reference directing the user to the
|
97
|
+
copies of the GNU GPL and this license document.
|
98
|
+
|
99
|
+
d) Do one of the following:
|
100
|
+
|
101
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
102
|
+
License, and the Corresponding Application Code in a form
|
103
|
+
suitable for, and under terms that permit, the user to
|
104
|
+
recombine or relink the Application with a modified version of
|
105
|
+
the Linked Version to produce a modified Combined Work, in the
|
106
|
+
manner specified by section 6 of the GNU GPL for conveying
|
107
|
+
Corresponding Source.
|
108
|
+
|
109
|
+
1) Use a suitable shared library mechanism for linking with the
|
110
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
111
|
+
a copy of the Library already present on the user's computer
|
112
|
+
system, and (b) will operate properly with a modified version
|
113
|
+
of the Library that is interface-compatible with the Linked
|
114
|
+
Version.
|
115
|
+
|
116
|
+
e) Provide Installation Information, but only if you would otherwise
|
117
|
+
be required to provide such information under section 6 of the
|
118
|
+
GNU GPL, and only to the extent that such information is
|
119
|
+
necessary to install and execute a modified version of the
|
120
|
+
Combined Work produced by recombining or relinking the
|
121
|
+
Application with a modified version of the Linked Version. (If
|
122
|
+
you use option 4d0, the Installation Information must accompany
|
123
|
+
the Minimal Corresponding Source and Corresponding Application
|
124
|
+
Code. If you use option 4d1, you must provide the Installation
|
125
|
+
Information in the manner specified by section 6 of the GNU GPL
|
126
|
+
for conveying Corresponding Source.)
|
127
|
+
|
128
|
+
5. Combined Libraries.
|
129
|
+
|
130
|
+
You may place library facilities that are a work based on the
|
131
|
+
Library side by side in a single library together with other library
|
132
|
+
facilities that are not Applications and are not covered by this
|
133
|
+
License, and convey such a combined library under terms of your
|
134
|
+
choice, if you do both of the following:
|
135
|
+
|
136
|
+
a) Accompany the combined library with a copy of the same work based
|
137
|
+
on the Library, uncombined with any other library facilities,
|
138
|
+
conveyed under the terms of this License.
|
139
|
+
|
140
|
+
b) Give prominent notice with the combined library that part of it
|
141
|
+
is a work based on the Library, and explaining where to find the
|
142
|
+
accompanying uncombined form of the same work.
|
143
|
+
|
144
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
145
|
+
|
146
|
+
The Free Software Foundation may publish revised and/or new versions
|
147
|
+
of the GNU Lesser General Public License from time to time. Such new
|
148
|
+
versions will be similar in spirit to the present version, but may
|
149
|
+
differ in detail to address new problems or concerns.
|
150
|
+
|
151
|
+
Each version is given a distinguishing version number. If the
|
152
|
+
Library as you received it specifies that a certain numbered version
|
153
|
+
of the GNU Lesser General Public License "or any later version"
|
154
|
+
applies to it, you have the option of following the terms and
|
155
|
+
conditions either of that published version or of any later version
|
156
|
+
published by the Free Software Foundation. If the Library as you
|
157
|
+
received it does not specify a version number of the GNU Lesser
|
158
|
+
General Public License, you may choose any version of the GNU Lesser
|
159
|
+
General Public License ever published by the Free Software Foundation.
|
160
|
+
|
161
|
+
If the Library as you received it specifies that a proxy can decide
|
162
|
+
whether future versions of the GNU Lesser General Public License shall
|
163
|
+
apply, that proxy's public statement of acceptance of any version is
|
164
|
+
permanent authorization for you to choose that version for the
|
165
|
+
Library.
|
data/Gemfile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in libusb.gemspec
|
4
|
+
gemspec
|
5
|
+
|
6
|
+
group :test do
|
7
|
+
gem 'eventmachine'
|
8
|
+
gem 'minitest'
|
9
|
+
end
|
10
|
+
|
11
|
+
gem 'rake-compiler-dock', '~> 1.1'
|
12
|
+
gem 'rake-compiler', '~> 1.0'
|
13
|
+
gem 'bundler', '>= 1', '< 3'
|
14
|
+
gem 'yard', '~> 0.6', '>= 0.9.36'
|
15
|
+
|
16
|
+
# For some reason this is required in addition to the gemspec
|
17
|
+
# when 'bundle config force_ruby_platform true' is active:
|
18
|
+
gem 'ffi'
|
19
|
+
gem 'mini_portile2'
|
data/History.md
ADDED
@@ -0,0 +1,193 @@
|
|
1
|
+
0.7.0 / 2024-04-18
|
2
|
+
------------------
|
3
|
+
|
4
|
+
Added:
|
5
|
+
* Garbage collect LIBUSB::Context objects. #47
|
6
|
+
Context objects were intentionally not garbage collected previously, since it led to segfauls, when the context was freed before other libusb objects.
|
7
|
+
Now refcounting all objects bound to a particular Context ensures that the underlying libusb context is always freed at last, avoiding any segfaults.
|
8
|
+
Registered log callback and pollfd callbacks are disabled before garbage collecting LIBUSB::Context.
|
9
|
+
* Cancel USB transfers on any exceptions not only LIBUSB::Error, but also Interrupt or IRB::Abort, etc.
|
10
|
+
Otherwise incomplete transfers lead to LIBUSB::ERROR_BUSY at the next command.
|
11
|
+
* Update Windows binary support for ruby up to 3.3.x
|
12
|
+
* Update bundled libusb version to 1.0.27.
|
13
|
+
* Add support for new functions of libusb-1.0.27
|
14
|
+
They are:
|
15
|
+
- libusb_init_context
|
16
|
+
- libusb_set_log_cb
|
17
|
+
- libusb_wrap_sys_device
|
18
|
+
* Add global Libusb.set_option and Libusb.set_options . #42
|
19
|
+
* Add LIBUSB::Device.max_alt_packet_size. #42
|
20
|
+
Introduced in libusb-1.0.27 as libusb_get_max_alt_packet_size()
|
21
|
+
* Add BOS platform descriptor introduced in libusb-1.0.27. #49
|
22
|
+
* Add enums for all BOS descripors of the USB-3.2-V1.1 spec. #49
|
23
|
+
|
24
|
+
Changed:
|
25
|
+
* Set minimum Ruby version requirement to 2.5.0.
|
26
|
+
* Fix a circular reference in ZeroCopyMemory.
|
27
|
+
This circular reference blocked all objects referenced by a LIBUSB::Transfer to be released by the garbage collector.
|
28
|
+
* Make ZeroCopyMemory an opt-in rather then enforcing it
|
29
|
+
In therory libusb_dev_mem_alloc shouldn't provide a pointer unless zero-copy-memory is supported by the linux kernel.
|
30
|
+
But in practice this has been a repeating cause of issues, since some kernels don't handle these transfers.
|
31
|
+
So it's better to enable it on request only.
|
32
|
+
For instance older raspberry pi kernels didn't handle zero-copy-memory.
|
33
|
+
* Fix struct member size in Bos::SsUsbDeviceCapability. #48
|
34
|
+
The bmAttributes member is defined as uint8_t not uint32_t.
|
35
|
+
* Fix context reference in device of hotplug notification callback.
|
36
|
+
* Deregister pollfd callbacks in eventmachine_unregister.
|
37
|
+
|
38
|
+
|
39
|
+
0.6.4 / 2018-05-05
|
40
|
+
------------------
|
41
|
+
|
42
|
+
Added:
|
43
|
+
* New function Context#set_option.
|
44
|
+
It is also available when running libusb < 1.0.22 and calls libusb_set_debug() in this case.
|
45
|
+
* Add definition for SUPER_SPEED_PLUS.
|
46
|
+
* Linux: Use system libusb even when only library but no dev package is installed.
|
47
|
+
* Add Transfer#dev_handle and #timeout
|
48
|
+
* Use system libusb even when no development package is installed.
|
49
|
+
Means "libusb-1.0-0" is enough, no need for "libusb-dev" on Ubuntu.
|
50
|
+
|
51
|
+
Changed:
|
52
|
+
* Update libusb to 1.0.22
|
53
|
+
|
54
|
+
Deprecated:
|
55
|
+
* Deprecate Context#debug= analogous to libusb_set_debug in libusb-1.0.22.
|
56
|
+
|
57
|
+
|
58
|
+
0.6.3 / 2017-08-20
|
59
|
+
------------------
|
60
|
+
* Fix compat with FreeBSD. #24
|
61
|
+
|
62
|
+
0.6.2 / 2017-01-13
|
63
|
+
------------------
|
64
|
+
* Fix windows DLL loading bugs #22 and #23.
|
65
|
+
|
66
|
+
0.6.1 / 2016-12-18
|
67
|
+
------------------
|
68
|
+
* Fix installation of bundled libusb library in source gem.
|
69
|
+
|
70
|
+
0.6.0 / 2016-12-09
|
71
|
+
------------------
|
72
|
+
* Update bundled libusb version to 1.0.21.
|
73
|
+
* Set minimum Ruby version requirement to 1.9.3.
|
74
|
+
* Add binary gems for Linux in addition to Windows.
|
75
|
+
* Switch to mini_portile2 for (cross-) builing the libusb library.
|
76
|
+
* Add Context#interrupt_event_handler new in libusb-1.0.21
|
77
|
+
* Add support for persistent/zerocopy device memory for transfers.
|
78
|
+
It is new in libusb-1.0.21 and enabled by default for DevHandle#*_transfer methods.
|
79
|
+
* Raise a more meaningful exception in case of bulk stream transfers on too old libusb versions.
|
80
|
+
* Prefer the bundled libusb-dll over installed system library.
|
81
|
+
|
82
|
+
0.5.1 / 2015-09-29
|
83
|
+
------------------
|
84
|
+
* Add ability to force use of the system or builtin libusb-1.0 library.
|
85
|
+
Use: gem install libusb -- --enable-system-libusb / --disable-system-libusb
|
86
|
+
* Update to libusb-1.0.20.
|
87
|
+
* Build Windows binary gems per rake-compiler-dock.
|
88
|
+
* Fix memory leak in Context#pollfds and use libusb_free_pollfds() if available.
|
89
|
+
|
90
|
+
0.5.0 / 2015-01-08
|
91
|
+
------------------
|
92
|
+
* Add support for BOS describtors of libusb-1.0.16
|
93
|
+
* Add support for superspeed endpoint companion descriptors of libusb-1.0.16
|
94
|
+
* Add support for USB-3.0 bulk streams of libusb-1.0.19
|
95
|
+
* Update bundled libusb version to 1.0.19.
|
96
|
+
* Update windows cross build to gcc-4.8 and recent rubygems
|
97
|
+
|
98
|
+
0.4.1 / 2014-05-17
|
99
|
+
------------------
|
100
|
+
* Update bundled libusb version to 1.0.18.
|
101
|
+
* Change libusbx references back to libusb, since they have merged again.
|
102
|
+
|
103
|
+
0.4.0 / 2013-11-20
|
104
|
+
------------------
|
105
|
+
* Add support for device hotplug notifications.
|
106
|
+
* Update to libusbx-1.0.17.
|
107
|
+
* Add DevHandle#auto_detach_kernel_driver= of libusb-1.0.16.
|
108
|
+
* Add new capabilities introduced with libusb-1.0.16.
|
109
|
+
* Offer #has_capability? for libusb versions older than 1.0.9.
|
110
|
+
* Add new method port_numbers with alias to port_path.
|
111
|
+
* Use libusb_get_port_numbers preferred to now deprecated libusb_get_port_path.
|
112
|
+
|
113
|
+
0.3.4 / 2013-04-05
|
114
|
+
------------------
|
115
|
+
* Avoid closing of pollfds by the Ruby GC when used as IO object.
|
116
|
+
|
117
|
+
0.3.3 / 2013-04-05
|
118
|
+
------------------
|
119
|
+
* Build and package binary x64 version of libusb for Windows in addition to x86.
|
120
|
+
* Fix build on Windows from source gem (although may take almost an hour).
|
121
|
+
|
122
|
+
0.3.2 / 2013-02-16
|
123
|
+
------------------
|
124
|
+
* Don't enforces DevKit installation on Windows.
|
125
|
+
* Fix error check on libusb_get_device_list(). Thanks to Paul Kunysch for the bug report.
|
126
|
+
* Add support for Cygwin. Requires ffi-1.4.0.
|
127
|
+
|
128
|
+
0.3.1 / 2013-01-22
|
129
|
+
------------------
|
130
|
+
* Fix loading of compiled libusb library on OSX
|
131
|
+
|
132
|
+
0.3.0 / 2013-01-21
|
133
|
+
------------------
|
134
|
+
* Build bundled libusbx sources in case libusb-1.0.so can not be loaded from the system
|
135
|
+
* Replace Hoe with Bundler
|
136
|
+
* Add timeout and completion_flag to Context#handle_events
|
137
|
+
* Add asynchronous DevHandle#{control|interrupt|bulk}_transfer method variants
|
138
|
+
* Add the ability to retrieve the data already transfered when it comes to an exception
|
139
|
+
* Add notification API for libusb's file describtors for event driven USB transfers
|
140
|
+
* Add experimental integration to EventMachine
|
141
|
+
* Add several convenience methods to descriptors
|
142
|
+
* Add missing return code checks to libusb_init() and libusb_get_device_list()
|
143
|
+
|
144
|
+
0.2.2 / 2012-10-19
|
145
|
+
------------------
|
146
|
+
* Add method Interface#bInterfaceNumber
|
147
|
+
* Fix methods (#claim_interface, #detach_kernel_driver) with Interface-type parameter
|
148
|
+
* update to libusbx-1.0.14 for windows build
|
149
|
+
|
150
|
+
0.2.1 / 2012-09-25
|
151
|
+
------------------
|
152
|
+
* Rename Configuration#maxPower to #bMaxPower as done in libusbx-1.0.13 and in ruby-usb.gem
|
153
|
+
* update to libusbx-1.0.13 for windows build (with support for libusbK and libusb0)
|
154
|
+
|
155
|
+
0.2.0 / 2012-06-15
|
156
|
+
------------------
|
157
|
+
* Divide up the libusb library across multiple files, required with autoload
|
158
|
+
* add methods: LIBUSB.has_capability?, Device#device_speed (libusb-1.0.9+)
|
159
|
+
* add possibility to read out libusb version: LIBUSB.version (libusbx-1.0.10+)
|
160
|
+
* add methods: Device#parent, Device#port_number, Device#port_path (libusbx-1.0.12+)
|
161
|
+
* switch to libusbx-1.0.12 for windows build
|
162
|
+
|
163
|
+
0.1.3 / 2012-03-15
|
164
|
+
-------------------
|
165
|
+
* Add documentation of descriptor accessors
|
166
|
+
* Fix #extra accessor of Configuration, Setting and Endpoint
|
167
|
+
|
168
|
+
0.1.2 / 2012-03-14
|
169
|
+
------------------
|
170
|
+
* Mark all blocking functions as blocking in FFI, so that parallel threads are not blocked
|
171
|
+
* Add method Device#open_interface
|
172
|
+
* Add block variant to #claim_interface
|
173
|
+
* update API documentation
|
174
|
+
|
175
|
+
0.1.1 / 2011-12-09
|
176
|
+
------------------
|
177
|
+
* avoid ffi calls with :blocking=>true, als long as it isn't stable on win32
|
178
|
+
|
179
|
+
0.1.0 / 2011-10-01
|
180
|
+
------------------
|
181
|
+
* add test suite based on mass storage devices
|
182
|
+
* usable async transfers
|
183
|
+
* migration to rake-compiler and hoe
|
184
|
+
* cross compiled Windows gems
|
185
|
+
* distinct exception classes
|
186
|
+
* new compatibility layer for ruby-usb.gem
|
187
|
+
* many helper methods for different USB descriptors
|
188
|
+
* add LIBUSB constants
|
189
|
+
* downcase methods names
|
190
|
+
|
191
|
+
0.0.1 / 2009-06-23
|
192
|
+
------------------
|
193
|
+
* first public release
|