001// Copyright (c) FIRST and other WPILib contributors.
002// Open Source Software; you can modify and/or share it under the terms of
003// the WPILib BSD license file in the root directory of this project.
004
005package edu.wpi.first.hal;
006
007@SuppressWarnings("AbbreviationAsWordInName")
008public class DIOJNI extends JNIWrapper {
009  public static native int initializeDIOPort(int halPortHandle, boolean input);
010
011  public static native boolean checkDIOChannel(int channel);
012
013  public static native void freeDIOPort(int dioPortHandle);
014
015  public static native void setDIOSimDevice(int handle, int device);
016
017  public static native void setDIO(int dioPortHandle, boolean value);
018
019  public static native void setDIODirection(int dioPortHandle, boolean input);
020
021  public static native boolean getDIO(int dioPortHandle);
022
023  public static native boolean getDIODirection(int dioPortHandle);
024
025  public static native void pulse(int dioPortHandle, double pulseLength);
026
027  public static native boolean isPulsing(int dioPortHandle);
028
029  public static native boolean isAnyPulsing();
030
031  public static native short getLoopTiming();
032
033  public static native int allocateDigitalPWM();
034
035  public static native void freeDigitalPWM(int pwmGenerator);
036
037  public static native void setDigitalPWMRate(double rate);
038
039  public static native void setDigitalPWMDutyCycle(int pwmGenerator, double dutyCycle);
040
041  public static native void setDigitalPWMOutputChannel(int pwmGenerator, int channel);
042}