nfc 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/nfc/nfc_device.c +7 -4
- data/lib/nfc.rb +1 -1
- data/lib/nfc/device.rb +3 -0
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f993289f67ac61a6258cb65aab3ef22ebdf6c09
|
4
|
+
data.tar.gz: 9bd06f63aec5247bddcf5fcaf01c154d52c7164d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4aeeac8d1cd5463b2f9e07e82fed92dee031b3d6f40ae67aaed6ef627c6f1600338ad6cefb7dd1edc8d5eb524de1ccfb4471475dacabfd6ddcdfee6dc272584a
|
7
|
+
data.tar.gz: 310d063baffa97b2683242005cf728bf756fdd1efb907c1d31d767f659c416e4cacae62fddef46d434f602d3554fe06b2218d761e79eb66c4a282aeb8c83d1d4
|
data/ext/nfc/nfc_device.c
CHANGED
@@ -42,19 +42,22 @@ static VALUE select_passive_target(VALUE self, VALUE tag)
|
|
42
42
|
*
|
43
43
|
* Poll the +tag+ type from the device
|
44
44
|
*/
|
45
|
-
static VALUE poll_target(VALUE self, VALUE tag, VALUE ms)
|
45
|
+
static VALUE poll_target(VALUE self, VALUE tag, VALUE poll_nr, VALUE ms)
|
46
46
|
{
|
47
47
|
nfc_device * dev;
|
48
48
|
nfc_modulation * mod;
|
49
49
|
nfc_target * ti;
|
50
50
|
int code;
|
51
|
-
|
51
|
+
int ms_c, poll_nr_c;
|
52
52
|
Data_Get_Struct(self, nfc_device, dev);
|
53
53
|
Data_Get_Struct(tag, nfc_modulation, mod);
|
54
54
|
|
55
|
+
ms_c = FIX2INT(ms);
|
56
|
+
poll_nr_c = FIX2INT(poll_nr);
|
57
|
+
|
55
58
|
ti = (nfc_target *)xmalloc(sizeof(nfc_target));
|
56
59
|
|
57
|
-
code = nfc_initiator_poll_target(dev, mod, 1,
|
60
|
+
code = nfc_initiator_poll_target(dev, mod, 1, poll_nr_c, ms_c, ti);
|
58
61
|
|
59
62
|
if (code > 0) {
|
60
63
|
switch(mod->nmt) {
|
@@ -160,7 +163,7 @@ void init_device()
|
|
160
163
|
cNfcDevice = rb_define_class_under(mNfc, "Device", rb_cObject);
|
161
164
|
rb_define_method(cNfcDevice, "initiator_init", initiator_init, 0);
|
162
165
|
rb_define_method(cNfcDevice, "select_passive_target", select_passive_target, 1);
|
163
|
-
rb_define_method(cNfcDevice, "poll_target", poll_target,
|
166
|
+
rb_define_method(cNfcDevice, "poll_target", poll_target, 3);
|
164
167
|
rb_define_method(cNfcDevice, "name", name, 0);
|
165
168
|
rb_define_method(cNfcDevice, "deselect", dev_deselect, 0);
|
166
169
|
|
data/lib/nfc.rb
CHANGED
data/lib/nfc/device.rb
CHANGED
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nfc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Patterson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '5.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '5.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rdoc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '4.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '4.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: hoe
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.6'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.6'
|
55
55
|
description: |-
|
@@ -67,7 +67,7 @@ extra_rdoc_files:
|
|
67
67
|
- Manifest.txt
|
68
68
|
- README.rdoc
|
69
69
|
files:
|
70
|
-
- .autotest
|
70
|
+
- ".autotest"
|
71
71
|
- CHANGELOG.rdoc
|
72
72
|
- Manifest.txt
|
73
73
|
- README.rdoc
|
@@ -86,24 +86,24 @@ files:
|
|
86
86
|
- lib/nfc/iso14443a.rb
|
87
87
|
- test/test_context.rb
|
88
88
|
- test/test_device.rb
|
89
|
-
- .gemtest
|
89
|
+
- ".gemtest"
|
90
90
|
homepage: http://seattlerb.rubyforge.org
|
91
91
|
licenses: []
|
92
92
|
metadata: {}
|
93
93
|
post_install_message:
|
94
94
|
rdoc_options:
|
95
|
-
- --main
|
95
|
+
- "--main"
|
96
96
|
- README.rdoc
|
97
97
|
require_paths:
|
98
98
|
- lib
|
99
99
|
required_ruby_version: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
|
-
- -
|
106
|
+
- - ">="
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '0'
|
109
109
|
requirements: []
|