i2c 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -57,6 +57,9 @@ Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/21919e.pdf
57
57
  The low-level IO (mainly in i2c-dev.rb) was extracted from Ruby-I2C
58
58
  (http://rubyforge.org/projects/i2c/) by Jonas Bähr <jonas.baehr@fs.ei.tum.de>
59
59
 
60
+ Bugfixes by
61
+ - Pierre Paques
62
+
60
63
  == Copyright / Licence
61
64
 
62
65
  This code may be used under the terms of the GNU General Public Licence, Version 2.
@@ -13,12 +13,12 @@
13
13
  require 'i2c/i2c.rb'
14
14
 
15
15
  # Constants for mode()
16
- INPUT = 1
17
- OUTPUT = 0
16
+ INPUT = 1 unless defined?(INPUT)
17
+ OUTPUT = 0 unless defined?(OUTPUT)
18
18
 
19
19
  # Constants for write()
20
- HIGH = 1
21
- LOW = 0
20
+ HIGH = 1 unless defined?(HIGH)
21
+ LOW = 0 unless defined?(LOW)
22
22
 
23
23
  module I2C
24
24
  module Drivers
@@ -13,12 +13,12 @@
13
13
  require 'i2c/i2c.rb'
14
14
 
15
15
  # Constants for mode()
16
- INPUT = 1
17
- OUTPUT = 0
16
+ INPUT = 1 unless defined?(INPUT)
17
+ OUTPUT = 0 unless defined?(OUTPUT)
18
18
 
19
19
  # Constants for write()
20
- HIGH = 1
21
- LOW = 0
20
+ HIGH = 1 unless defined?(HIGH)
21
+ LOW = 0 unless defined?(LOW)
22
22
 
23
23
  module I2C
24
24
  module Drivers
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i2c
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: