namespace Tinkerforge
{
    public static class EIO16
    {
        public static (char Port, byte DirectionMask, byte ValueMask) GetPortConfiguration(this BrickletIO16 io16, char port)
        {
            io16.GetPortConfiguration(port, out byte directionMask, out byte valueMask);
            return (port, directionMask, valueMask);
        }

        public static (char Port, byte Pin, byte Value, long Time, long TimeRemaining) GetPortMonoflop(
            this BrickletIO16 io16, char port, byte pin)
        {
            io16.GetPortMonoflop(port, pin, out byte value, out long time, out long timeRemaining);
            return (port, pin, value, time, timeRemaining);
        }

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

    }
}
