Class: Pigpio::UserGPIO
- Inherits:
-
GPIO
- Object
- GPIO
- Pigpio::UserGPIO
show all
- Defined in:
- lib/pigpio/user_gpio.rb
Instance Attribute Summary
Attributes inherited from GPIO
#gpio, #pi
Instance Method Summary
collapse
Methods inherited from GPIO
#hardware_PWM, #hardware_clock, #initialize, #mode, #mode=, #pud=, #read, #write
Constructor Details
This class inherits a constructor from Pigpio::GPIO
Instance Method Details
#callback(edge, &blk) ⇒ Object
16
17
18
19
|
# File 'lib/pigpio/user_gpio.rb', line 16
def callback(edge, &blk)
return nil unless blk
IF.callback(@pi, @gpio, edge, &blk)
end
|
#glitch_filter(steady) ⇒ Object
8
9
10
|
# File 'lib/pigpio/user_gpio.rb', line 8
def glitch_filter(steady)
ret = IF.set_glitch_filter(@pi, @gpio, steady)
end
|
#noise_filter(steady, active) ⇒ Object
12
13
14
|
# File 'lib/pigpio/user_gpio.rb', line 12
def noise_filter(steady, active)
ret = IF.set_noise_filter(@pi, @gpio, steady, active)
end
|
#pwm ⇒ Object
29
30
31
|
# File 'lib/pigpio/user_gpio.rb', line 29
def pwm
PWM.new(@pi, @gpio)
end
|
#trigger(pulseLen, level) ⇒ Object
25
26
27
|
# File 'lib/pigpio/user_gpio.rb', line 25
def trigger(pulseLen, level)
ret = IF.gpio_trigger(@pi, @gpio, pulseLen, level)
end
|
#wait_for_edge(edge, timeout) ⇒ Object
21
22
23
|
# File 'lib/pigpio/user_gpio.rb', line 21
def wait_for_edge(edge, timeout)
ret = IF.wait_for_edge(@pi, @gpio, edge, timeout)
end
|
#watchdog(timeout) ⇒ Object
4
5
6
|
# File 'lib/pigpio/user_gpio.rb', line 4
def watchdog(timeout)
ret = IF.set_watchdog(@pi, @gpio, timeout)
end
|