Beispiel #1
0
        bool ReadDI(ushort port)
        {
            short err = USBDASK.UD_DI_ReadPort((ushort)CardNo, 0, out uint StatusByte);

            if (err == 0)
            {
                return(Convert.ToBoolean((StatusByte >> port) & 1));
            }
            return(false);
        }