Package edu.wpi.first.hal
Class SPIJNI
java.lang.Object
edu.wpi.first.hal.JNIWrapper
edu.wpi.first.hal.SPIJNI
public class SPIJNI extends JNIWrapper
-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description SPIJNI()
-
Method Summary
Modifier and Type Method Description static void
spiClose(int port)
static void
spiConfigureAutoStall(int port, int csToSclkTicks, int stallTicks, int pow2BytesPerRead)
static void
spiForceAutoRead(int port)
static void
spiFreeAuto(int port)
static int
spiGetAutoDroppedCount(int port)
static void
spiInitAuto(int port, int bufferSize)
static void
spiInitialize(int port)
static int
spiRead(int port, boolean initiate, ByteBuffer dataReceived, byte size)
static int
spiReadAutoReceivedData(int port, int[] buffer, int numToRead, double timeout)
static int
spiReadAutoReceivedData(int port, ByteBuffer buffer, int numToRead, double timeout)
static int
spiReadB(int port, boolean initiate, byte[] dataReceived, byte size)
static void
spiSetAutoTransmitData(int port, byte[] dataToSend, int zeroSize)
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 void
spiStartAutoRate(int port, double period)
static void
spiStartAutoTrigger(int port, int digitalSourceHandle, int analogTriggerType, boolean triggerRising, boolean triggerFalling)
static void
spiStopAuto(int port)
static int
spiTransaction(int port, ByteBuffer dataToSend, ByteBuffer dataReceived, byte size)
static int
spiTransactionB(int port, byte[] dataToSend, byte[] dataReceived, byte size)
static int
spiWrite(int port, ByteBuffer dataToSend, byte sendSize)
static int
spiWriteB(int port, byte[] dataToSend, byte sendSize)
-
Constructor Details
-
Method Details
-
spiInitialize
-
spiTransaction
public static int spiTransaction(int port, ByteBuffer dataToSend, ByteBuffer dataReceived, byte size) -
spiTransactionB
-
spiWrite
-
spiWriteB
-
spiRead
-
spiReadB
-
spiClose
-
spiSetSpeed
-
spiSetOpts
-
spiSetChipSelectActiveHigh
-
spiSetChipSelectActiveLow
-
spiInitAuto
-
spiFreeAuto
-
spiStartAutoRate
-
spiStartAutoTrigger
public static void spiStartAutoTrigger(int port, int digitalSourceHandle, int analogTriggerType, boolean triggerRising, boolean triggerFalling) -
spiStopAuto
-
spiSetAutoTransmitData
-
spiForceAutoRead
-
spiReadAutoReceivedData
public static int spiReadAutoReceivedData(int port, ByteBuffer buffer, int numToRead, double timeout) -
spiReadAutoReceivedData
-
spiGetAutoDroppedCount
-
spiConfigureAutoStall
public static void spiConfigureAutoStall(int port, int csToSclkTicks, int stallTicks, int pow2BytesPerRead)
-