コード例 #1
0
        public static short ReadBit()
        {
            // Send the byte and get back what was sent
            var result = TMEX.TMTouchBit(_session.SessionHandle, 0xFF);

            // Return the result
            return(result);
        }
コード例 #2
0
        public static short SendBit(short output)
        {
            // Send the byte and get back what was sent
            var result = TMEX.TMTouchBit(_session.SessionHandle, output);

            // Check that the value was sent correctly
            if (result != output)
            {
                // Throw an exception
                throw new OneWireException(OneWireException.ExceptionFunction.SendBit, _lastId);
            }

            // Return the result
            return(result);
        }