module I2C

I2C - Linux i2c-dev backend.

Copyright © 2012 Christoph Anderegg <christoph@christoph-anderegg.ch> Copyright © 2008 Jonas Bähr, jonas.baehr@fs.ei.tum.de This file may be distributed under the terms of the GNU General Public License Version 2.

Public Class Methods

create(bus_descriptor) click to toggle source

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").
# File lib/i2c/i2c.rb, line 29
def self.create(bus_descriptor)
  I2C::Dev.create(bus_descriptor)
end