Class: LinkDemo::GPIO
- Inherits:
-
Object
- Object
- LinkDemo::GPIO
- Includes:
- Origen::Model
- Defined in:
- lib/link_demo/gpio.rb
Instance Method Summary (collapse)
-
- (GPIO) initialize(options = {})
constructor
A new instance of GPIO.
- - (Object) instantiate_registers(options = {})
Constructor Details
- (GPIO) initialize(options = {})
Returns a new instance of GPIO
5 6 7 |
# File 'lib/link_demo/gpio.rb', line 5 def initialize( = {}) instantiate_registers() end |
Instance Method Details
- (Object) instantiate_registers(options = {})
9 10 11 12 13 14 15 16 |
# File 'lib/link_demo/gpio.rb', line 9 def instantiate_registers( = {}) # Data output register add_reg :pdor, 0 # Data input register add_reg :pdir, 0x10 # Data direction register add_reg :pddr, 0x14 end |