package com.uxxu.konashi.lib.util;

import com.uxxu.konashi.lib.Konashi;

/**
 * Created by izumin on 9/21/15.
 */
public final class I2cUtils {
    private I2cUtils() {
        throw new AssertionError("constructor of the utility class should not be called");
    }

    public static boolean isValidMode(int mode) {
        return (mode == Konashi.I2C_DISABLE) || (mode == Konashi.I2C_ENABLE)
                || (mode == Konashi.I2C_ENABLE_100K) || (mode == Konashi.I2C_ENABLE_400K);
    }
}
@@ -484,10 +484,245 @@
 );%0A    %7D
+%0A%0A    public static boolean isValidCondition(int condition) %7B%0A        return (condition == Konashi.I2C_START_CONDITION) %7C%7C (condition == Konashi.I2C_STOP_CONDITION)%0A                %7C%7C (condition == Konashi.I2C_RESTART_CONDITION);%0A    %7D
 %0A%7D

Add I2cUtils.isValidCondition()