@Test public void readInputChannel_throwsIfTooSLarge() throws IOException { mExpectedException.expect(IllegalArgumentException.class); mDriver.readInputChannel(CONFIGURATION.channelCount + 1); }
public boolean readInputChannel(int channel) throws IOException { if (channel < 0 || channel >= mChipConfiguration.channelCount) { throw new IllegalArgumentException("Input channel must be between 0 and " + (mChipConfiguration.channelCount-1)); } byte status = readInputStatus(); return BitwiseUtil.isBitSet(status, channel); }
Cap1xxx implements AutoCloseable { public boolean readInputChannel(int channel) throws IOException { if (channel < 0 || channel >= mChipConfiguration.channelCount) { throw new IllegalArgumentException("Input channel must be between 0 and " + (mChipConfiguration.channelCount-1)); } byte status = readInputStatus(); return BitwiseUtil.isBitSet(status, channel); } }
Cap1xxx implements AutoCloseable { public boolean readInputChannel(int channel) throws IOException { if (channel < 0 || channel >= mChipConfiguration.channelCount) { throw new IllegalArgumentException("Input channel must be between 0 and " + (mChipConfiguration.channelCount-1)); } byte status = readInputStatus(); return BitwiseUtil.isBitSet(status, channel); } @Deprecated  Cap1xxx(Context context, String i2cName, String alertName, Configuration chip);  Cap1xxx(String i2cName, String alertName, Configuration chip); @Deprecated  Cap1xxx(Context context, String i2cName, String alertName, Configuration chip,
            Handler handler);  Cap1xxx(String i2cName, String alertName, Configuration chip, Handler handler);  Cap1xxx(String i2cName, int i2cAddress, String alertName, Configuration chip, Handler handler); @VisibleForTesting  Cap1xxx(I2cDevice i2cDevice, Gpio alertPin, Configuration chip); }
Cap1xxx implements AutoCloseable { public boolean readInputChannel(int channel) throws IOException { if (channel < 0 || channel >= mChipConfiguration.channelCount) { throw new IllegalArgumentException("Input channel must be between 0 and " + (mChipConfiguration.channelCount-1)); } byte status = readInputStatus(); return BitwiseUtil.isBitSet(status, channel); } @Deprecated  Cap1xxx(Context context, String i2cName, String alertName, Configuration chip);  Cap1xxx(String i2cName, String alertName, Configuration chip); @Deprecated  Cap1xxx(Context context, String i2cName, String alertName, Configuration chip,
            Handler handler);  Cap1xxx(String i2cName, String alertName, Configuration chip, Handler handler);  Cap1xxx(String i2cName, int i2cAddress, String alertName, Configuration chip, Handler handler); @VisibleForTesting  Cap1xxx(I2cDevice i2cDevice, Gpio alertPin, Configuration chip); void setOnCapTouchListener(OnCapTouchListener listener); void setRepeatRate(@RepeatRate int rate); void setSensitivity(@Sensitivity int sensitivity); void setLedFade(@LedFade int ledFade); void setLedBrightness(float ledBrightness); void setMultitouchInputMax(int count); boolean readInterruptFlag(); boolean readInterruptFlag(boolean clear); void clearInterruptFlag(); boolean readInputChannel(int channel); boolean readLedState(int ledIndex); void setLedState(int ledIndex, boolean state); int getInputChannelCount(); int getMaximumTouchPoints(); int getLedCount(); @Override void close(); void setInputsEnabled(boolean enable); void setInterruptsEnabled(boolean enable); void setRepeatEnabled(boolean enable); void setLedInputLinkEnabled(boolean enable); }
Cap1xxx implements AutoCloseable { public boolean readInputChannel(int channel) throws IOException { if (channel < 0 || channel >= mChipConfiguration.channelCount) { throw new IllegalArgumentException("Input channel must be between 0 and " + (mChipConfiguration.channelCount-1)); } byte status = readInputStatus(); return BitwiseUtil.isBitSet(status, channel); } @Deprecated  Cap1xxx(Context context, String i2cName, String alertName, Configuration chip);  Cap1xxx(String i2cName, String alertName, Configuration chip); @Deprecated  Cap1xxx(Context context, String i2cName, String alertName, Configuration chip,
            Handler handler);  Cap1xxx(String i2cName, String alertName, Configuration chip, Handler handler);  Cap1xxx(String i2cName, int i2cAddress, String alertName, Configuration chip, Handler handler); @VisibleForTesting  Cap1xxx(I2cDevice i2cDevice, Gpio alertPin, Configuration chip); void setOnCapTouchListener(OnCapTouchListener listener); void setRepeatRate(@RepeatRate int rate); void setSensitivity(@Sensitivity int sensitivity); void setLedFade(@LedFade int ledFade); void setLedBrightness(float ledBrightness); void setMultitouchInputMax(int count); boolean readInterruptFlag(); boolean readInterruptFlag(boolean clear); void clearInterruptFlag(); boolean readInputChannel(int channel); boolean readLedState(int ledIndex); void setLedState(int ledIndex, boolean state); int getInputChannelCount(); int getMaximumTouchPoints(); int getLedCount(); @Override void close(); void setInputsEnabled(boolean enable); void setInterruptsEnabled(boolean enable); void setRepeatEnabled(boolean enable); void setLedInputLinkEnabled(boolean enable); static final int DEFAULT_I2C_ADDRESS; static final int REPEAT_DISABLE; static final int REPEAT_FAST; static final int REPEAT_NORMAL; static final int REPEAT_SLOW; static final int SENSITIVITY_HIGH; static final int SENSITIVITY_NORMAL; static final int SENSITIVITY_LOW; static final int LED_FADE_INSTANT; static final int LED_FADE_FAST; static final int LED_FADE_SLOW; }