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
-
Field Summary
Fields Modifier and Type Field Description static int
INVALID_PORT
static int
MXP_PORT
static int
ONBOARD_CS0_PORT
static int
ONBOARD_CS1_PORT
static int
ONBOARD_CS2_PORT
static int
ONBOARD_CS3_PORT
static int
SPI_MODE0
static int
SPI_MODE1
static int
SPI_MODE2
static int
SPI_MODE3
-
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 int
spiGetMode(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
spiSetMode(int port, int mode)
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)
-
Field Details
-
INVALID_PORT
- See Also:
- Constant Field Values
-
ONBOARD_CS0_PORT
- See Also:
- Constant Field Values
-
ONBOARD_CS1_PORT
- See Also:
- Constant Field Values
-
ONBOARD_CS2_PORT
- See Also:
- Constant Field Values
-
ONBOARD_CS3_PORT
- See Also:
- Constant Field Values
-
MXP_PORT
- See Also:
- Constant Field Values
-
SPI_MODE0
- See Also:
- Constant Field Values
-
SPI_MODE1
- See Also:
- Constant Field Values
-
SPI_MODE2
- See Also:
- Constant Field Values
-
SPI_MODE3
- See Also:
- Constant Field Values
-
-
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
-
spiSetMode
-
spiGetMode
-
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)
-