Class: UChip::MCP2221::Pin
- Inherits:
-
Struct
- Object
- Struct
- UChip::MCP2221::Pin
- Defined in:
- lib/uchip/mcp2221.rb
Instance Attribute Summary collapse
-
#chip ⇒ Object
Returns the value of attribute chip.
-
#number ⇒ Object
Returns the value of attribute number.
Instance Method Summary collapse
Instance Attribute Details
#chip ⇒ Object
Returns the value of attribute chip
266 267 268 |
# File 'lib/uchip/mcp2221.rb', line 266 def chip @chip end |
#number ⇒ Object
Returns the value of attribute number
266 267 268 |
# File 'lib/uchip/mcp2221.rb', line 266 def number @number end |
Instance Method Details
#output! ⇒ Object
267 268 269 |
# File 'lib/uchip/mcp2221.rb', line 267 def output! chip.configure_gpio number, :output end |
#value ⇒ Object
271 272 273 |
# File 'lib/uchip/mcp2221.rb', line 271 def value chip.gpio_value number end |
#value=(v) ⇒ Object
275 276 277 |
# File 'lib/uchip/mcp2221.rb', line 275 def value= v chip.set_gpio_value number, v end |