001package edu.wpi.first.wpilibj.hal;
002
003import java.nio.ByteBuffer;
004import java.nio.IntBuffer;
005
006public class SPIJNI extends JNIWrapper {
007        public static native void spiInitialize(byte port, IntBuffer status);
008        public static native int spiTransaction(byte port, ByteBuffer dataToSend, ByteBuffer dataReceived, byte size);
009        public static native int spiWrite(byte port, ByteBuffer dataToSend, byte sendSize);
010        public static native int spiRead(byte port, ByteBuffer dataReceived, byte size);
011        public static native void spiClose(byte port);
012        public static native void spiSetSpeed(byte port, int speed);
013        public static native void spiSetBitsPerWord(byte port, byte bpw);
014        public static native void spiSetOpts(byte port, int msb_first, int sample_on_trailing, int clk_idle_high);
015        public static native void spiSetChipSelectActiveHigh(byte port, IntBuffer status);
016        public static native void spiSetChipSelectActiveLow(byte port, IntBuffer status);
017}