Class: BeagleBoard::Base::Gpio
- Inherits:
-
Object
- Object
- BeagleBoard::Base::Gpio
show all
- Defined in:
- lib/beagleboard/base/gpio.rb
Instance Method Summary
collapse
Constructor Details
#initialize(bank, gpio) ⇒ Gpio
Returns a new instance of Gpio.
4
5
6
7
8
|
# File 'lib/beagleboard/base/gpio.rb', line 4
def initialize(bank, gpio)
@bank = bank
@gpio = gpio
open
end
|
Instance Method Details
#close ⇒ Object
12
|
# File 'lib/beagleboard/base/gpio.rb', line 12
def close; end
|
#direction ⇒ Object
14
15
16
|
# File 'lib/beagleboard/base/gpio.rb', line 14
def direction
raise StandardError, 'Not supported'
end
|
#direction=(value) ⇒ Object
18
19
20
21
22
|
# File 'lib/beagleboard/base/gpio.rb', line 18
def direction=(value)
raise StandardError, 'Invalid direction' unless %i[in out low high].include?(value)
value.to_s
end
|
#open ⇒ Object
10
|
# File 'lib/beagleboard/base/gpio.rb', line 10
def open; end
|
#value ⇒ Object
24
25
26
|
# File 'lib/beagleboard/base/gpio.rb', line 24
def value
raise StandardError, 'Not supported'
end
|
#value=(_value) ⇒ Object
28
29
30
|
# File 'lib/beagleboard/base/gpio.rb', line 28
def value=(_value)
raise StandardError, 'Not supported'
end
|