edu.wpi.first.wpilibj.hal

## Class SPIJNI

- java.lang.Object
- - edu.wpi.first.wpilibj.hal.JNIWrapper
  - - edu.wpi.first.wpilibj.hal.SPIJNI

-     public class SPIJNI
      extends JNIWrapper

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SPIJNI()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `spiClose(int port)`
    `static void` | `spiFreeAccumulator(int port)`
    `static double` | `spiGetAccumulatorAverage(int port)`
    `static int` | `spiGetAccumulatorCount(int port)`
    `static int` | `spiGetAccumulatorLastValue(int port)`
    `static void` | `spiGetAccumulatorOutput(int port, java.nio.LongBuffer value, java.nio.LongBuffer count)`
    `static long` | `spiGetAccumulatorValue(int port)`
    `static void` | `spiInitAccumulator(int port, int period, int cmd, byte xferSize, int validMask, int validValue, byte dataShift, byte dataSize, boolean isSigned, boolean bigEndian)`
    `static void` | `spiInitialize(int port)`
    `static int` | `spiRead(int port, java.nio.ByteBuffer dataReceived, byte size)`
    `static void` | `spiResetAccumulator(int port)`
    `static void` | `spiSetAccumulatorCenter(int port, int center)`
    `static void` | `spiSetAccumulatorDeadband(int port, int deadband)`
    `static void` | `spiSetChipSelectActiveHigh(int port)`
    `static void` | `spiSetChipSelectActiveLow(int port)`
    `static void` | `spiSetOpts(int port, int msbFirst, int sampleOnTrailing, int clkIdleHigh)`
    `static void` | `spiSetSpeed(int port, int speed)`
    `static int` | `spiTransaction(int port, java.nio.ByteBuffer dataToSend, java.nio.ByteBuffer dataReceived, byte size)`
    `static int` | `spiWrite(int port, java.nio.ByteBuffer dataToSend, byte sendSize)`

    - ### Methods inherited from class edu.wpi.first.wpilibj.hal.JNIWrapper

      `getPort, getPortWithModule`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SPIJNI

          public SPIJNI()

  - ### Method Detail

    - #### spiInitialize

          public static void spiInitialize(int port)

    - #### spiTransaction

          public static int spiTransaction(int port,
                                           java.nio.ByteBuffer dataToSend,
                                           java.nio.ByteBuffer dataReceived,
                                           byte size)

    - #### spiWrite

          public static int spiWrite(int port,
                                     java.nio.ByteBuffer dataToSend,
                                     byte sendSize)

    - #### spiRead

          public static int spiRead(int port,
                                    java.nio.ByteBuffer dataReceived,
                                    byte size)

    - #### spiClose

          public static void spiClose(int port)

    - #### spiSetSpeed

          public static void spiSetSpeed(int port,
                                         int speed)

    - #### spiSetOpts

          public static void spiSetOpts(int port,
                                        int msbFirst,
                                        int sampleOnTrailing,
                                        int clkIdleHigh)

    - #### spiSetChipSelectActiveHigh

          public static void spiSetChipSelectActiveHigh(int port)

    - #### spiSetChipSelectActiveLow

          public static void spiSetChipSelectActiveLow(int port)

    - #### spiInitAccumulator

          public static void spiInitAccumulator(int port,
                                                int period,
                                                int cmd,
                                                byte xferSize,
                                                int validMask,
                                                int validValue,
                                                byte dataShift,
                                                byte dataSize,
                                                boolean isSigned,
                                                boolean bigEndian)

    - #### spiFreeAccumulator

          public static void spiFreeAccumulator(int port)

    - #### spiResetAccumulator

          public static void spiResetAccumulator(int port)

    - #### spiSetAccumulatorCenter

          public static void spiSetAccumulatorCenter(int port,
                                                     int center)

    - #### spiSetAccumulatorDeadband

          public static void spiSetAccumulatorDeadband(int port,
                                                       int deadband)

    - #### spiGetAccumulatorLastValue

          public static int spiGetAccumulatorLastValue(int port)

    - #### spiGetAccumulatorValue

          public static long spiGetAccumulatorValue(int port)

    - #### spiGetAccumulatorCount

          public static int spiGetAccumulatorCount(int port)

    - #### spiGetAccumulatorAverage

          public static double spiGetAccumulatorAverage(int port)

    - #### spiGetAccumulatorOutput

          public static void spiGetAccumulatorOutput(int port,
                                                     java.nio.LongBuffer value,
                                                     java.nio.LongBuffer count)