namespace Tinkerforge
{
    public static class EIO4
    {
        public static (byte DirectionMask, byte ValueMask) GetConfiguration(this BrickletIO4 io4)
        {
            io4.GetConfiguration(out byte directionMask, out byte valueMask);
            return (directionMask, valueMask);
        }

        public static (byte Pin, byte Value, long Time, long TimeRemaining) GetMonoflop(this BrickletIO4 io4, byte pin)
        {
            io4.GetMonoflop(pin, out byte value, out long time, out long timeRemaining);
            return (pin, value, time, timeRemaining);
        }

        public static (byte Pin, byte EdgeType, byte Debounce) GetEdgeCountConfig(this BrickletIO4 io4,
            byte pin)
        {
            io4.GetEdgeCountConfig(pin, out byte edgeType, out byte debounce);
            return (pin, edgeType, debounce);
        }
    }
}
