Class: WiringPi::Modules::Mcp23s17

Inherits:
ModuleBase show all
Defined in:
lib/wiringpi/mcp23x17.rb

Instance Attribute Summary

Attributes inherited from ModuleBase

#name, #pin_base, #pin_count, #pin_end

Instance Method Summary collapse

Methods inherited from ModuleBase

#new, #updateName

Constructor Details

#initialize(pin_base, spi_port, device_id) ⇒ Mcp23s17

Returns a new instance of Mcp23s17.



20
21
22
23
24
25
26
27
# File 'lib/wiringpi/mcp23x17.rb', line 20

def initialize(pin_base, spi_port, device_id)
  @pin_base = pin_base
  @pin_count = 16
  @spi_port = spi_port
  @device_id = device_id
  Wiringpi.mcp23s17Setup( pin_base, spi_port, device_id )
  super()
end