Class: Pigpio::Wave
- Inherits:
-
Object
- Object
- Pigpio::Wave
- Defined in:
- lib/pigpio/wave.rb
Instance Method Summary collapse
- #add_generic(pulses) ⇒ Object
- #add_new ⇒ Object
- #add_serial(user_gpio, baud, data_bits, stop_bits, offset, str) ⇒ Object
- #cbs ⇒ Object
- #chain(buf) ⇒ Object
- #clear ⇒ Object
- #create ⇒ Object
- #delete(id) ⇒ Object
- #high_cbs ⇒ Object
- #high_micros ⇒ Object
- #high_pulses ⇒ Object
-
#initialize(pi) ⇒ Wave
constructor
A new instance of Wave.
- #max_cbs ⇒ Object
- #max_micros ⇒ Object
- #max_pulses ⇒ Object
- #micros ⇒ Object
- #pulse(on, off, us) ⇒ Object
- #pulses ⇒ Object
- #send_once(id) ⇒ Object
- #send_repeat(id) ⇒ Object
- #send_using_mode(id, mode) ⇒ Object
- #tx_at ⇒ Object
- #tx_busy ⇒ Object
- #tx_stop ⇒ Object
Constructor Details
#initialize(pi) ⇒ Wave
Returns a new instance of Wave.
3 4 5 6 |
# File 'lib/pigpio/wave.rb', line 3 def initialize(pi) @pi = pi IF.wave_clear(pi) end |
Instance Method Details
#add_generic(pulses) ⇒ Object
16 17 18 |
# File 'lib/pigpio/wave.rb', line 16 def add_generic(pulses) IF.wave_add_generic(@pi, pulses) end |
#add_new ⇒ Object
12 13 14 |
# File 'lib/pigpio/wave.rb', line 12 def add_new IF.wave_add_new(@pi) end |
#add_serial(user_gpio, baud, data_bits, stop_bits, offset, str) ⇒ Object
20 21 22 |
# File 'lib/pigpio/wave.rb', line 20 def add_serial(user_gpio, baud, data_bits, stop_bits, offset, str) IF.wave_add_serial(@pi, user_gpio, baud, data_bits, stop_bits, offset, str) end |
#cbs ⇒ Object
84 85 86 |
# File 'lib/pigpio/wave.rb', line 84 def cbs IF.wave_get_cbs(@pi) end |
#chain(buf) ⇒ Object
44 45 46 |
# File 'lib/pigpio/wave.rb', line 44 def chain(buf) IF.wave_chain(@pi, buf) end |
#clear ⇒ Object
8 9 10 |
# File 'lib/pigpio/wave.rb', line 8 def clear IF.wave_clear(@pi) end |
#create ⇒ Object
24 25 26 |
# File 'lib/pigpio/wave.rb', line 24 def create IF.wave_create(@pi) end |
#delete(id) ⇒ Object
28 29 30 |
# File 'lib/pigpio/wave.rb', line 28 def delete(id) IF.wave_delete(@pi, id) end |
#high_cbs ⇒ Object
88 89 90 |
# File 'lib/pigpio/wave.rb', line 88 def high_cbs IF.wave_get_high_cbs(@pi) end |
#high_micros ⇒ Object
64 65 66 |
# File 'lib/pigpio/wave.rb', line 64 def high_micros IF.wave_get_high_micros(@pi) end |
#high_pulses ⇒ Object
76 77 78 |
# File 'lib/pigpio/wave.rb', line 76 def high_pulses IF.wave_get_high_pulses(@pi) end |
#max_cbs ⇒ Object
92 93 94 |
# File 'lib/pigpio/wave.rb', line 92 def max_cbs IF.wave_get_max_cbs(@pi) end |
#max_micros ⇒ Object
68 69 70 |
# File 'lib/pigpio/wave.rb', line 68 def max_micros IF.wave_get_max_micros(@pi) end |
#max_pulses ⇒ Object
80 81 82 |
# File 'lib/pigpio/wave.rb', line 80 def max_pulses IF.wave_get_max_pulses(@pi) end |
#micros ⇒ Object
60 61 62 |
# File 'lib/pigpio/wave.rb', line 60 def micros IF.wave_get_micros(@pi) end |
#pulse(on, off, us) ⇒ Object
96 97 98 |
# File 'lib/pigpio/wave.rb', line 96 def pulse(on, off, us) Pulse.make(on, off, us) end |
#pulses ⇒ Object
72 73 74 |
# File 'lib/pigpio/wave.rb', line 72 def pulses IF.wave_get_pulses(@pi) end |
#send_once(id) ⇒ Object
32 33 34 |
# File 'lib/pigpio/wave.rb', line 32 def send_once(id) IF.wave_send_once(@pi, id) end |
#send_repeat(id) ⇒ Object
36 37 38 |
# File 'lib/pigpio/wave.rb', line 36 def send_repeat(id) IF.wave_send_repeat(@pi, id) end |
#send_using_mode(id, mode) ⇒ Object
40 41 42 |
# File 'lib/pigpio/wave.rb', line 40 def send_using_mode(id, mode) IF.wave_send_using_mode(@pi, id, mode) end |
#tx_at ⇒ Object
48 49 50 |
# File 'lib/pigpio/wave.rb', line 48 def tx_at IF.wave_tx_at(@pi) end |
#tx_busy ⇒ Object
52 53 54 |
# File 'lib/pigpio/wave.rb', line 52 def tx_busy IF.wave_tx_busy(@pi) end |
#tx_stop ⇒ Object
56 57 58 |
# File 'lib/pigpio/wave.rb', line 56 def tx_stop IF.wave_tx_stop(@pi) end |