i2c 0.2.0 → 0.2.1
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.
- data/README.rdoc +3 -0
- data/lib/i2c/drivers/mcp23008.rb +4 -4
- data/lib/i2c/drivers/mcp23017.rb +4 -4
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -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.
|
data/lib/i2c/drivers/mcp23008.rb
CHANGED
@@ -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
|
data/lib/i2c/drivers/mcp23017.rb
CHANGED
@@ -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
|