Unosquare
    Show / Hide Table of Contents

    Class RawWaves

    Raw waveform generation methods. These are advanced methods to send pulses on the pins with precise timing. It is recommended that the Waves methods are used instead.

    Inheritance
    Object
    RawWaves
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unosquare.PiGpio.NativeMethods
    Syntax
    public static class RawWaves

    Methods

    RawDumpWave()

    Used to print a readable version of the current waveform to stderr.

    Not intended for general use.

    Declaration
    public static void RawDumpWave()

    RawWaveAddGeneric(UInt32, RawWave[])

    This function adds a number of pulses to the current waveform.

    The advantage of this function over gpioWaveAddGeneric is that it allows the setting of the flags field.

    The pulses are interleaved in time order within the existing waveform (if any).

    Merging allows the waveform to be built in parts, that is the settings for GPIO#1 can be added, and then GPIO#2 etc.

    If the added waveform is intended to start after or within the existing waveform then the first pulse should consist of a delay.

    Not intended for general use.

    Declaration
    public static int RawWaveAddGeneric(uint numPulses, RawWave[] pulses)
    Parameters
    Type Name Description
    UInt32 numPulses

    the number of pulses.

    RawWave[] pulses

    the array containing the pulses.

    Returns
    Type Description
    Int32

    Returns the new total number of pulses in the current waveform if OK, otherwise PI_TOO_MANY_PULSES.

    RawWaveAddSPI(RawSpiData, UInt32, UInt32, Byte[], UInt32, UInt32, UInt32, UInt32)

    This function adds a waveform representing SPI data to the existing waveform (if any).

    Not intended for general use.

    Declaration
    public static int RawWaveAddSPI(RawSpiData spi, uint offset, uint spiSS, byte[] buffer, uint spiTxBits, uint spiBitFirst, uint spiBitLast, uint spiBits)
    Parameters
    Type Name Description
    RawSpiData spi

    a pointer to a spi object.

    UInt32 offset

    microseconds from the start of the waveform.

    UInt32 spiSS

    the slave select GPIO.

    Byte[] buffer

    the bits to transmit, most significant bit first.

    UInt32 spiTxBits

    the number of bits to write.

    UInt32 spiBitFirst

    the first bit to read.

    UInt32 spiBitLast

    the last bit to read.

    UInt32 spiBits

    the number of bits to transfer.

    Returns
    Type Description
    Int32

    Returns the new total number of pulses in the current waveform if OK, otherwise PI_BAD_USER_GPIO, PI_BAD_SER_OFFSET, or PI_TOO_MANY_PULSES.

    RawWaveCB()

    Not intended for general use.

    Declaration
    public static uint RawWaveCB()
    Returns
    Type Description
    UInt32

    Returns the number of the cb being currently output.

    RawWaveCBAdr(Int32)

    Return the (Linux) address of contol block cbNum.

    Not intended for general use.

    Declaration
    public static RawCBS RawWaveCBAdr(int controlBlockNumber)
    Parameters
    Type Name Description
    Int32 controlBlockNumber

    the cb of interest.

    Returns
    Type Description
    RawCBS

    The result code. 0 for success. See the ResultCode enumeration.

    RawWaveGetIn(Int32)

    Gets the wave input value parameter stored at pos.

    DEPRECATED: use rawWaveGetOOL instead.

    Not intended for general use.

    Declaration
    [Obsolete("use rawWaveGetOOL instead")]
    public static uint RawWaveGetIn(int position)
    Parameters
    Type Name Description
    Int32 position

    the position of interest.

    Returns
    Type Description
    UInt32

    The result code. 0 for success. See the ResultCode enumeration.

    RawWaveGetOOL(Int32)

    Gets the OOL parameter stored at pos.

    Not intended for general use.

    Declaration
    public static uint RawWaveGetOOL(int position)
    Parameters
    Type Name Description
    Int32 position

    the position of interest.

    Returns
    Type Description
    UInt32

    The result code. 0 for success. See the ResultCode enumeration.

    RawWaveGetOut(Int32)

    Gets the wave output parameter stored at pos.

    DEPRECATED: use rawWaveGetOOL instead.

    Not intended for general use.

    Declaration
    [Obsolete("use rawWaveGetOOL instead.")]
    public static uint RawWaveGetOut(int position)
    Parameters
    Type Name Description
    Int32 position

    the position of interest.

    Returns
    Type Description
    UInt32

    The result code. 0 for success. See the ResultCode enumeration.

    RawWaveInfo(Int32)

    Gets details about the wave with id wave_id.

    Not intended for general use.

    Declaration
    public static RawWaveInformation RawWaveInfo(int waveId)
    Parameters
    Type Name Description
    Int32 waveId

    the wave of interest.

    Returns
    Type Description
    RawWaveInformation

    The result code. 0 for success. See the ResultCode enumeration.

    RawWaveSetIn(Int32, UInt32)

    Sets the wave input value stored at pos to value.

    DEPRECATED: use rawWaveSetOOL instead.

    Not intended for general use.

    Declaration
    [Obsolete("use rawWaveSetOOL instead")]
    public static void RawWaveSetIn(int position, uint value)
    Parameters
    Type Name Description
    Int32 position

    the position of interest.

    UInt32 value

    the value to write.

    RawWaveSetOOL(Int32, UInt32)

    Sets the OOL parameter stored at pos to value.

    Not intended for general use.

    Declaration
    public static void RawWaveSetOOL(int position, uint value)
    Parameters
    Type Name Description
    Int32 position

    the position of interest.

    UInt32 value

    the value to write.

    RawWaveSetOut(Int32, UInt32)

    Sets the wave output parameter stored at pos to value.

    DEPRECATED: use rawWaveSetOOL instead.

    Not intended for general use.

    Declaration
    [Obsolete("use rawWaveSetOOL instead")]
    public static void RawWaveSetOut(int position, uint value)
    Parameters
    Type Name Description
    Int32 position

    the position of interest.

    UInt32 value

    the value to write.

    Comments

    Back to top Copyright © 2017-2019 Unosquare