Pigpiox v0.1.2 Pigpiox.Waveform View Source
Build and send waveforms with pigpiod.
Link to this section Summary
Types
A pulse used in constructing a waveform. Specifies the GPIO that should be turned on, the GPIO that should be turned off, and the delay before the next pulse
Functions
Adds a list of pulses to the current waveform
Returns whether or not a waveform is currently being transmitted
Clears all waveforms and any data added
Creates a waveform based on previous calls to add_...
Returns the id of the currently transmitted waveform
Deletes a previously added waveform
Returns the length in DMA control blocks of the current waveform
Returns the maximum possible size of a waveform in DMA control blocks
Returns the maximum possible size of a waveform in microseconds
Returns the maximum possible size of a waveform in pulses
Returns the length in microseconds of the current waveform
Returns the length in pulses of the current waveform
Starts a repeating waveform, by its id
Sends a waveform once, by its id
Stops a waveform that is currently being transmitted
Link to this section Types
pulse() :: %Pigpiox.Waveform.Pulse{delay: term, gpio_off: term, gpio_on: term}
A pulse used in constructing a waveform. Specifies the GPIO that should be turned on, the GPIO that should be turned off, and the delay before the next pulse.
At least one field is required to be set.
Link to this section Functions
add_generic(pulses :: [pulse]) :: {:ok, non_neg_integer} | {:error, atom}
Adds a list of pulses to the current waveform
Returns the new total number of pulses in the waveform or an error.
Returns whether or not a waveform is currently being transmitted.
Clears all waveforms and any data added.
Creates a waveform based on previous calls to add_...
Returns the id of the newly created waveform or an error
Returns the id of the currently transmitted waveform.
Deletes a previously added waveform.
Returns the length in DMA control blocks of the current waveform.
get_max_cbs() :: {:ok, non_neg_integer} | {:error, atom}
Returns the maximum possible size of a waveform in DMA control blocks.
get_max_micros() :: {:ok, non_neg_integer} | {:error, atom}
Returns the maximum possible size of a waveform in microseconds.
get_max_pulses() :: {:ok, non_neg_integer} | {:error, atom}
Returns the maximum possible size of a waveform in pulses.
get_micros() :: {:ok, non_neg_integer} | {:error, atom}
Returns the length in microseconds of the current waveform.
get_pulses() :: {:ok, non_neg_integer} | {:error, atom}
Returns the length in pulses of the current waveform.
repeat(non_neg_integer) ::
{:ok, non_neg_integer} |
{:error, atom}
Starts a repeating waveform, by its id.
Returns the number of DMA control blocks used in the waveform.
send(non_neg_integer) :: {:ok, non_neg_integer} | {:error, atom}
Sends a waveform once, by its id.
Returns the number of DMA control blocks used in the waveform.
Stops a waveform that is currently being transmitted.