rawhid 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rawhid/version.rb +1 -1
- data/lib/rawhid.rb +2 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ff39ccf2097fde8b9c885aa78569e543bb4f29f
|
4
|
+
data.tar.gz: c5f8bada29d96b96ad9f34827ccddd2ef820d855
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e980ed6c22392e08c41a0c237488ae562d7c70981e2f9d27c0a3dce2df437b67c852aa8bdbd7d38971f8353f684761aec91463fb809b54ed999de0f1506a920
|
7
|
+
data.tar.gz: c7bffdc5e5b068de5c303e18f3e74ecd2b3f54f8caf5d9e37542a7ca597a89600f9bac47cc7f000a3958cce8ebe68281519775d80b794a23bae53cf2b755de33
|
data/lib/rawhid/version.rb
CHANGED
data/lib/rawhid.rb
CHANGED
@@ -11,12 +11,10 @@ class RawHID
|
|
11
11
|
end
|
12
12
|
private :raw_send, :raw_recv
|
13
13
|
|
14
|
-
def
|
15
|
-
puts "sendy"
|
14
|
+
def write(data, timeout=0)
|
16
15
|
if Array === data
|
17
16
|
data = data.map(&:chr).join
|
18
17
|
end
|
19
|
-
puts "sendy sendy"
|
20
18
|
ret = raw_send(data, timeout)
|
21
19
|
if ret > 0
|
22
20
|
ret
|
@@ -25,7 +23,7 @@ class RawHID
|
|
25
23
|
end
|
26
24
|
end
|
27
25
|
|
28
|
-
def
|
26
|
+
def read(len, timeout)
|
29
27
|
ret = raw_recv(len, timeout)
|
30
28
|
if String === data
|
31
29
|
return ret
|