Ejemplo n.º 1
0
        public static short ReadByte()
        {
            // Send the byte and get back what was sent
            var result = TMEX.TMTouchByte(_session.SessionHandle, 0xFF);

            // Return the result
            return(result);
        }
Ejemplo n.º 2
0
        public static short SendByte(short output)
        {
            // Send the byte and get back what was sent
            var result = TMEX.TMTouchByte(_session.SessionHandle, output);

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

            // Return the result
            return(result);
        }