ffi-wiring_pi 0.1.2 → 0.1.3

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: 7e427a97370a8efc0f74fc3357a7ffbf7b31c1b939dfeb2b894e5d34e39beeeb
4
- data.tar.gz: 7361ef25f73d1ac71ac3892d814e4f96378ceba7beac2912b47fcac8a2b53a9d
3
+ metadata.gz: 3177028155f02efc4862cdd21654d40038a99328b980c1db2526bcd9bc345417
4
+ data.tar.gz: 4ad1151ecb272fb7257ed22baba25ab1a123c5026b46ff2f487258fa5988c248
5
5
  SHA512:
6
- metadata.gz: 1706f46d44fa8ba788b6ece5f274d5a032225502419aa165d02b822bbfd00689a01c79759e48c768cacc9d16da733ff755c3a92addece94aae5e2271e9636ea1
7
- data.tar.gz: e3fce2573bd573788a62e006d247d96a938e42fb090f9ddc52d87be16847a7244369b5d2bdf96a9be6801348831fc2bf2a0fa8d67d70f6ff37ed45687fe002d7
6
+ metadata.gz: 8b91fc3678dfbccf53d7c677bee8504aa01420b20fea63ef866a485d8a7d6b1120fd111e13ce6026b437f1aaf4d9a7b2a7c6acb098492c4931291e994fd6c0b2
7
+ data.tar.gz: '093225dc399d328a0186e1257980f8bd89e49d94272b4db918d824414cc98ecbbaa968fc0c81f07cd90fd6f235263c9347e6c7cf4eb8f9353de77dab7cd4d383'
data/gemspec.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  name: ffi-wiring_pi
2
- version: 0.1.2
2
+ version: 0.1.3
3
3
  summary: FFI bindings for wiringPi
4
4
  description: Ruby FFI bindings for the wiringPi library.
5
5
  license: MIT
@@ -49,7 +49,7 @@ module FFI::WiringPi::GPIO
49
49
  # `FFI::WiringPi::GPIO::PWM_OUTPUT` or `FFI::WiringPi::GPIO::GPIO_CLOCK`
50
50
  attach_function :set_pin_mode, :pinMode, [:int, :int], :void
51
51
 
52
- def get(pin, mode = FFI::WiringPi::GPIO::OUTPUT)
52
+ def self.get(pin, mode = FFI::WiringPi::GPIO::OUTPUT)
53
53
  set_pin_mode(pin, mode)
54
54
  Pin.new(pin, mode)
55
55
  end
@@ -63,7 +63,7 @@ module FFI::WiringPi::GPIO
63
63
  # @param pin [Integer] pin position (depends on setup mode)
64
64
  # @param state [Boolean] `true` to set to HIGH, `false` to set to LOW
65
65
  #
66
- def write(pin, state)
66
+ def self.write(pin, state)
67
67
  digital_write(state ? HIGH : LOW)
68
68
  end
69
69
 
@@ -71,7 +71,7 @@ module FFI::WiringPi::GPIO
71
71
  #
72
72
  # @param pin [Integer] pin position (depends on setup mode)
73
73
  #
74
- def up(pin)
74
+ def self.up(pin)
75
75
  write(pin, true)
76
76
  end
77
77
 
@@ -79,7 +79,7 @@ module FFI::WiringPi::GPIO
79
79
  #
80
80
  # @param pin [Integer] pin position (depends on setup mode)
81
81
  #
82
- def down(pin)
82
+ def self.down(pin)
83
83
  write(pin, false)
84
84
  end
85
85
 
@@ -93,7 +93,7 @@ module FFI::WiringPi::GPIO
93
93
  # @param pin [Integer] pin position (depends on setup mode)
94
94
  # @returns [Boolean] `true` if pin is in high state, `false` if in low
95
95
  #
96
- def read(pin)
96
+ def self.read(pin)
97
97
  result = digital_read(pin)
98
98
  case result
99
99
  when LOW
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi-wiring_pi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Huk