Class: LinkDemo::PortController
- Inherits:
-
Object
- Object
- LinkDemo::PortController
- Defined in:
- lib/link_demo/port_controller.rb
Instance Method Summary (collapse)
-
- (Object) enable_gpio(*pin_indexes)
Enable the GPIO function on the given pin indexes.
Instance Method Details
- (Object) enable_gpio(*pin_indexes)
Enable the GPIO function on the given pin indexes
7 8 9 10 11 |
# File 'lib/link_demo/port_controller.rb', line 7 def enable_gpio(*pin_indexes) pin_indexes.each do |i| send("pcr#{i}").mux.write!(0b001) end end |