high and low levels.
<h3><a name="*param">*param</a></h3>
An array of script parameters.
+<h3><a name="pctBOOL">pctBOOL</a>: 0-100</h3>
+percent On-Off-Level (OOL) buffer to consume for wave output.
+<h3><a name="pctCB">pctCB</a>: 0-100</h3>
+the percent of all DMA control blocks to consume.
+<h3><a name="pctTOOL">pctTOOL</a>: 0-100</h3>
+the percent of OOL buffer to consume for wave input (flags).
<h3><a name="pi_i2c_msg_t">pi_i2c_msg_t</a></h3>
<code>typedef struct<br>{<br> uint16_t addr; // slave address<br> uint16_t flags;<br> uint16_t len; // msg length<br> uint8_t *buf; // pointer to msg data<br>} pi_i2c_msg_t;<br></code><h3><a name="port">port</a>: 1024-32000</h3>
The port used to bind to the pigpio socket. Defaults to 8888.
<table><tr>
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
-<td style="width: 200px"><div style="text-align: right;"><small>Updated: 29/04/2020</small></div></td>
+<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
</tr></table>
</td>
</table>
<table><tr>
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
-<td style="width: 200px"><div style="text-align: right;"><small>Updated: 29/04/2020</small></div></td>
+<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
</tr></table>
</td>
</table>
<table><tr>
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
-<td style="width: 200px"><div style="text-align: right;"><small>Updated: 29/04/2020</small></div></td>
+<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
</tr></table>
</td>
</table>
<table><tr>
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
-<td style="width: 200px"><div style="text-align: right;"><small>Updated: 29/04/2020</small></div></td>
+<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
</tr></table>
</td>
</table>
<table><tr>
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
-<td style="width: 200px"><div style="text-align: right;"><small>Updated: 29/04/2020</small></div></td>
+<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
</tr></table>
</td>
</table>
<table><tr>
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
-<td style="width: 200px"><div style="text-align: right;"><small>Updated: 29/04/2020</small></div></td>
+<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
</tr></table>
</td>
</table>
<table><tr>
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
-<td style="width: 200px"><div style="text-align: right;"><small>Updated: 29/04/2020</small></div></td>
+<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
</tr></table>
</td>
</table>
<table><tr>
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
-<td style="width: 200px"><div style="text-align: right;"><small>Updated: 29/04/2020</small></div></td>
+<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
</tr></table>
</td>
</table>
<table><tr>
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
-<td style="width: 200px"><div style="text-align: right;"><small>Updated: 29/04/2020</small></div></td>
+<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
</tr></table>
</td>
</table>
<table><tr>
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
-<td style="width: 200px"><div style="text-align: right;"><small>Updated: 29/04/2020</small></div></td>
+<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
</tr></table>
</td>
</table>
<table><tr>
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
-<td style="width: 200px"><div style="text-align: right;"><small>Updated: 29/04/2020</small></div></td>
+<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
</tr></table>
</td>
</table>
<table><tr>
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
-<td style="width: 200px"><div style="text-align: right;"><small>Updated: 29/04/2020</small></div></td>
+<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
</tr></table>
</td>
</table>
<br><br>Returns the new waveform id if OK, otherwise PI_EMPTY_WAVEFORM,
PI_NO_WAVEFORM_ID, PI_TOO_MANY_CBS, or PI_TOO_MANY_OOL.
<h3><a name="wave_create_and_pad"></a><a href="#int"><small>int</small></a> wave_create_and_pad<small>(<a href="#int">int</a> <a href="#pi">pi</a>, <a href="#int">int</a> <a href="#percent">percent</a>)</small></h3>
-This function creates a waveform like wave_create but pads the consumed
+This function creates a waveform like <a href="#wave_create">wave_create</a> but pads the consumed
resources. Where percent gives the percentage of the resources to use (in terms
of the theoretical maximum, not the current amount free). This allows the reuse<br>
-of deleted waves while a transmission is active. Upon success a wave id
-greater than or equal to 0 is returned, otherwise PI_EMPTY_WAVEFORM,
-PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID.
-<br><br><code>pi: >=0 (as returned by <a href="#pigpio_start">pigpio_start</a>).<br></code><br><br>The data provided by the <a href="#wave_add_*">wave_add_*</a> functions are consumed by this
+of deleted waves while a transmission is active.
+<br><br><code>pi: >=0 (as returned by <a href="#pigpio_start">pigpio_start</a>).<br>percent: 0-100, size of waveform as percentage of maximum available.<br></code><br><br>The data provided by the <a href="#wave_add_*">wave_add_*</a> functions are consumed by this
function.
<br><br>As many waveforms may be created as there is space available. The
wave id is passed to <a href="#wave_send_*">wave_send_*</a> to specify the waveform to transmit.
<br><br>A usage would be the creation of two waves where one is filled while the other
-is beeing transmitted. Each wave is assigned 50% of the available resources.
+is being transmitted. Each wave is assigned 50% of the resources.
This buffer structure allows the transmission of infinite wave sequences.
<br><br>Normal usage:
<br><br>Step 1. <a href="#wave_clear">wave_clear</a> to clear all waveforms and added data.
high and low levels.
<h3><a name="*param">*param</a></h3>
An array of script parameters.
+<h3><a name="percent">percent</a>: 0-100</h3>
+The size of waveform as percentage of maximum available.
<h3><a name="pi">pi</a></h3>
An integer defining a connected Pi. The value is returned by
<a href="#pigpio_start">pigpio_start</a> upon success.
<table><tr>
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
-<td style="width: 200px"><div style="text-align: right;"><small>Updated: 29/04/2020</small></div></td>
+<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
</tr></table>
</td>
</table>
<table><tr>
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
-<td style="width: 200px"><div style="text-align: right;"><small>Updated: 29/04/2020</small></div></td>
+<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
</tr></table>
</td>
</table>
<table><tr>
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
-<td style="width: 200px"><div style="text-align: right;"><small>Updated: 29/04/2020</small></div></td>
+<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
</tr></table>
</td>
</table>
<table><tr>
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
-<td style="width: 200px"><div style="text-align: right;"><small>Updated: 29/04/2020</small></div></td>
+<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
</tr></table>
</td>
</table>
<br><br>When a waveform is started each pulse is executed in order with
the specified delay between the pulse and the next.
<br><br><b><small>Example</small></b><br><br><code>$ pigs wvas 4 9600 0 23 45 67 89 90<br>37<br>$ pigs wvcre<br>0<br><br>$ pigs wvcre<br>-69<br>ERROR: attempt to create an empty waveform<br></code><h3><a name="WVCAP">WVCAP</a>
- - Create a waveform of fixed size</h3>Similar to WVCRE, this command creates a waveform but pads the consumed
+ - Create a waveform of fixed size</h3>Similar to <a href="#WVCRE">WVCRE</a>, this command creates a waveform but pads the consumed
resources to a fixed size, specified as a percent of total resource.
Padded waves of equal size can be re-cycled efficiently allowing newly
created waves to re-use the resources of deleted waves of the same dimension.
<table><tr>
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
-<td style="width: 200px"><div style="text-align: right;"><small>Updated: 29/04/2020</small></div></td>
+<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
</tr></table>
</td>
</table>
<table><tr>
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
-<td style="width: 200px"><div style="text-align: right;"><small>Updated: 29/04/2020</small></div></td>
+<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
</tr></table>
</td>
</table>
This allows the reuse of deleted waves while a transmission is active.
<br><br>Upon success a wave id greater than or equal to 0 is returned, otherwise
PI_EMPTY_WAVEFORM, PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID.
-<br><br><code>pi: >=0 (as returned by <a href="#pigpio_start">pigpio_start</a>).<br></code><br><br>The data provided by the <a href="#wave_add_*">wave_add_*</a> functions are consumed by this
+<br><br><code>percent: 0-100, size of waveform as percentage of maximum available.<br></code><br><br>The data provided by the <a href="#wave_add_*">wave_add_*</a> functions are consumed by this
function.
<br><br>As many waveforms may be created as there is space available. The
wave id is passed to <a href="#wave_send_*">wave_send_*</a> to specify the waveform to transmit.
-<br><br>A usage would be the creation of two waves where one is filled while the other
-is being transmitted. Each wave is assigned 50% of the available resources.
+<br><br>A usage would be the creation of two waves where one is filled while the
+other is being transmitted. Each wave is assigned 50% of the resources.
This buffer structure allows the transmission of infinite wave sequences.
<br><br>Normal usage:
<br><br>Step 1. <a href="#wave_clear">wave_clear</a> to clear all waveforms and added data.
<br><br>Repeat steps 2-4 as needed.
<br><br>Step 5. Any wave id can now be deleted and another wave of the same size
can be created in its place.
-<br><br><b><small>Example</small></b><br><br><code>wid = pi.wave_create(50)<br></code><h3><a name="wave_delete">wave_delete<small>(<a href="#wave_id">wave_id</a>)</small></h3>
+<br><br><b><small>Example</small></b><br><br><code>wid = pi.wave_create_and_pad(50)<br></code><h3><a name="wave_delete">wave_delete<small>(<a href="#wave_id">wave_id</a>)</small></h3>
This function deletes the waveform with id wave_id.
<br><br><b><small>Parameters</small></b><br><br><samp>wave_id:= >=0 (as returned by a prior call to <a href="#wave_create">wave_create</a>).<br></samp><br><br>Wave ids are allocated in order, 0, 1, 2, etc.
<br><br>The wave is flagged for deletion. The resources used by the wave
high and low levels.
<h3><a name="params"></a>params: 32 bit number</h3>When scripts are started they can receive up to 10 parameters
to define their operation.
+<h3><a name="percent"></a>percent: : 0-100</h3>The size of waveform as percentage of maximum available.
<h3><a name="port"></a>port: </h3>The port used by the pigpio daemon, defaults to 8888.
<h3><a name="pstring"></a>pstring: </h3>The string to be passed to a <a href="#shell">shell</a> script to be executed.
<h3><a name="pud"></a>pud: 0-2</h3><code>PUD_DOWN = 1<br>PUD_OFF = 0<br>PUD_UP = 2<br></code><h3><a name="pulse_len"></a>pulse_len: 1-100</h3>The length of the trigger pulse in microseconds.
<table><tr>
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
-<td style="width: 200px"><div style="text-align: right;"><small>Updated: 29/04/2020</small></div></td>
+<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
</tr></table>
</td>
</table>
<table><tr>
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
-<td style="width: 200px"><div style="text-align: right;"><small>Updated: 29/04/2020</small></div></td>
+<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
</tr></table>
</td>
</table>
<table><tr>
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
-<td style="width: 200px"><div style="text-align: right;"><small>Updated: 29/04/2020</small></div></td>
+<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
</tr></table>
</td>
</table>
.br
+.IP "\fBpctBOOL\fP: 0-100" 0
+percent On-Off-Level (OOL) buffer to consume for wave output.
+
+.br
+
+.br
+
+.IP "\fBpctCB\fP: 0-100" 0
+the percent of all DMA control blocks to consume.
+
+.br
+
+.br
+
+.IP "\fBpctTOOL\fP: 0-100" 0
+the percent of OOL buffer to consume for wave input (flags).
+
+.br
+
+.br
+
.IP "\fBpi_i2c_msg_t\fP" 0
.EX
.IP "\fBint wave_create_and_pad(int pi, int percent)\fP"
.IP "" 4
-This function creates a waveform like wave_create but pads the consumed
+This function creates a waveform like \fBwave_create\fP but pads the consumed
resources. Where percent gives the percentage of the resources to use (in terms
of the theoretical maximum, not the current amount free). This allows the reuse
.br
-of deleted waves while a transmission is active. Upon success a wave id
-greater than or equal to 0 is returned, otherwise PI_EMPTY_WAVEFORM,
-PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID.
+of deleted waves while a transmission is active.
.br
.EX
pi: >=0 (as returned by \fBpigpio_start\fP).
.br
+percent: 0-100, size of waveform as percentage of maximum available.
+.br
.EE
.br
A usage would be the creation of two waves where one is filled while the other
-is beeing transmitted. Each wave is assigned 50% of the available resources.
+is being transmitted. Each wave is assigned 50% of the resources.
This buffer structure allows the transmission of infinite wave sequences.
.br
.br
+.IP "\fBpercent\fP: 0-100" 0
+The size of waveform as percentage of maximum available.
+
+.br
+
+.br
+
.IP "\fBpi\fP" 0
An integer defining a connected Pi. The value is returned by
\fBpigpio_start\fP upon success.
.IP "" 4
.br
-Similar to WVCRE, this command creates a waveform but pads the consumed
+Similar to \fBWVCRE\fP, this command creates a waveform but pads the consumed
resources to a fixed size, specified as a percent of total resource.
Padded waves of equal size can be re-cycled efficiently allowing newly
created waves to re-use the resources of deleted waves of the same dimension.
WVCAP ::
-Similar to WVCRE, this command creates a waveform but pads the consumed
+Similar to [*WVCRE*], this command creates a waveform but pads the consumed
resources to a fixed size, specified as a percent of total resource.
Padded waves of equal size can be re-cycled efficiently allowing newly
created waves to re-use the resources of deleted waves of the same dimension.
high and low levels.
<h3><a name="*param">*param</a></h3>
An array of script parameters.
+<h3><a name="pctBOOL">pctBOOL</a>: 0-100</h3>
+percent On-Off-Level (OOL) buffer to consume for wave output.
+<h3><a name="pctCB">pctCB</a>: 0-100</h3>
+the percent of all DMA control blocks to consume.
+<h3><a name="pctTOOL">pctTOOL</a>: 0-100</h3>
+the percent of OOL buffer to consume for wave input (flags).
<h3><a name="pi_i2c_msg_t">pi_i2c_msg_t</a></h3>
<code>typedef struct<br>{<br> uint16_t addr; // slave address<br> uint16_t flags;<br> uint16_t len; // msg length<br> uint8_t *buf; // pointer to msg data<br>} pi_i2c_msg_t;<br></code><h3><a name="port">port</a>: 1024-32000</h3>
The port used to bind to the pigpio socket. Defaults to 8888.
<br><br>Returns the new waveform id if OK, otherwise PI_EMPTY_WAVEFORM,
PI_NO_WAVEFORM_ID, PI_TOO_MANY_CBS, or PI_TOO_MANY_OOL.
<h3><a name="wave_create_and_pad"></a><a href="#int"><small>int</small></a> wave_create_and_pad<small>(<a href="#int">int</a> <a href="#pi">pi</a>, <a href="#int">int</a> <a href="#percent">percent</a>)</small></h3>
-This function creates a waveform like wave_create but pads the consumed
+This function creates a waveform like <a href="#wave_create">wave_create</a> but pads the consumed
resources. Where percent gives the percentage of the resources to use (in terms
of the theoretical maximum, not the current amount free). This allows the reuse<br>
-of deleted waves while a transmission is active. Upon success a wave id
-greater than or equal to 0 is returned, otherwise PI_EMPTY_WAVEFORM,
-PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID.
-<br><br><code>pi: >=0 (as returned by <a href="#pigpio_start">pigpio_start</a>).<br></code><br><br>The data provided by the <a href="#wave_add_*">wave_add_*</a> functions are consumed by this
+of deleted waves while a transmission is active.
+<br><br><code>pi: >=0 (as returned by <a href="#pigpio_start">pigpio_start</a>).<br>percent: 0-100, size of waveform as percentage of maximum available.<br></code><br><br>The data provided by the <a href="#wave_add_*">wave_add_*</a> functions are consumed by this
function.
<br><br>As many waveforms may be created as there is space available. The
wave id is passed to <a href="#wave_send_*">wave_send_*</a> to specify the waveform to transmit.
<br><br>A usage would be the creation of two waves where one is filled while the other
-is beeing transmitted. Each wave is assigned 50% of the available resources.
+is being transmitted. Each wave is assigned 50% of the resources.
This buffer structure allows the transmission of infinite wave sequences.
<br><br>Normal usage:
<br><br>Step 1. <a href="#wave_clear">wave_clear</a> to clear all waveforms and added data.
high and low levels.
<h3><a name="*param">*param</a></h3>
An array of script parameters.
+<h3><a name="percent">percent</a>: 0-100</h3>
+The size of waveform as percentage of maximum available.
<h3><a name="pi">pi</a></h3>
An integer defining a connected Pi. The value is returned by
<a href="#pigpio_start">pigpio_start</a> upon success.
<br><br>When a waveform is started each pulse is executed in order with
the specified delay between the pulse and the next.
<br><br><b><small>Example</small></b><br><br><code>$ pigs wvas 4 9600 0 23 45 67 89 90<br>37<br>$ pigs wvcre<br>0<br><br>$ pigs wvcre<br>-69<br>ERROR: attempt to create an empty waveform<br></code><h3><a name="WVCAP">WVCAP</a>
- - Create a waveform of fixed size</h3>Similar to WVCRE, this command creates a waveform but pads the consumed
+ - Create a waveform of fixed size</h3>Similar to <a href="#WVCRE">WVCRE</a>, this command creates a waveform but pads the consumed
resources to a fixed size, specified as a percent of total resource.
Padded waves of equal size can be re-cycled efficiently allowing newly
created waves to re-use the resources of deleted waves of the same dimension.
This allows the reuse of deleted waves while a transmission is active.
<br><br>Upon success a wave id greater than or equal to 0 is returned, otherwise
PI_EMPTY_WAVEFORM, PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID.
-<br><br><code>pi: >=0 (as returned by <a href="#pigpio_start">pigpio_start</a>).<br></code><br><br>The data provided by the <a href="#wave_add_*">wave_add_*</a> functions are consumed by this
+<br><br><code>percent: 0-100, size of waveform as percentage of maximum available.<br></code><br><br>The data provided by the <a href="#wave_add_*">wave_add_*</a> functions are consumed by this
function.
<br><br>As many waveforms may be created as there is space available. The
wave id is passed to <a href="#wave_send_*">wave_send_*</a> to specify the waveform to transmit.
-<br><br>A usage would be the creation of two waves where one is filled while the other
-is being transmitted. Each wave is assigned 50% of the available resources.
+<br><br>A usage would be the creation of two waves where one is filled while the
+other is being transmitted. Each wave is assigned 50% of the resources.
This buffer structure allows the transmission of infinite wave sequences.
<br><br>Normal usage:
<br><br>Step 1. <a href="#wave_clear">wave_clear</a> to clear all waveforms and added data.
<br><br>Repeat steps 2-4 as needed.
<br><br>Step 5. Any wave id can now be deleted and another wave of the same size
can be created in its place.
-<br><br><b><small>Example</small></b><br><br><code>wid = pi.wave_create(50)<br></code><h3><a name="wave_delete">wave_delete<small>(<a href="#wave_id">wave_id</a>)</small></h3>
+<br><br><b><small>Example</small></b><br><br><code>wid = pi.wave_create_and_pad(50)<br></code><h3><a name="wave_delete">wave_delete<small>(<a href="#wave_id">wave_id</a>)</small></h3>
This function deletes the waveform with id wave_id.
<br><br><b><small>Parameters</small></b><br><br><samp>wave_id:= >=0 (as returned by a prior call to <a href="#wave_create">wave_create</a>).<br></samp><br><br>Wave ids are allocated in order, 0, 1, 2, etc.
<br><br>The wave is flagged for deletion. The resources used by the wave
high and low levels.
<h3><a name="params"></a>params: 32 bit number</h3>When scripts are started they can receive up to 10 parameters
to define their operation.
+<h3><a name="percent"></a>percent: : 0-100</h3>The size of waveform as percentage of maximum available.
<h3><a name="port"></a>port: </h3>The port used by the pigpio daemon, defaults to 8888.
<h3><a name="pstring"></a>pstring: </h3>The string to be passed to a <a href="#shell">shell</a> script to be executed.
<h3><a name="pud"></a>pud: 0-2</h3><code>PUD_DOWN = 1<br>PUD_OFF = 0<br>PUD_UP = 2<br></code><h3><a name="pulse_len"></a>pulse_len: 1-100</h3>The length of the trigger pulse in microseconds.
| PI_EMPTY_WAVEFORM, PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID.
|
| . .
- | pi: >=0 (as returned by [*pigpio_start*]).
+ | percent: 0-100, size of waveform as percentage of maximum available.
| . .
|
| The data provided by the [*wave_add_**] functions are consumed by this
| As many waveforms may be created as there is space available. The
| wave id is passed to [*wave_send_**] to specify the waveform to transmit.
|
- | A usage would be the creation of two waves where one is filled while the other
- | is being transmitted. Each wave is assigned 50% of the available resources.
+ | A usage would be the creation of two waves where one is filled while the
+ | other is being transmitted. Each wave is assigned 50% of the resources.
| This buffer structure allows the transmission of infinite wave sequences.
|
| Normal usage:
| can be created in its place.
|
| ...
- | wid = pi.wave_create(50)
+ | wid = pi.wave_create_and_pad(50)
| ...
|
| wave_delete(self, wave_id)
When scripts are started they can receive up to 10 parameters
to define their operation.
+ percent:: 0-100
+ The size of waveform as percentage of maximum available.
+
port:
The port used by the pigpio daemon, defaults to 8888.
.br
+.IP "\fBpctBOOL\fP: 0-100" 0
+percent On-Off-Level (OOL) buffer to consume for wave output.
+
+.br
+
+.br
+
+.IP "\fBpctCB\fP: 0-100" 0
+the percent of all DMA control blocks to consume.
+
+.br
+
+.br
+
+.IP "\fBpctTOOL\fP: 0-100" 0
+the percent of OOL buffer to consume for wave input (flags).
+
+.br
+
+.br
+
.IP "\fBpi_i2c_msg_t\fP" 0
.EX
*param::
An array of script parameters.
+pctBOOL:: 0-100
+percent On-Off-Level (OOL) buffer to consume for wave output.
+
+pctCB:: 0-100
+the percent of all DMA control blocks to consume.
+
+pctTOOL:: 0-100
+the percent of OOL buffer to consume for wave input (flags).
+
pi_i2c_msg_t::
. .
typedef struct
resources. Where percent gives the percentage of the resources to use
(in terms of the theoretical maximum, not the current amount free).
This allows the reuse of deleted waves while a transmission is active.
-
+
Upon success a wave id greater than or equal to 0 is returned, otherwise
PI_EMPTY_WAVEFORM, PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID.
. .
- pi: >=0 (as returned by [*pigpio_start*]).
+ percent: 0-100, size of waveform as percentage of maximum available.
. .
The data provided by the [*wave_add_**] functions are consumed by this
As many waveforms may be created as there is space available. The
wave id is passed to [*wave_send_**] to specify the waveform to transmit.
- A usage would be the creation of two waves where one is filled while the other
- is being transmitted. Each wave is assigned 50% of the available resources.
+ A usage would be the creation of two waves where one is filled while the
+ other is being transmitted. Each wave is assigned 50% of the resources.
This buffer structure allows the transmission of infinite wave sequences.
-
+
Normal usage:
Step 1. [*wave_clear*] to clear all waveforms and added data.
Step 4. [*wave_send_**] with the id of the waveform to transmit.
Repeat steps 2-4 as needed.
-
+
Step 5. Any wave id can now be deleted and another wave of the same size
can be created in its place.
-
+
...
- wid = pi.wave_create(50)
+ wid = pi.wave_create_and_pad(50)
...
"""
return _u2i(_pigpio_command(self.sl, _PI_CMD_WVCAP, percent, 0))
When scripts are started they can receive up to 10 parameters
to define their operation.
+ percent:: 0-100
+ The size of waveform as percentage of maximum available.
+
port:
The port used by the pigpio daemon, defaults to 8888.
.IP "\fBint wave_create_and_pad(int pi, int percent)\fP"
.IP "" 4
-This function creates a waveform like wave_create but pads the consumed
+This function creates a waveform like \fBwave_create\fP but pads the consumed
resources. Where percent gives the percentage of the resources to use (in terms
of the theoretical maximum, not the current amount free). This allows the reuse
.br
-of deleted waves while a transmission is active. Upon success a wave id
-greater than or equal to 0 is returned, otherwise PI_EMPTY_WAVEFORM,
-PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID.
+of deleted waves while a transmission is active.
.br
.EX
pi: >=0 (as returned by \fBpigpio_start\fP).
.br
+percent: 0-100, size of waveform as percentage of maximum available.
+.br
.EE
.br
A usage would be the creation of two waves where one is filled while the other
-is beeing transmitted. Each wave is assigned 50% of the available resources.
+is being transmitted. Each wave is assigned 50% of the resources.
This buffer structure allows the transmission of infinite wave sequences.
.br
.br
+.IP "\fBpercent\fP: 0-100" 0
+The size of waveform as percentage of maximum available.
+
+.br
+
+.br
+
.IP "\fBpi\fP" 0
An integer defining a connected Pi. The value is returned by
\fBpigpio_start\fP upon success.
/*F*/
int wave_create_and_pad(int pi, int percent);
/*D
-This function creates a waveform like wave_create but pads the consumed
+This function creates a waveform like [*wave_create*] but pads the consumed
resources. Where percent gives the percentage of the resources to use (in terms
of the theoretical maximum, not the current amount free). This allows the reuse
-of deleted waves while a transmission is active. Upon success a wave id
-greater than or equal to 0 is returned, otherwise PI_EMPTY_WAVEFORM,
-PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID.
+of deleted waves while a transmission is active.
. .
pi: >=0 (as returned by [*pigpio_start*]).
+percent: 0-100, size of waveform as percentage of maximum available.
. .
The data provided by the [*wave_add_**] functions are consumed by this
wave id is passed to [*wave_send_**] to specify the waveform to transmit.
A usage would be the creation of two waves where one is filled while the other
-is beeing transmitted. Each wave is assigned 50% of the available resources.
+is being transmitted. Each wave is assigned 50% of the resources.
This buffer structure allows the transmission of infinite wave sequences.
Normal usage:
*param::
An array of script parameters.
+percent:: 0-100
+The size of waveform as percentage of maximum available.
+
pi::
An integer defining a connected Pi. The value is returned by
[*pigpio_start*] upon success.
.IP "" 4
.br
-Similar to WVCRE, this command creates a waveform but pads the consumed
+Similar to \fBWVCRE\fP, this command creates a waveform but pads the consumed
resources to a fixed size, specified as a percent of total resource.
Padded waves of equal size can be re-cycled efficiently allowing newly
created waves to re-use the resources of deleted waves of the same dimension.