Module: I2C
- Defined in:
- lib/i2c/backends/i2c-dev.rb,
lib/i2c/i2c.rb,
lib/i2c/drivers/mcp230xx.rb
Overview
I2C - Linux i2c-dev backend.
Copyright © 2012 Christoph Anderegg <[email protected]> Copyright © 2008 Jonas Bähr, [email protected] This file may be distributed under the terms of the GNU General Public License Version 2.
Defined Under Namespace
Modules: Drivers Classes: AckError, Dev
Class Method Summary collapse
-
.create(bus_descriptor) ⇒ Object
Returns an instance of the current backend driver.
Class Method Details
.create(bus_descriptor) ⇒ Object
Returns an instance of the current backend driver.
Is there a system agnostic way to do this?
bus_descriptor
describes the bus to use. This is
of course system specific. For the
Linux i2c-dev driver this is the
device file (e.g. /dev/i2c-0").
30 31 32 |
# File 'lib/i2c/i2c.rb', line 30 def self.create(bus_descriptor) I2C::Dev.create(bus_descriptor) end |