ffi-wiring_pi 0.5.0 → 0.6.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1342e5c0c449c226bdc35c261b4b90da174dc8669d96d847da33dc33a01197d8
4
- data.tar.gz: 2ebdebfb6a78f120235b62499d3d86cc7d47d0f3a55f372944caf4aa9fe6db55
3
+ metadata.gz: cfc06f77f0f9c38a6dd0692599b4a0a72b47f01accf7f3f080fe6ec5ee8f0498
4
+ data.tar.gz: 661cfb946113dd01e03352c66f138f12f34d758ae40be008cddb092ab79c08c4
5
5
  SHA512:
6
- metadata.gz: f1606444c571faecf425a414bc770b16cb2a1c38b8a8eb1ed974b56612678af77077119aec657b16c5c9ec0794217ad5c2564da047be806cdffd8e0f45cd4b6f
7
- data.tar.gz: fc9c9ed9f28380036f1a09403b41065e1e30c4e753d089262ab41ca034529613f110389686e1b6f86bd0b6549d1905c3b2127652fcffc4372ec1df09f5d48c23
6
+ metadata.gz: bdd3ca54623e2b81fcd0e93adb9a03f627727ecde1c13c82ef19ca516df5f3cd464ebff20698c7ed272b5a989449bb22d2c429e670593374264fa55447f0c423
7
+ data.tar.gz: 1a71dc8d5529b32069d33cbf6d003c477a857aa8bfcab2cabb411102533935be9baf8749c8e9c224c3d1d7f4e276fca6aa53b3ffef113062f49518e0c4f8ebe6
@@ -1,3 +1,5 @@
1
+ # 0.6.0 Added analog_read/analog_write
2
+ # 0.5.0 Added Pcf8591 mudule (ADC/DAC)
1
3
  # 0.4.0 Added Software Tone PWM functions wrappers
2
4
  # 0.3.0 Added Software PWM, added instructions for libws281x, but not enabled
3
5
  # 0.2.0 Added PWM pin control functions
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ffi-wiring_pi (0.4.0)
4
+ ffi-wiring_pi (0.6.0)
5
5
  ffi (~> 1.0)
6
6
 
7
7
  GEM
@@ -9,6 +9,7 @@ GEM
9
9
  specs:
10
10
  diff-lcs (1.3)
11
11
  ffi (1.10.0)
12
+ rake (12.3.2)
12
13
  rspec (3.8.0)
13
14
  rspec-core (~> 3.8.0)
14
15
  rspec-expectations (~> 3.8.0)
@@ -30,6 +31,7 @@ PLATFORMS
30
31
  DEPENDENCIES
31
32
  bundler (~> 2.0)
32
33
  ffi-wiring_pi!
34
+ rake (~> 12.3.2)
33
35
  rspec (~> 3.8)
34
36
  yard (~> 0.9.1)
35
37
 
@@ -1,5 +1,5 @@
1
1
  name: ffi-wiring_pi
2
- version: 0.5.0
2
+ version: 0.6.0
3
3
  summary: FFI bindings for wiringPi
4
4
  description: Ruby FFI bindings for the wiringPi library.
5
5
  license: MIT
@@ -15,5 +15,6 @@ dependencies:
15
15
 
16
16
  development_dependencies:
17
17
  rspec: ~> 3.8
18
+ rake: ~> 12.3.2
18
19
  yard: ~> 0.9.1
19
20
  bundler: ~> 2.0
@@ -67,6 +67,16 @@ module FFI::WiringPi::GPIO
67
67
  digital_write(pin, state ? HIGH : LOW)
68
68
  end
69
69
 
70
+ # This returns the value read on the supplied analog input pin.
71
+ # You will need to register additional analog modules to enable this function
72
+ # for devices such as the Gertboard, quick2Wire analog board, etc.
73
+ attach_function :analog_read, :analogRead, [:int], :int
74
+
75
+ # This writes the given value to the supplied analog pin.
76
+ # You will need to register additional analog modules to enable this function
77
+ # for devices such as the Gertboard.
78
+ attach_function :analog_write, :analogWrite, [:int, :int], :void
79
+
70
80
  # Sets pin to HIGH state
71
81
  #
72
82
  # @param pin [Integer] pin position (depends on setup mode)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi-wiring_pi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Huk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-31 00:00:00.000000000 Z
11
+ date: 2019-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3.8'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 12.3.2
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 12.3.2
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: yard
43
57
  requirement: !ruby/object:Gem::Requirement