Module: I2CDevice::Driver

Included in:
Base
Defined in:
lib/i2c/driver.rb

Defined Under Namespace

Classes: Base, GPIO, I2CDev

Instance Method Summary collapse

Instance Method Details

#i2cget(address, param, length = 1) ⇒ Object

Low-level method for i2cget Driver must implement this.

address
Integer

7-bit slave address without r/w bit. MSB is always 0.

data
Array

Writing bytes array.

Returns
String

Wrote bytes

Raises:

  • (NotImplementedError)

16
17
18
# File 'lib/i2c/driver.rb', line 16

def i2cget(address, param, length=1)
	raise NotImplementedError
end

#i2cset(address, *data) ⇒ Object

Low-level method for i2cset Driver must implement this.

address
Integer

7-bit slave address without r/w bit. MSB is always 0.

data
Array

Writing bytes array.

Returns
String

Wrote bytes

Raises:

  • (NotImplementedError)

25
26
27
# File 'lib/i2c/driver.rb', line 25

def i2cset(address, *data)
	raise NotImplementedError
end