001/*----------------------------------------------------------------------------*/
002/* Copyright (c) FIRST 2016-2017. All Rights Reserved.                        */
003/* Open Source Software - may be modified and shared by FRC teams. The code   */
004/* must be accompanied by the FIRST BSD license file in the root directory of */
005/* the project.                                                               */
006/*----------------------------------------------------------------------------*/
007
008package edu.wpi.first.wpilibj.hal;
009
010import java.nio.ByteBuffer;
011
012@SuppressWarnings("AbbreviationAsWordInName")
013public class I2CJNI extends JNIWrapper {
014  public static native void i2CInitialize(byte port);
015
016  public static native int i2CTransaction(byte port, byte address, ByteBuffer dataToSend,
017                                          byte sendSize, ByteBuffer dataReceived, byte receiveSize);
018
019  public static native int i2CWrite(byte port, byte address, ByteBuffer dataToSend, byte sendSize);
020
021  public static native int i2CRead(byte port, byte address, ByteBuffer dataRecieved,
022                                   byte receiveSize);
023
024  public static native void i2CClose(byte port);
025}